Skip to content
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

Replace use of imp module removed in 3.12 #9028

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions numba/tests/test_llvm_version_check.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import imp
import importlib
import sys

import unittest
Expand Down Expand Up @@ -29,13 +29,13 @@ def cleanup():
ver_fail = (version_fail, git_version_fail)
for v in ver_pass:
llvmlite.__version__ = v
imp.reload(numba)
importlib.reload(numba)
self.assertTrue(numba.__version__)

for v in ver_fail:
with self.assertRaises(ImportError):
llvmlite.__version__ = v
imp.reload(numba)
importlib.reload(numba)


if __name__ == '__main__':
Expand Down
4 changes: 2 additions & 2 deletions numba/tests/test_pycc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import contextlib
import imp
import importlib
import os
import shutil
import subprocess
Expand Down Expand Up @@ -94,7 +94,7 @@ def setUp(self):
self.skip_if_no_external_compiler() # external compiler needed
from numba.tests import compile_with_pycc
self._test_module = compile_with_pycc
imp.reload(self._test_module)
importlib.reload(self._test_module)

@contextlib.contextmanager
def check_cc_compiled(self, cc):
Expand Down