fedora-eln / eln

Main repository and issue tracker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TASK: fix Python 3.12 FTBFS in ELN packages

yselkowitz opened this issue · comments

What does the ELN SIG need to do?

The Python 3.12 mass rebuild is about to be merged into rawhide, which will trigger the same in ELN. However, as of the time of merging, there are still packages which FTBFS with Python 3.12. Those that are in the ELN package set need to be fixed quickly so as to not disrupt the forthcoming CentOS Stream 10 import.

Details: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/BI3TYWJFMSCW4RMWI3FUYPRWZWWI4G7E/

pythran is only pulled into ELN by scipy and scipy has been rebuilt without pythran first. a WIP PR is at https://src.fedoraproject.org/rpms/pythran/pull-request/25 but it is not yet fully functional.

pythran fixed

@hroncok the following Python 3.12 issues remain with the ELN package set:

  • pyodbc: uses obsolete PyUnicode APIs removed in 3.12:
  In file included from src/pyodbc.h:172,
                   from src/buffer.cpp:12:
  src/pyodbccompat.h: In function ‘PyObject* Text_New(Py_ssize_t)’:
  src/pyodbccompat.h:75:12: error: ‘PyUnicode_FromUnicode’ was not declared in this scope; did you mean ‘PyUnicode_FromString’?
     75 |     return PyUnicode_FromUnicode(0, length);
        |            ^~~~~~~~~~~~~~~~~~~~~
        |            PyUnicode_FromString
  src/pyodbccompat.h: In function ‘Py_UNICODE* Text_Buffer(PyObject*)’:
  src/pyodbccompat.h:86:12: error: ‘PyUnicode_AS_UNICODE’ was not declared in this scope; did you mean ‘PyUnicode_AsUCS4’?
     86 |     return PyUnicode_AS_UNICODE(o);
        |            ^~~~~~~~~~~~~~~~~~~~
        |            PyUnicode_AsUCS4
  src/pyodbccompat.h: In function ‘Py_ssize_t Text_Size(PyObject*)’:
  src/pyodbccompat.h:126:40: error: ‘PyUnicode_GET_SIZE’ was not declared in this scope; did you mean ‘PyDict_GET_SIZE’?
    126 |     return (o && PyUnicode_Check(o)) ? PyUnicode_GET_SIZE(o) : 0;
        |                                        ^~~~~~~~~~~~~~~~~~
        |                                        PyDict_GET_SIZE
  src/pyodbccompat.h: In function ‘Py_ssize_t TextCopyToUnicode(Py_UNICODE*, PyObject*)’:
  src/pyodbccompat.h:146:26: error: ‘PyUnicode_GET_SIZE’ was not declared in this scope; did you mean ‘PyDict_GET_SIZE’?
    146 |         Py_ssize_t cch = PyUnicode_GET_SIZE(o);
        |                          ^~~~~~~~~~~~~~~~~~
        |                          PyDict_GET_SIZE
  src/pyodbccompat.h:147:24: error: ‘PyUnicode_AS_UNICODE’ was not declared in this scope; did you mean ‘PyUnicode_AsUCS4’?
    147 |         memcpy(buffer, PyUnicode_AS_UNICODE(o), cch * sizeof(Py_UNICODE));
        |                        ^~~~~~~~~~~~~~~~~~~~
        |                        PyUnicode_AsUCS4
  error: command '/usr/bin/gcc' failed with exit code 1
  error: subprocess-exited-with-error
  • sudo: crash during %check in plugins/python

Carrying over remaining failures to #153