Bug 2155427 - python-giacpy fails to build with Python 3.12: error: _PyUnicode_Ready was not declared in this scope
Summary: python-giacpy fails to build with Python 3.12: error: _PyUnicode_Ready was no...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-giacpy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Antonio T. sagitter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2155702
Blocks: PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2022-12-21 08:47 UTC by Tomáš Hrnčiar
Modified: 2023-01-20 10:50 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-01-20 10:50:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-12-21 08:47:51 UTC
python-giacpy fails to build with Python 3.12.0a3.

giacpy/giacpy.cpp:595:51: error: ‘_PyUnicode_Ready’ was not declared in this scope; did you mean ‘PyUnicode_READY’?
  595 |                                               0 : _PyUnicode_Ready((PyObject *)(op)))
      |                                                   ^~~~~~~~~~~~~~~~

Leagcy Unicode APIs has been removed. See PEP 623 for detail.
        PyUnicode_WCHAR_KIND
        PyUnicode_AS_UNICODE()
        PyUnicode_AsUnicode()
        PyUnicode_AsUnicodeAndSize()
        PyUnicode_AS_DATA()
        PyUnicode_FromUnicode()
        PyUnicode_GET_SIZE()
        PyUnicode_GetSize()
        PyUnicode_GET_DATA_SIZE()

https://docs.python.org/3.12/whatsnew/3.12.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05128847-python-giacpy/

For all our attempts to build python-giacpy with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/python-giacpy/

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.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
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.

Comment 1 Frederic Han 2022-12-26 15:55:37 UTC
Indeed but the file giacpy.cpp is created by cython. Deleting it and recythonzing with python3.12 didn't help me with pip version of cython, but with this fix I was able to built giacpy.

 
https://github.com/cython/cython/commit/b4595a04a78b79dc59276a9f64aab7b884e945e8

Comment 2 Tomáš Hrnčiar 2023-01-20 10:50:20 UTC
I patched Cython and this error is fixed although another error causing failures also on rawhide. I won't bugzilla for that because relengs will open it automatically after the mass rebuild is finished.


Note You need to log in before you can comment on or make changes to this bug.