aleaxit / gmpy

General Multi-Precision arithmetic for Python 2.6+/3+ (GMP, MPIR, MPFR, MPC)
https://gmpy2.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
516 stars 87 forks source link

Please make a non-preview release with Python 3.12 support — thank you! #475

Closed hartwork closed 3 months ago

hartwork commented 5 months ago

Hello gmpy! :wave:

Linux distros are already patching Python 3.12 support into 2.1.5, e.g. Gentoo and Void apply patch https://raw.githubusercontent.com/tornaria/void-packages/722b32aa405804b79a74256708de6a511e255b4b/srcpkgs/python3-gmpy2/patches/cleanup-object-caching.patch downstream to unblock Python 3.12. pip install gmpy2 remains broken for Python 3.12 however, and as a result Python 3.12 support of reverse dependencies like https://github.com/badkeys/badkeys is broken when installed through pip, directly. Is there a chance for a non-preview release with Python 3.12 support? Even a backport to 2.1.x a la 2.1.6 could improve the situation, if feasible. What do you think?

Best, Sebastian

CC @hannob

iyanmv commented 5 months ago

Arch Linux has Python 3.12 now in testing repositories, I guess in some days it will arrive to the stable repos. They have patched the package providing gmpy2 to work with Python 3.12, but this will be an issue for users creating virtual envs that require gmpy2.

casevh commented 5 months ago

I have created a branch for 2.1.6 with the necessary patches for Python 3.12 and 3.13. It will only be a source-only release. I want to release 2.2.0rc1 with binary wheels at the same time.

skirpichev commented 5 months ago

The gmpy2-2.1.6 also has CI build failures. I think, it will be not so difficult to solve: we just need to update build images and include/exclude some CPython versions from the build_wheels.yml. Does it make sense for you, @casevh? Or not worth it?

casevh commented 5 months ago

It would take me some time to recreate the environment that I used for the Windows builds. It used mingw64 for the entire build process. That required hacking of distutils. I would rather focus on 2.2.0.

skirpichev commented 5 months ago

Fix for gmpy2-2.1.6 branch: https://github.com/aleaxit/gmpy/pull/479

skirpichev commented 5 months ago

@casevh, let me know if I can help more with new releases.

hannob commented 3 months ago

Any progress here?

I'm developing a tool that uses gmpy2 as a dependency, and I'm getting regular reports about python 3.12 issues that I have no way of solving (see e.g. https://github.com/badkeys/badkeys/issues/26 ).

If the windows builds are blocking a new release, can you at least make a new release for the unix plattforms? That's better than nothing, and likely already covers many use cases.

casevh commented 3 months ago

I have uploaded gmpy2 2.2.0rc1. Please test and I'll make a official release soon.

skirpichev commented 3 months ago

CI tests with rc1:

@oscarbenjamin, maybe it worth to run SymPy tests with gmpy2>=2.2.0rc1?

hannob commented 3 months ago

FWIW, I update badkeys' CI to test with 2.2.0rc1, and all tests passed. https://github.com/badkeys/badkeys/commit/a96c68dc9e5f2d2f8a39d2641d5c651fe956b0b5

oscarbenjamin commented 3 months ago

maybe it worth to run SymPy tests with gmpy2>=2.2.0rc1?

All good with the SymPy test suite. Thanks for the ping.

skirpichev commented 3 months ago

Ok. Maybe I miss something, but it seems - pre-release versions of the gmpy2 aren't tested in SymPy CI.

paddyroddy commented 3 months ago

2.2.0rc1 worked for SLEPLET

oscarbenjamin commented 3 months ago

pre-release versions of the gmpy2 aren't tested in SymPy CI.

I tested locally but I have also now opened https://github.com/sympy/sympy/pull/26699 to add testing in CI.

paddyroddy commented 3 months ago

What's the next steps?

casevh commented 3 months ago

I have published gmpy2 2.2.0.

hartwork commented 3 months ago

Thank you! Closing as fixed… (please re-open if there is need to, just trying to help)

oscarbenjamin commented 3 months ago

Thanks all. Everything seems to be working great with gmpy 2.2.0.

Hopefully with everything setup in CI now it will be easier when Python 3.13 comes around.