-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-125900: Clean-up logic around immortalization in free-threading #125901
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
Changes from all commits
70b2efd
acc19d1
c6ab225
2b5c4de
131de47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,9 +141,7 @@ | |
ctypes = None | ||
from test.support import (cpython_only, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that there are too many imports in the current line. Maybe it can be split. See line 146. This suggestion applies to all changes (maybe I don't like to import too much from the from statement, so it's better to use * directly (In this way, this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is fine. I don't think the PR should do a broader import cleanup -- just undo the changes related |
||
check_impl_detail, requires_debug_ranges, | ||
gc_collect, Py_GIL_DISABLED, | ||
suppress_immortalization, | ||
skip_if_suppress_immortalization) | ||
gc_collect, Py_GIL_DISABLED) | ||
from test.support.script_helper import assert_python_ok | ||
from test.support import threading_helper, import_helper | ||
from test.support.bytecode_helper import instructions_with_positions | ||
|
@@ -579,7 +577,6 @@ def test_interned_string_with_null(self): | |
|
||
@cpython_only | ||
@unittest.skipUnless(Py_GIL_DISABLED, "does not intern all constants") | ||
@skip_if_suppress_immortalization() | ||
def test_interned_constants(self): | ||
# compile separately to avoid compile time de-duping | ||
|
||
|
@@ -599,7 +596,6 @@ def func2(): | |
|
||
class CodeWeakRefTest(unittest.TestCase): | ||
|
||
@suppress_immortalization() | ||
def test_basic(self): | ||
# Create a code object in a clean environment so that we know we have | ||
# the only reference to it left. | ||
|
@@ -850,7 +846,6 @@ def test_bad_index(self): | |
self.assertEqual(GetExtra(f.__code__, FREE_INDEX+100, | ||
ctypes.c_voidp(100)), 0) | ||
|
||
@suppress_immortalization() | ||
def test_free_called(self): | ||
# Verify that the provided free function gets invoked | ||
# when the code object is cleaned up. | ||
|
@@ -878,7 +873,6 @@ def test_get_set(self): | |
del f | ||
|
||
@threading_helper.requires_working_threading() | ||
@suppress_immortalization() | ||
def test_free_different_thread(self): | ||
# Freeing a code object on a different thread then | ||
# where the co_extra was set should be safe. | ||
|
Uh oh!
There was an error while loading. Please reload this page.