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
Test failure with Cython 3 TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'cftime._cftime.DatetimeGregorian' #271
Comments
I've added python 3.11-devel to the github actions for ubuntu-latest, and all the tests pass (#274). |
Interesting. Maybe it's fixed in current master? Or there is some other difference between the pythons. Thanks for checking. |
It built 3.11.a5. Don't see any changes between 1.5.2 and 1.6.0 that would have affected how |
just made a 1.6.0 release, so you could try that... |
Using the Fedora test copr repo I still get the failure with 1.6.0:
|
These went away for a while, but no appear to have returned with the transition to Cython 3:
|
Please disregard my last comment. I've forgotten that pip does isolated builds, so it installed Cython-3 for the build x_x. |
Indeed I think we are also hitting errors related to this now in our upstream build in xarray (pydata/xarray#7977), likely because Cython 3.0.0 was officially released a couple weeks ago (previously it was in beta). Specifically we are seeing variants of this one (which appear in the test failures above):
This section of the migration guide for Cython 3 related to "Arithmetic special methods" seems potentially relevant. If I pin Cython to something less than version 3 in the build dependencies section of the |
#305 proposes a possible fix. |
Closed by PR #305 |
Thank you! I can confirm that this solves the problem for us. |
Bug: Unidata/cftime#271 Closes: https://bugs.gentoo.org/898668 Signed-off-by: Michał Górny <mgorny@gentoo.org>
See https://bugzilla.redhat.com/show_bug.cgi?id=2058169
Version 1.5.2 on Fedora rawhide with Python 3.11.0a5:
https://docs.python.org/3.11/whatsnew/3.11.html
For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03525898-python-cftime/
For all our attempts to build python-cftime with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-cftime/
Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/
Let us know here if you have any questions.
Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
The text was updated successfully, but these errors were encountered: