Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

objgraph.by_type('file', untracked=True)

Open
#2 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

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

enhancement

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

  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.

More from mgedmin/objgraph

All issues in mgedmin/objgraph

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.