@@ -1167,6 +1167,7 @@ def test_modified_local_is_seen_by_optimized_code(self):
11671167 self .assertIs (type (s ), float )
11681168 self .assertEqual (s , 1024.0 )
11691169
1170+ @unittest .skipIf (Py_GIL_DISABLED , "FT build only specializes on deferred methods/functions/classes" )
11701171 def test_guard_type_version_removed (self ):
11711172 def thing (a ):
11721173 x = 0
@@ -1185,6 +1186,7 @@ class Foo:
11851186 guard_type_version_count = opnames .count ("_GUARD_TYPE_VERSION" )
11861187 self .assertEqual (guard_type_version_count , 1 )
11871188
1189+ @unittest .skipIf (Py_GIL_DISABLED , "FT build only specializes on deferred methods/functions/classes" )
11881190 def test_guard_type_version_removed_inlined (self ):
11891191 """
11901192 Verify that the guard type version if we have an inlined function
@@ -1211,6 +1213,7 @@ class Foo:
12111213 guard_type_version_count = opnames .count ("_GUARD_TYPE_VERSION" )
12121214 self .assertEqual (guard_type_version_count , 1 )
12131215
1216+ @unittest .skipIf (Py_GIL_DISABLED , "FT build only specializes on deferred methods/functions" )
12141217 def test_guard_type_version_removed_invalidation (self ):
12151218
12161219 def thing (a ):
@@ -1241,6 +1244,7 @@ class Bar:
12411244 self .assertEqual (opnames [:load_attr_top ].count ("_GUARD_TYPE_VERSION" ), 1 )
12421245 self .assertEqual (opnames [call :load_attr_bottom ].count ("_CHECK_VALIDITY" ), 2 )
12431246
1247+ @unittest .skipIf (Py_GIL_DISABLED , "FT build only specializes on deferred methods/functions" )
12441248 def test_guard_type_version_removed_escaping (self ):
12451249
12461250 def thing (a ):
@@ -1264,6 +1268,7 @@ class Foo:
12641268 self .assertEqual (opnames [:load_attr_top ].count ("_GUARD_TYPE_VERSION" ), 1 )
12651269 self .assertEqual (opnames [call :load_attr_bottom ].count ("_CHECK_VALIDITY" ), 2 )
12661270
1271+ @unittest .skipIf (Py_GIL_DISABLED , "FT build only specializes on deferred methods/functions/classes" )
12671272 def test_guard_type_version_executor_invalidated (self ):
12681273 """
12691274 Verify that the executor is invalided on a type change.
@@ -2033,6 +2038,7 @@ def testfunc(n):
20332038 self .assertNotIn ("_GUARD_NOS_INT" , uops )
20342039 self .assertNotIn ("_GUARD_TOS_INT" , uops )
20352040
2041+ @unittest .skipIf (Py_GIL_DISABLED , "FT build immortalizes constants" )
20362042 def test_call_len_known_length_small_int (self ):
20372043 # Make sure that len(t) is optimized for a tuple of length 5.
20382044 # See https://github.com/python/cpython/issues/139393.
@@ -2057,6 +2063,7 @@ def testfunc(n):
20572063 self .assertNotIn ("_POP_CALL_LOAD_CONST_INLINE_BORROW" , uops )
20582064 self .assertNotIn ("_POP_TOP_LOAD_CONST_INLINE_BORROW" , uops )
20592065
2066+ @unittest .skipIf (Py_GIL_DISABLED , "FT build immortalizes constants" )
20602067 def test_call_len_known_length (self ):
20612068 # Make sure that len(t) is not optimized for a tuple of length 2048.
20622069 # See https://github.com/python/cpython/issues/139393.
@@ -2308,6 +2315,7 @@ def testfunc(n):
23082315 self .assertNotIn ("_TO_BOOL_BOOL" , uops )
23092316 self .assertIn ("_GUARD_IS_TRUE_POP" , uops )
23102317
2318+ @unittest .skipIf (Py_GIL_DISABLED , "FT build only specializes on deferred methods/functions/classes" )
23112319 def test_set_type_version_sets_type (self ):
23122320 class C :
23132321 A = 1
@@ -2340,6 +2348,7 @@ def testfunc(n):
23402348 self .assertNotIn ("_LOAD_SMALL_INT" , uops )
23412349 self .assertIn ("_LOAD_CONST_INLINE_BORROW" , uops )
23422350
2351+ @unittest .skipIf (Py_GIL_DISABLED , "FT build only specializes on deferred methods/functions" )
23432352 def test_cached_attributes (self ):
23442353 class C :
23452354 A = 1
0 commit comments