Bug 2056992 - python-prometheus_client fails to build with Python 3.11: ImportError: cannot import name 'getargspec' from 'inspect'
Summary: python-prometheus_client fails to build with Python 3.11: ImportError: cannot...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-prometheus_client
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-02-22 14:01 UTC by Tomáš Hrnčiar
Modified: 2022-06-16 20:28 UTC (History)
4 users (show)

Fixed In Version: python-prometheus_client-0.13.1-2.fc37
Clone Of:
Environment:
Last Closed: 2022-06-16 20:28:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-02-22 14:01:16 UTC
python-prometheus_client fails to build with Python 3.11.0a4.

==================================== ERRORS ====================================
_____________________ ERROR collecting tests/test_core.py ______________________
ImportError while importing test module '/builddir/build/BUILD/client_python-0.13.1/tests/test_core.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_core.py:13: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

Removed from the inspect module:
    the getargspec function, deprecated since Python 3.0; use inspect.signature() or inspect.getfullargspec() instead.
    the formatargspec function, deprecated since Python 3.5; use the inspect.signature() function and Signature object directly.
    the undocumented Signature.from_builtin and Signature.from_function functions, deprecated since Python 3.5; use the Signature.from_callable() method instead.

(Contributed by Hugo van Kemenade in bpo-45320.)

https://bugs.python.org/issue45320
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/03527598-python-prometheus_client/

For all our attempts to build python-prometheus_client with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-prometheus_client/

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.

Comment 1 Miro Hrončok 2022-06-16 20:20:17 UTC
This is coming from Fedora's downstream patch :/


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