Skip to content

Commit

Permalink
ArtifactoryPath: fix iterdir with Python 3.11
Browse files Browse the repository at this point in the history
On Python 3.11, pathlib's iterdir() calls directly to os.listdir(), so
it does not go through ArtifactoryAccessor.

Similar to commit 5278d06, override
iterdir() so that we call our own ArtifactoryPath implementation.
  • Loading branch information
ktdreyer authored and allburov committed Nov 2, 2023
1 parent ec2743e commit 7160ef7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions artifactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,8 @@ def __iter__(self):
continue
yield self._make_child_relpath(name)

iterdir = __iter__

def read_text(self, encoding=None, errors=None):
"""
Read file content
Expand Down

0 comments on commit 7160ef7

Please sign in to comment.