From 7160ef72279c1ca7c146363fa8fdea535d2825cc 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