GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gc module internal structure and API by youknowone · Pull Request #6910 · RustPython/RustPython

gc module internal structure and API #6910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
youknowone merged 4 commits into RustPython:main from youknowone:gc-internal
Jan 31, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

gc module internal structure and API #6910

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4 commits
Select commit Hold shift + click to select a range
7f951b4
gc module internal structure and API
youknowone Jan 31, 2026
2d5be2f
fix dict/weakref/generators
youknowone Jan 31, 2026
4ff9fb8
unmark test_asyncio
youknowone Jan 31, 2026
06c8270
apply review
youknowone Jan 31, 2026
File filter
Filter by extension


Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

2 changes: 2 additions & 0 deletions 2 .cspell.dict/cpython.txt
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ repr
resinfo
Rshift
SA_ONSTACK
saveall
scls
setdict
setfunc
Expand Down Expand Up @@ -178,6 +179,7 @@ Typeparam
typeparams
typeslots
unaryop
uncollectable
Unhandle
unparse
unparser
Expand Down
2 changes: 0 additions & 2 deletions 2 Lib/test/_test_multiprocessing.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4057,8 +4057,6 @@ def test_heap(self):
self.assertEqual(len(heap._allocated_blocks), 0, heap._allocated_blocks)
self.assertEqual(len(heap._len_to_seq), 0)

# TODO: RUSTPYTHON - gc.enable() not implemented
@unittest.expectedFailure
def test_free_from_gc(self):
# Check that freeing of blocks by the garbage collector doesn't deadlock
# (issue #12352).
Expand Down
6 changes: 0 additions & 6 deletions 6 Lib/test/test_asyncio/test_futures.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,6 @@ def __del__(self):
fut = self._new_future(loop=self.loop)
fut.set_result(Evil())

# TODO: RUSTPYTHON - gc.get_referrers not implemented
@unittest.expectedFailure
def test_future_cancelled_result_refcycles(self):
f = self._new_future(loop=self.loop)
f.cancel()
Expand All @@ -691,8 +689,6 @@ def test_future_cancelled_result_refcycles(self):
self.assertIsNotNone(exc)
self.assertListEqual(gc.get_referrers(exc), [])

# TODO: RUSTPYTHON - gc.get_referrers not implemented
@unittest.expectedFailure
def test_future_cancelled_exception_refcycles(self):
f = self._new_future(loop=self.loop)
f.cancel()
Expand Down Expand Up @@ -720,8 +716,6 @@ def test_future_del_segfault(self):
with self.assertRaises(AttributeError):
del fut._log_traceback

# TODO: RUSTPYTHON - gc.get_referents not implemented
@unittest.expectedFailure
def test_future_iter_get_referents_segfault(self):
# See https://github.com/python/cpython/issues/122695
import _asyncio
Expand Down
2 changes: 0 additions & 2 deletions 2 Lib/test/test_dict.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,6 @@ def test_copy_fuzz(self):
self.assertNotEqual(d, d2)
self.assertEqual(len(d2), len(d) + 1)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_copy_maintains_tracking(self):
class A:
pass
Expand Down
1 change: 0 additions & 1 deletion 1 Lib/test/test_generators.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ def f():
g.send(0)
self.assertEqual(next(g), 1)

@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError
def test_handle_frame_object_in_creation(self):

#Attempt to expose partially constructed frames
Expand Down
1 change: 0 additions & 1 deletion 1 Lib/test/test_subprocess.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2445,7 +2445,6 @@ def raise_it():
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, preexec_fn=raise_it)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_preexec_gc_module_failure(self):
# This tests the code that disables garbage collection if the child
# process will execute any Python.
Expand Down
4 changes: 0 additions & 4 deletions 4 Lib/test/test_weakref.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -846,11 +846,9 @@ def cb(self, ignore):
gc.collect()
self.assertEqual(alist, [])

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_gc_during_ref_creation(self):
self.check_gc_during_creation(weakref.ref)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_gc_during_proxy_creation(self):
self.check_gc_during_creation(weakref.proxy)

Expand Down Expand Up @@ -1365,11 +1363,9 @@ def check_len_race(self, dict_type, cons):
self.assertGreaterEqual(n2, 0)
self.assertLessEqual(n2, n1)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_weak_keyed_len_race(self):
self.check_len_race(weakref.WeakKeyDictionary, lambda k: (k, 1))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_weak_valued_len_race(self):
self.check_len_race(weakref.WeakValueDictionary, lambda k: (1, k))

Expand Down
2 changes: 0 additions & 2 deletions 2 Lib/test/test_weakset.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,6 @@ def test_len_cycles(self):
self.assertIn(n1, (0, 1))
self.assertEqual(n2, 0)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_len_race(self):
# Extended sanity checks for len() in the face of cyclic collection
self.addCleanup(gc.set_threshold, *gc.get_threshold())
Expand Down
2 changes: 0 additions & 2 deletions 2 Lib/test/test_zoneinfo/test_zoneinfo.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1937,8 +1937,6 @@ def test_cache_location(self):
self.assertFalse(hasattr(c_zoneinfo.ZoneInfo, "_weak_cache"))
self.assertTrue(hasattr(py_zoneinfo.ZoneInfo, "_weak_cache"))

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_gc_tracked(self):
import gc

Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.