% ./python.exe -We -m test -v test_importlib
== CPython 3.12.0a0 (heads/main:caa2a9799a, Aug 25 2022, 18:44:45) [Clang 13.1.6 (clang-1316.0.21.2.5)]
== macOS-12.5.1-x86_64-i386-64bit little-endian
== cwd: /Users/iritkatriel/src/cpython-1/build/test_python_32671æ
== CPU count: 12
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 2.89 Run tests sequentially
0:00:00 load avg: 2.89 [1/1] test_importlib
Failed to import test module: test.test_importlib.test_abc
Traceback (most recent call last):
File "/Users/iritkatriel/src/cpython-1/Lib/unittest/loader.py", line 385, in _find_test_path
module = self._get_module_from_name(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/iritkatriel/src/cpython-1/Lib/unittest/loader.py", line 328, in _get_module_from_name
__import__(name)
File "/Users/iritkatriel/src/cpython-1/Lib/test/test_importlib/test_abc.py", line 323, in <module>
class ResourceReaderDefaultsTests(ABCTestHarness):
File "/Users/iritkatriel/src/cpython-1/Lib/test/test_importlib/test_abc.py", line 325, in ResourceReaderDefaultsTests
SPLIT = make_abc_subclasses(ResourceReader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/iritkatriel/src/cpython-1/Lib/test/test_importlib/test_abc.py", line 131, in make_abc_subclasses
base = {kind: getattr(splitabc, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/iritkatriel/src/cpython-1/Lib/test/test_importlib/test_abc.py", line 131, in <dictcomp>
base = {kind: getattr(splitabc, name)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/iritkatriel/src/cpython-1/Lib/importlib/abc.py", line 35, in __getattr__
warnings._deprecated(f"{__name__}.{name}", remove=(3, 14))
File "/Users/iritkatriel/src/cpython-1/Lib/warnings.py", line 514, in _deprecated
warn(msg, DeprecationWarning, stacklevel=3)
DeprecationWarning: 'importlib.abc.ResourceReader' is deprecated and slated for removal in Python 3.14
The text was updated successfully, but these errors were encountered:
I'll approve the PR, but I wonder if it wouldn't be better to fix the root cause by importing from importlib.resources.abc.ResourceReader? I haven't looked at the code, but maybe that's difficult if make_abc_subclasses() is generic.
iritkatriel
added
stale
Stale PR or inactive for long period of time.
stdlib
Python modules in the Lib dir
and removed
stale
Stale PR or inactive for long period of time.
labels
Aug 26, 2022
In #93963, I'm dealing with the deprecation (and ultimate removal). My recommendation there is to simply remove these tests. I'm closing this one in favor of #93963.
iritkatriel commentedAug 25, 2022
The text was updated successfully, but these errors were encountered: