Skip to content

Commit a89d0b1

Browse files
committed
remove uop optimize tests
1 parent 720c99e commit a89d0b1

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ def get_opnames(ex):
140140

141141
@requires_specialization
142142
@unittest.skipIf(Py_GIL_DISABLED, "optimizer not yet supported in free-threaded builds")
143-
@unittest.skipUnless(hasattr(_testinternalcapi, "get_optimizer"),
143+
@unittest.skipUnless(hasattr(_testinternalcapi, "get_optimizer") and
144+
hasattr(_testinternalcapi, "new_uop_optimizer"),
144145
"Requires optimizer infrastructure")
145146
class TestExecutorInvalidation(unittest.TestCase):
146147

@@ -588,7 +589,8 @@ def testfunc(n):
588589

589590
@requires_specialization
590591
@unittest.skipIf(Py_GIL_DISABLED, "optimizer not yet supported in free-threaded builds")
591-
@unittest.skipUnless(hasattr(_testinternalcapi, "get_optimizer"),
592+
@unittest.skipUnless(hasattr(_testinternalcapi, "get_optimizer") and
593+
hasattr(_testinternalcapi, "new_uop_optimizer"),
592594
"Requires optimizer infrastructure")
593595
@unittest.skipIf(os.getenv("PYTHON_UOPS_OPTIMIZE") == "0", "Needs uop optimizer to run.")
594596
class TestUopsOptimization(unittest.TestCase):

Modules/_testinternalcapi.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -989,12 +989,6 @@ get_co_framesize(PyObject *self, PyObject *arg)
989989

990990
#ifdef _Py_TIER2
991991

992-
static PyObject *
993-
new_uop_optimizer(PyObject *self, PyObject *arg)
994-
{
995-
return _PyOptimizer_NewUOpOptimizer();
996-
}
997-
998992
static PyObject *
999993
set_optimizer(PyObject *self, PyObject *opt)
1000994
{
@@ -2106,7 +2100,6 @@ static PyMethodDef module_functions[] = {
21062100
#ifdef _Py_TIER2
21072101
{"get_optimizer", get_optimizer, METH_NOARGS, NULL},
21082102
{"set_optimizer", set_optimizer, METH_O, NULL},
2109-
{"new_uop_optimizer", new_uop_optimizer, METH_NOARGS, NULL},
21102103
{"add_executor_dependency", add_executor_dependency, METH_VARARGS, NULL},
21112104
{"invalidate_executors", invalidate_executors, METH_O, NULL},
21122105
#endif

0 commit comments

Comments
 (0)