]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45019: Silence a warning in test_ctypes. (gh-28362)
authorEric Snow <ericsnowcurrently@gmail.com>
Wed, 15 Sep 2021 19:33:05 +0000 (13:33 -0600)
committerGitHub <noreply@github.com>
Wed, 15 Sep 2021 19:33:05 +0000 (13:33 -0600)
This was missed in PR gh-28319.

https://bugs.python.org/issue45019

Lib/ctypes/test/test_values.py

index 03bc9bba317571cf1124afe3e7a1643c8530b9ca..4f525cde69e863c353946a2fcac9d3af7ce1271c 100644 (file)
@@ -2,7 +2,7 @@
 A testcase which accesses *values* in a dll.
 """
 
-import imp
+import _imp
 import importlib.util
 import unittest
 import sys
@@ -81,7 +81,7 @@ class PythonValuesTestCase(unittest.TestCase):
                     self.assertIsNone(spec.submodule_search_locations)
 
         with import_helper.frozen_modules():
-            expected = imp._frozen_module_names()
+            expected = _imp._frozen_module_names()
         self.maxDiff = None
         self.assertEqual(modules, expected, "PyImport_FrozenModules example "
             "in Doc/library/ctypes.rst may be out of date")