Merged
Conversation
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.
offa
approved these changes
Feb 21, 2025
Contributor
|
Confirming support for Python 3.8 through 3.13 with our library that makes extensive use of this, including unit tests 👍 |
* Add unit test for `glob()` and partially fix Python 3.13 case. * Add custom subclass of _Globber to fix remaining issues with glob behavior. * Guard _globber override with Python version check. Co-authored-by: allburov <allburov@gmail.com> * Rearrange `if` statement to prefer early returns. Co-authored-by: allburov <allburov@gmail.com> * Add comment linking to original code for recursive_selector(). --------- Co-authored-by: allburov <allburov@gmail.com>
Member
Author
|
Let's set the deadline for Python 3.13 to April 8. |
Contributor
|
Tested on Python 3.13 to 3.10; no issues on my use cases – deployment, search etc. works. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Fix #470