You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing Hypothesis with Python 3.11.0a3, I've triggered a frustrating regression in importlib.resources:
# Both work in Python 3.9 and 3.10, but both fail in 3.11.0a3fromimportlib.resourcesimportfiles, read_textread_text("hypothesis.vendor", "tlds-alpha-by-domain.txt")
files("hypothesis.vendor").joinpath("tlds-alpha-by-domain.txt").read_text()
Traceback (most recent call last):
...
File "example.py", line 4, in <module>
read_text("hypothesis.vendor", "tlds-alpha-by-domain.txt")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "python3.11/importlib/_legacy.py", line 25, in wrapperreturn func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "python3.11/importlib/_legacy.py", line 67, in read_textwith open_text(package, resource, encoding, errors) as fp:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "python3.11/importlib/_legacy.py", line 25, in wrapperreturn func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "python3.11/importlib/_legacy.py", line 50, in open_textreturn (_common.files(package) / _common.normalize_path(resource)).open(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "python3.11/importlib/_adapters.py", line 141, in openraiseFileNotFoundError("Can't open orphan path")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^FileNotFoundError: Can't open orphan path
At first I thought this was just a problem with the _legacy shims, but since it also affects the new files() API it might be more serious.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: