Skip to content

Commit c00a184

Browse files
committed
gc
1 parent 6075b16 commit c00a184

28 files changed

+1637
-101
lines changed

.cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"emscripten",
6767
"excs",
6868
"finalizer",
69+
"finalizers",
6970
"GetSet",
7071
"groupref",
7172
"internable",
@@ -120,12 +121,14 @@
120121
"sysmodule",
121122
"tracebacks",
122123
"typealiases",
124+
"uncollectable",
123125
"unhashable",
124126
"uninit",
125127
"unraisable",
126128
"unresizable",
127129
"varint",
128130
"wasi",
131+
"weaked",
129132
"zelf",
130133
// unix
131134
"posixshmem",

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ env:
112112
test.test_multiprocessing_forkserver.test_processes
113113
test.test_multiprocessing_spawn.test_processes
114114
ENV_POLLUTING_TESTS_MACOS: >-
115+
test.test_concurrent_futures.test_shutdown
115116
test.test_multiprocessing_forkserver.test_processes
116117
test.test_multiprocessing_spawn.test_processes
117118
ENV_POLLUTING_TESTS_WINDOWS: >-

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/test/_test_multiprocessing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4057,8 +4057,6 @@ def test_heap(self):
40574057
self.assertEqual(len(heap._allocated_blocks), 0, heap._allocated_blocks)
40584058
self.assertEqual(len(heap._len_to_seq), 0)
40594059

4060-
# TODO: RUSTPYTHON - gc.enable() not implemented
4061-
@unittest.expectedFailure
40624060
def test_free_from_gc(self):
40634061
# Check that freeing of blocks by the garbage collector doesn't deadlock
40644062
# (issue #12352).

Lib/test/support/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -919,13 +919,6 @@ def disable_gc():
919919

920920
@contextlib.contextmanager
921921
def gc_threshold(*args):
922-
# TODO: RUSTPYTHON; GC is not supported yet
923-
try:
924-
yield
925-
finally:
926-
pass
927-
return
928-
929922
import gc
930923
old_threshold = gc.get_threshold()
931924
gc.set_threshold(*args)

Lib/test/test_builtin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,8 +2330,6 @@ def test_baddecorator(self):
23302330

23312331
class ShutdownTest(unittest.TestCase):
23322332

2333-
# TODO: RUSTPYTHON
2334-
@unittest.expectedFailure
23352333
def test_cleanup(self):
23362334
# Issue #19255: builtins are still available at shutdown
23372335
code = """if 1:

Lib/test/test_dict.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,6 @@ def test_copy_fuzz(self):
369369
self.assertNotEqual(d, d2)
370370
self.assertEqual(len(d2), len(d) + 1)
371371

372-
# TODO: RUSTPYTHON
373-
@unittest.expectedFailure
374372
def test_copy_maintains_tracking(self):
375373
class A:
376374
pass

Lib/test/test_generators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ def f():
176176
g.send(0)
177177
self.assertEqual(next(g), 1)
178178

179-
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError
180179
def test_handle_frame_object_in_creation(self):
181180

182181
#Attempt to expose partially constructed frames

Lib/test/test_io.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4865,11 +4865,15 @@ def run():
48654865
else:
48664866
self.assertFalse(err.strip('.!'))
48674867

4868+
# TODO: RUSTPYTHON; daemon thread exception during shutdown due to finalizing order change
4869+
@unittest.expectedFailure
48684870
@threading_helper.requires_working_threading()
48694871
@support.requires_resource('walltime')
48704872
def test_daemon_threads_shutdown_stdout_deadlock(self):
48714873
self.check_daemon_threads_shutdown_deadlock('stdout')
48724874

4875+
# TODO: RUSTPYTHON; daemon thread exception during shutdown due to finalizing order change
4876+
@unittest.expectedFailure
48734877
@threading_helper.requires_working_threading()
48744878
@support.requires_resource('walltime')
48754879
def test_daemon_threads_shutdown_stderr_deadlock(self):

Lib/test/test_subprocess.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2445,7 +2445,6 @@ def raise_it():
24452445
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
24462446
stderr=subprocess.PIPE, preexec_fn=raise_it)
24472447

2448-
@unittest.expectedFailure # TODO: RUSTPYTHON
24492448
def test_preexec_gc_module_failure(self):
24502449
# This tests the code that disables garbage collection if the child
24512450
# process will execute any Python.

0 commit comments

Comments
 (0)