-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dohq-artifactory doesn't work with Python 3.11.2 #415
Comments
i can confirm it... we have to stick to python 3.10 so far. |
Hi! Feel free to create PR to support new python version! |
@allburov I see I am new to this library (and kinda new to Python as well). Any tips on what to check to help speed up the debugging of this issue? |
@scorpion35 if we you can provide an access to the staging env of artifactory we may have a look the problem is that we do not have access to artifactory instances to run the test |
Unfortunately it is a company instance. Don't want to go to jail for fixing a bug 😅 I don't have a personal one to provide access to 🙂 If you can give me some tips, I can debug. Am hoping this will be a good exercise for me to get to know Python and friends |
@scorpion35 |
@beliaev-maksim Issue in Python Issue portal: https://bugs.python.org/issue43012 |
@PribhuPatel do not think it is the issue. We already fixed it. Might be a different left over |
I'm still seeing errors with Python 3.11.4 (Fedora 37). |
If anyone have time - please have a look at the issue, we're open for Pull Requests! |
pathlib in Python 3.11 implements mkdir and rmdir directly in terms of calling os.<func> without any accessor layer. So copy the implementations of those functions from Python 3.10 to get the previous behavior back. Fixes: devopshq#415 Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Done. Please let me know what you think. |
* ArtifactoryPath: fix mkdir and rmdir with Python 3.11 pathlib in Python 3.11 implements mkdir and rmdir directly in terms of calling os.<func> without any accessor layer. So copy the implementations of those functions from Python 3.10 to get the previous behavior back. Fixes: #415 Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> * test_artifactory_path: Add basic unit test for mkdir() Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> * ArtifactoryPath: Fix glob() in Python 3.11 Python 3.11 replaced _accessor.scandir with _scandir. Override _scandir to still use our implementation. Should be a noop on older Python versions because they didn't have _scandir at all. Fixes: #396 Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> --------- Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
dohq-artifactory==0.8.2
python --version Python 3.11.2
issue happens when using function:
ArtifactoryPath(xxxxx).mkdir()
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\xxx\Source\xxx\venv\Scripts\invoke.exe_main.py", line 7, in
File "C:\Users\xxx\Source\xxx\venv\Lib\site-packages\invoke\program.py", line 380, in run
self.execute()
File "C:\Users\xxx\Source\xxx\venv\Lib\site-packages\invoke\program.py", line 565, in execute
executor.execute(*self.tasks)
File "C:\Users\xxx\Source\xxx\venv\Lib\site-packages\invoke\executor.py", line 127, in execute
result = call.task(*args, **call.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xx\Source\xxx\venv\Lib\site-packages\invoke\tasks.py", line 115, in call
result = self.body(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxx\Source\xxx\tasks.py", line 212, in publish
art_path.mkdir()
File "C:\Python311\Lib\pathlib.py", line 1116, in mkdir
os.mkdir(self, mode)
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'https://arti.sssss.com/test/100'
The text was updated successfully, but these errors were encountered: