MongoEngine / MongoEngine/mongoengine
Add possibility to have read-only model instances without data descriptors for fields
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4h 41m
- Merged PRs (30d)
- 11
Description
I am suggesting somehow to add possibility to be able during a query to instruct the mapper to bring back light model instances which are read-only and thus don't need data descriptor stuff to track instance changes.
Otherwise this descriptors are quite heavy: http://stackoverflow.com/questions/30342212/override-attribute-access-precedence-having-a-data-descriptor
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the mapper's query path and how model instances receive data descriptors. The issue provides no file or test entry point, so first locate the relevant query and model construction code. Done would mean a query can request lightweight, read-only model instances without descriptor overhead, with behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100