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.
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
Uh oh!
There was an error while loading. Please reload this page.
Show file tree
Hide file tree
Changes from all commits
Commits
File filter
Filter by extension
.py
(8)
.rs
(5)
.toml
(1)
.txt
(1)
All 4 file types selected
Only manifest files
Viewed files
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
Hide whitespace
Diff view
Hide whitespace
There are no files selected for viewing
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
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
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
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
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
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
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
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
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.