devopshq / artifactory

dohq-artifactory: a Python client for Artifactory
https://devopshq.github.io/artifactory/
MIT License
269 stars 137 forks source link

dohq-artifactory doesn't work with Python 3.11.2 #415

Closed Morfeel closed 11 months ago

Morfeel commented 1 year ago

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'

ukuko commented 1 year ago

i can confirm it... we have to stick to python 3.10 so far.

allburov commented 1 year ago

Hi! Feel free to create PR to support new python version! Personally I don't have time but will review the changes asap

scorpion35 commented 1 year ago

@allburov I see 3.11 support was added while ago? Not sure if something else needs to be done?

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?

beliaev-maksim commented 1 year ago

@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

scorpion35 commented 1 year ago

@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

beliaev-maksim commented 1 year ago

@scorpion35 I think new python version added some validation for paths, where http URL is obviously not passing. We might want to debug and see how we can bypass the check

PribhuPatel commented 1 year ago

@beliaev-maksim There is a major change in pathlib Python library that also comes as a core Python package and it is breaking the file upload task to artifactory.

Issue in Python Issue portal: https://bugs.python.org/issue43012 Github repo MR in CPython: https://github.com/python/cpython/pull/25701

beliaev-maksim commented 1 year ago

@PribhuPatel do not think it is the issue. We already fixed it. Might be a different left over

https://github.com/devopshq/artifactory/pull/376

ktdreyer commented 11 months ago

I'm still seeing errors with Python 3.11.4 (Fedora 37). iterdir() and mkdir() fail with errors like FileNotFoundError

allburov commented 11 months ago

If anyone have time - please have a look at the issue, we're open for Pull Requests!

flichtenheld commented 11 months ago

If anyone have time - please have a look at the issue, we're open for Pull Requests!

Done. Please let me know what you think.