MongoEngine / MongoEngine/mongoengine

Make Document.get_collection public

Open
#1,182 3 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.