MongoEngine / MongoEngine/mongoengine
Make Document.get_collection public
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4h 41m
- Merged PRs (30d)
- 11
Description
Document._get_collection is a protected method, but it's very useful for public usage. I don't see any reason why it should be protected.
I guess this would suffice:
class Document(BaseDocument):
...
get_collection = _get_collection
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 at mongoengine/document.py:173 and inspect Document._get_collection and the surrounding Document API. Expose the equivalent public entry point and verify that callers can use Document.get_collection without relying on the protected name; done means the public method is available as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100