Skip to content

Conversation

@jamesjer
Copy link
Contributor

The Fedora project is building all python packages with an alpha version of python 3.10, in an attempt to find and fix problems in advance of the python 3.10 release. The cypari2 package fails to build because Py_SIZE(x) is no longer an lvalue. A macro that sets the size appropriately by python version is available in Cython 0.29.20 and later: __Pyx_SET_SIZE(x).

@jamesjer
Copy link
Contributor Author

For the record, the change to make Py_SIZE not an lvalue proved too disruptive. It has been reverted for now, so the current code should continue to work with python 3.10. This change is still correct, however, and will be needed eventually, just not as soon as I thought.

@kliem
Copy link
Collaborator

kliem commented May 20, 2022

Sorry, I opened another pull request and while I thought I had seen something like this before, I couldn't find it (I was looking in issues only). It seems you provided exactly the fix that I was looking for and you solution is much simpler than mine.

@jamesjer
Copy link
Contributor Author

No problem at all. I'm glad this approach is useful.

@videlec
Copy link
Collaborator

videlec commented May 21, 2022

I don't like so much depending on Cython>=0.29.20. Ubuntu 20.04 (LTS) ships 0.29.14, see https://packages.ubuntu.com/focal/cython.

@kliem
Copy link
Collaborator

kliem commented May 21, 2022

If this is the only problem, we can instead depend on cython 0.29: https://github.com/cython/cython/blob/0.29/Cython/Includes/cpython/longintrepr.pxd

and just copy the corresponding function as in my approach #115.

@kliem
Copy link
Collaborator

kliem commented Sep 22, 2022

@videlec Can you please comment on how you wish to proceed.

@videlec
Copy link
Collaborator

videlec commented Sep 22, 2022

Any approach that works on all Cython versions >= 0.29.14 would fit.

@kliem kliem mentioned this pull request Oct 1, 2022
@kliem
Copy link
Collaborator

kliem commented Oct 3, 2022

Included in #120.

@kliem kliem closed this Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants