diff --git a/newsfragments/4094.bugfix.rst b/newsfragments/4094.bugfix.rst new file mode 100644 index 0000000000..8c73eaedbf --- /dev/null +++ b/newsfragments/4094.bugfix.rst @@ -0,0 +1,2 @@ +Replaced hardcoded numeric values with :obj:`dis.opmap`, +fixing problem with 3.13.0a1. diff --git a/setuptools/depends.py b/setuptools/depends.py index 180e820459..42907d9bd4 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -142,9 +142,9 @@ def extract_constant(code, symbol, default=-1): name_idx = list(code.co_names).index(symbol) - STORE_NAME = 90 - STORE_GLOBAL = 97 - LOAD_CONST = 100 + STORE_NAME = dis.opmap['STORE_NAME'] + STORE_GLOBAL = dis.opmap['STORE_GLOBAL'] + LOAD_CONST = dis.opmap['LOAD_CONST'] const = default