Bug 2175815

Summary: python-ephem fails to build with Python 3.12: undefined symbol: PyUnicode_GET_SIZE
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-ephemAssignee: Fabian Affolter <mail>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: mail, mhroncok, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2135404    

Description Tomáš Hrnčiar 2023-03-06 15:24:49 UTC
python-ephem fails to build with Python 3.12.0a5.

==================================== ERRORS ====================================
____________________ ERROR collecting tests/test_angles.py _____________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_angles.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
____________________ ERROR collecting tests/test_bodies.py _____________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_bodies.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
____________________ ERROR collecting tests/test_cities.py _____________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_cities.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
___________________ ERROR collecting tests/test_constants.py ___________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_constants.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
_____________________ ERROR collecting tests/test_dates.py _____________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_dates.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
_________________ ERROR collecting tests/test_github_issues.py _________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_github_issues.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
______________________ ERROR collecting tests/test_jpl.py ______________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_jpl.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
_______________ ERROR collecting tests/test_launchpad_236872.py ________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_launchpad_236872.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
_______________ ERROR collecting tests/test_launchpad_244811.py ________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_launchpad_244811.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
____________________ ERROR collecting tests/test_locales.py ____________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_locales.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
___________________ ERROR collecting tests/test_observers.py ___________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_observers.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
___________________ ERROR collecting tests/test_rise_set.py ____________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_rise_set.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
______________________ ERROR collecting tests/test_rst.py ______________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_rst.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
___________________ ERROR collecting tests/test_satellite.py ___________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_satellite.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
_____________________ ERROR collecting tests/test_stars.py _____________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_stars.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
_____________________ ERROR collecting tests/test_usno.py ______________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_usno.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE
________________ ERROR collecting tests/test_usno_equinoxes.py _________________
ImportError while importing test module '/builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/tests/test_usno_equinoxes.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:124: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
__init__.py:5: in <module>
    import ephem._libastro as _libastro
E   ImportError: /builddir/build/BUILDROOT/python-ephem-4.1.3-4.fc39.x86_64/usr/lib64/python3.12/site-packages/ephem/_libastro.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyUnicode_GET_SIZE

Legacy Unicode APIs have 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/05574207-python-ephem/

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

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 Fedora Release Engineering 2023-08-16 07:10:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.