Skip to content
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

Python 3.13 compatability #474

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Python 3.13 compatability #474

wants to merge 2 commits into from

Conversation

allburov
Copy link
Member

Feature branch for Python 3.13 support: https://github.com/devopshq/artifactory/tree/python-3-13
Please run tests with your code (how you use it) and if you find a bug (and the fix, ideally) - create a PR there.
When it's stable enough - we'll merge and release it

pip install git+https://github.com/devopshq/artifactory@python-3-13

Fix #470

Between Python 3.12 and Python 3.13, the internal structure of pathlib
changed, causing the Artifactory URL parsing to fail. `pathlib.PurePath`
previously had a private class attribute, `_flavour`, which has now been
renamed to `parser` and made into a public and documented API.

This renames `_flavour` to `parser` in the ArtifactoryPath subclasses,
but it leaves around a `_flavour` class attribute that is aliased to
`parser` as a compatibility shim for older versions of Python.

One other breakage between Python 3.12 and 3.13 is that the artifactory
package attempted to import `posixpath` via the `pathlib` package.
`posixpath` was never meant to be a publicly accessible attribute of
`pathlib`, as `posixpath` is its own top-level package in the standard
library. The `pathlib` code was significantly restructured, causing the
`posixpath` module to no longer be accessible under `pathlib`. We fix
this in artifactory by directly importing the top-level `posixpath`
package.

Finally, this adds Python 3.13 to the package metadata in setup.py and
the tox and GitHub Actions configuration files so that it is officially
declared as a supported Python version and tested in CI.
Copy link
Contributor

@offa offa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some basic testing with Python 3.9 - 3.13. Also all of my reported issues work now with 3.13. 👍

@Stealthii
Copy link
Contributor

Confirming support for Python 3.8 through 3.13 with our library that makes extensive use of this, including unit tests 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.13 compatibility
4 participants