-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Add support for Python 3.13 #1695
Conversation
Since 3.13.0a1 it has been renamed to PyInterpreterStateGet() Source: python/cpython#106321
The textual representation of addresses has changed, adapt the code to expect different values on Python 3.13+. See: python/cpython@f22bf8e3cf899896cf587099d292
Thank you very much for the MR! It would actually be good to add 3.13 to the test grid. According to the python action docs, the version supported are in the versions-manifest.json, and it seems that Could you please try to add it to the grid? Just for Linux is fine. You can use any Postgres version you prefer: copying the same used in Python 3.11, or stretching the postgres range (you might see that there's a version missing because there are currently 6 tested Python version with 7 postgres versions, so we can close the gap and test them 1:1). |
I added 3.13 to tox.ini and github CI config file. |
Thank you for this! There are a few other places to touch up: the classifiers in Lines 47 to 61 in a971c11
which reminds to update I can deal with the website once merged. Thank you very much! |
The tests don't seem to pass. There is a mismatch between tox and github afaics: https://github.com/psycopg/psycopg2/actions/runs/8828621201 |
Could you rerun the tests? I redefined Python version in the config files to |
Hmmm... there's still a mismatch between tox and github. I think something similar was solved in the past, for instance see this commment: 5fb1305 However, TBH, I am happy to drop support for tox. In the past it was useful, but now it's just a pain in the proverbial. I think the Do you want to try with these changes? |
Ok, another, hopefully the last attempt - I tested it on my fork and all should pass. I don't feel brave enough to reconfigure the whole CI, so I'll leave it to your consideration. |
That's ok, I appreciate your help. I'll look into doing some cleanup to the pipeline if tox gets in the way. |
Any idea when this will be available on pypi? I have a beta release of the Roundup Issue Tracker in a couple of weeks and a 2.4.0 release Thanks. |
It will be available on PyPI only after final release of 3.13. |
Ah sorry. Thought you did alpha/beta releases on pypi. Oh well. I guess PostgreSQL testing for 3.13 will have to |
Merging this branch, thank you for your contribution. We will need to set up build, and I already know that there is some bitrot in the build infrastructure. |
what's the fix for this ? ImportError: Error relocating /app/venv/lib/python3.13/site-packages/psycopg2/_psycopg.cpython-313-x86_64-linux-musl.so: _PyInterpreterState_Get: symbol not found |
@aftermatch1320 even after we will have merged this branch, binary files for Python 3.13 will not be available until Appveyor will have provided Windows runner. This usually takes a few week after the final release of a new major version. If you want to use psycopg on Python 3.13 on windows right now you can use psycopg 3 instead. |
See individual commits.
I don't have all the bits to run tests, but I used these changes to build psycopg2 in Fedora and tests with Python 3.13 passed.
It would probably be good to add 3.13 to CI, but I'm not sure about the desired version matrix, so haven't done any changes there.
Related to #1692.