-
Notifications
You must be signed in to change notification settings - Fork 159
Closed
Labels
BugHelp WantedWe will be glad if somebody proposes a solution via PRWe will be glad if somebody proposes a solution via PR
Description
The glob method is broken in python 3.11. I've tested the same code in 3.10.8 and all is fine, but looks like things have changed in 3.11...
from artifactory import ArtifactoryPath
rt_path = ArtifactoryPath(MY_ARTIFACTORY_PATH, apikey=MY_APIKEY)
print(len([p for p in rt_path])) # all fine, but glob blows up...
next(rt_path.glob('**/manifest.json'))
Traceback (most recent call last):
File "/src/./bug.py", line 9, in <module>
next(rt_path.glob('**/manifest.json'))
File "/usr/local/lib/python3.11/pathlib.py", line 953, in glob
for p in selector.select_from(self):
File "/usr/local/lib/python3.11/pathlib.py", line 407, in _select_from
for starting_point in self._iterate_directories(parent_path, is_dir, scandir):
File "/usr/local/lib/python3.11/pathlib.py", line 386, in _iterate_directories
with scandir(parent_path) as scandir_it:
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/pathlib.py", line 938, in _scandir
return os.scandir(self)
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'my path set above ^^'
brot and dkmiller
Metadata
Metadata
Assignees
Labels
BugHelp WantedWe will be glad if somebody proposes a solution via PRWe will be glad if somebody proposes a solution via PR