Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked frompython/cpython

Commit1f04e7c

Browse files
author
Anselm Kruis
committed
Stackless issuepython#156: Fix "uncollectable objects at shutdown" warning
Since merging commit c1c47c1, the Stackless test casetest_shutdown.TestShutdown.test_kill_modifies_slp_cstack_chain emits thewarning: "gc:0: ResourceWarning: gc: 1 uncollectable objects atshutdown; use gc.set_debug(gc.DEBUG_UNCOLLECTABLE) to list them".This commit disables GC for this test.
1 parentdacb7d5 commit1f04e7c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎Stackless/unittests/test_shutdown.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ def test_kill_modifies_slp_cstack_chain(self):
399399
rc=subprocess.call([sys.executable,"-s","-S","-E","-c",dedent("""
400400
from __future__ import print_function, absolute_import, division
401401
402+
import gc
402403
import threading
403404
import stackless
404405
import time
@@ -461,6 +462,7 @@ def other_thread():
461462
t.start()
462463
event.wait(5.0)
463464
print("end")
465+
gc.disable() # prevent "uncollectable objects at shutdown" warning
464466
sys.exit(42)
465467
""")]+args)
466468
self.assertEqual(rc,42)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp