objgraph.by_type('file', untracked=True)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by locating the implementation of objgraph.by_type and its existing tests. Compare current behavior with the requested untracked option, using the issue's gc.get_referents example as the expected behavior. Done means the option returns matching objects that are not included by gc.get_objects(), while existing behavior remains unchanged.
Written by the indexing model from the issue text.
Description
So, not all objects are tracked by the Python garbage collector, and therefore not all show up in gc.get_objects(). For example: file objecs don't, so objgraph.by_type('file') will always return an empty list.
Implement a workaround that does
return [r for o in objects for r in gc.get_referents(o) if type(r).__name__ == typename]
if the user asks for it.
- Dominant language
- Python
- Stars
- 841
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from mgedmin/objgraph
-
enhancement help-needed
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
enhancement help-needed
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement help-needed
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
question
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
enhancement help-needed
Difficulty 3/5 1-2 days Newbie friendliness 38/100
All issues in mgedmin/objgraph
Similar issues
-
json_params_matcher fails on falsy top-level JSON primitives (0, False, "")Possibly taken @mayureshsonawane17 claimed this today. OpenWaiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
bojieli/ai-agent-book#1169 ·
Maintainers usually reply within 1 day
-
priority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenHands/extensions#738 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
micronaut-projects/micronaut-core#13677 ·
Maintainers usually reply within 1 day