We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With #463 the library works on Python 3.12 (#430), but not on Python 3.13 yet:
AttributeError: module 'pathlib' has no attribute 'posixpath'. Did you mean: 'PosixPath'?
Reported location
Tested using master at 46728f6.
master
The text was updated successfully, but these errors were encountered:
While the posixpath issue is fixed very easily, the issues that follow are more complicated.
--- a/artifactory.py +++ b/artifactory.py @@ -33,6 +33,7 @@ import json import os import pathlib import platform +import posixpath import re import urllib.parse from itertools import chain @@ -444,7 +445,7 @@ class _ArtifactoryFlavour(object if IS_PYTHON_3_12_OR_NEWER else pathlib._Flavou sep = "/" altsep = "/" has_drv = True - pathmod = pathlib.posixpath + pathmod = posixpath is_supported = True def _get_base_url(self, url):
(The underlying issue here is the changed pathlib API, pathmod seems not to have any effect on the actual issue as long as it's valid code)
pathmod
Using this minimal example:
from artifactory import ArtifactoryPath path = ArtifactoryPath("https://mysite/artifactory") print(path)
I get correct results on Python <= 3.12:
https://mysite/artifactory
but a broken path on Python 3.13:
https:/mysite/artifactory ^^^ Note the missing '/'
This causes invalid URLs on subsequent usages, which eventually end in a type error ("TypeError: must be str, not NoneType"; see below)
Running this projects tests on Python 3.13 confirms broken paths and/or resulting errors:
[…] File "/home/runner/work/artifactory/artifactory/artifactory.py", line 707, in rest_get url = quote_url(url) File "/home/runner/work/artifactory/artifactory/artifactory.py", line 424, in quote_url quoted_path = requests.utils.quote(url.partition(parsed_url.host)[2]) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ TypeError: must be str, not NoneType […] AssertionError: 'http:/b/artifactory/reponame/path.txt' != 'http://b/artifactory/reponame/path.txt' - http:/b/artifactory/reponame/path.txt + http://b/artifactory/reponame/path.txt ? +
Sorry, something went wrong.
No branches or pull requests
With #463 the library works on Python 3.12 (#430), but not on Python 3.13 yet:
Reported location
Tested using
master
at 46728f6.The text was updated successfully, but these errors were encountered: