From 849ddeacb8c8426f1036925bbaa34fd625f0851d Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Tue, 31 Oct 2023 06:09:23 -0400 Subject: [PATCH] ArtifactoryPath: fix iterdir with Python 3.11 On Python 3.11, pathlib's iterdir() calls directly to os.listdir(), so it does not go through ArtifactoryAccessor. Similar to commit 5278d0686671c8dea0401a21c2d40b04d3e0ffb5, override iterdir() so that we call our own ArtifactoryPath implementation. --- artifactory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/artifactory.py b/artifactory.py index bef94cb..12a51f1 100755 --- a/artifactory.py +++ b/artifactory.py @@ -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