-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Preliminary Python 3.13 compatibility #513
Conversation
Thanks, I think this works! |
Reverting as this is not actually necessary for tests to pass on Python 3.13. Did you have a specific issue with Python 3.13 that this is intended to solve and is not caught by the test suite, or were you talking about Python 3.14? |
I am actually one of the Ubuntu maintainers, and our automated testing shows that this project does not work under Python 3.13: https://autopkgtest.ubuntu.com/results/autopkgtest-plucky/plucky/amd64/p/python-argcomplete/20241120_101446_98775@/log.gz. From the issue you linked (#515), it looks like we have the exact same symptoms on Python 3.13 as well. |
From the looks of it, this also fixes #514 |
this patch fixes failures of downstream consumers https://cache.nixos.org/log/qzijsl88q4awdsk4w96b91zf9qmvykns-python3.12-traitlets-5.14.3.drv |
@liushuyu I am unable to reproduce the test failures on Python 3.13 that you are referencing. Issue #515 is about Python 3.14, which is not released yet. Can you give me an exact set of commands that I can use to reproduce on Python 3.13? @paparodeo this package does not support running tests using pytest; please try again while using unittest. |
Because Debian and Ubuntu usually cherry-pick updates from the Python release branch. However, you will be able to reproduce this issue using Python 3.12.8 and Python 3.13.1 (released 2 days ago) very soon.
|
That's great, thanks. Once I'm able to repro with 3.12.8/3.13.1 I will dig in and figure out what's going on, and will merge a variation of your fix. |
I have already did some initial investigations when submitting this pull request, the root cause is this: python/cpython@1fe63b1 |
@liushuyu thanks for linking that. argcomplete follows a particular philosophy when patching argparse. The patched class overrides as few functions as possible. Within those functions, it retains as much original code as possible, and clearly marks all code that was modified and the version of CPython standard library the code was copied from. The task now is for me to verify that the approach you are taking in your patch (overload |
the errors were caused by running the tests of the traitlets module which broke when python was updated to |
Thanks for your work on this @liushuyu. I pursued a slightly different and simpler approach, and released it in argcomplete v3.5.2 which should restore compatibility. |
Thank you for the fix! |
This pull request adds preliminary Python 3.13 compatibility. A new CI job for Python 3.13 is also added.