1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
From 6db234d9647a20d7d46135352f5f2c8b26307ea7 Mon Sep 17 00:00:00 2001
Origin: https://github.com/numba/numba/pull/8590
From: Siu Kwan Lam <1929845+sklam@users.noreply.github.com>
Date: Wed, 16 Nov 2022 18:53:04 -0600
Subject: [PATCH 07/14] Fix CodeType usage
---
numba/tests/test_analysis.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/numba/tests/test_analysis.py b/numba/tests/test_analysis.py
index 82ea42a456b..22e4158f98d 100644
--- a/numba/tests/test_analysis.py
+++ b/numba/tests/test_analysis.py
@@ -674,10 +674,15 @@ def _literal_const_sample_generator(self, pyfunc, consts):
pyfunc_code.co_names,
pyfunc_code.co_varnames,
pyfunc_code.co_filename,
- pyfunc_code.co_name,
- pyfunc_code.co_firstlineno,
- pyfunc_code.co_lnotab,
- pyfunc_code.co_freevars,
+ pyfunc_code.co_name])
+
+ if utils.PYVERSION >= (3, 11):
+ co_args.append(pyfunc_code.co_qualname)
+ co_args.extend([pyfunc_code.co_firstlineno,
+ pyfunc_code.co_lnotab])
+ if utils.PYVERSION >= (3, 11):
+ co_args.append(pyfunc_code.co_exceptiontable)
+ co_args.extend([pyfunc_code.co_freevars,
pyfunc_code.co_cellvars
])
|