Bug 2093934

Summary: python-parsimonious fails to build with Python 3.11: ImportError: cannot import name 'getargspec' from 'inspect'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-parsimoniousAssignee: Alessio <alciregi>
Status: CLOSED RAWHIDE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: alciregi, 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: 2022-08-06 09:00:02 UTC 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: 2016048, 2045102, 2045109    

Description Tomáš Hrnčiar 2022-06-06 12:03:51 UTC
python-parsimonious fails to build with Python 3.11.0b3.

==================================== ERRORS ====================================
____________ ERROR collecting parsimonious/tests/test_benchmarks.py ____________
ImportError while importing test module '/builddir/build/BUILD/parsimonious-0.8.1/parsimonious/tests/test_benchmarks.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)
parsimonious/__init__.py:9: in <module>
    from parsimonious.grammar import Grammar, TokenGrammar
parsimonious/grammar.py:14: in <module>
    from parsimonious.expressions import (Literal, Regex, Sequence, OneOf,
parsimonious/expressions.py:9: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
___________ ERROR collecting parsimonious/tests/test_expressions.py ____________
ImportError while importing test module '/builddir/build/BUILD/parsimonious-0.8.1/parsimonious/tests/test_expressions.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)
parsimonious/__init__.py:9: in <module>
    from parsimonious.grammar import Grammar, TokenGrammar
parsimonious/grammar.py:14: in <module>
    from parsimonious.expressions import (Literal, Regex, Sequence, OneOf,
parsimonious/expressions.py:9: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
_____________ ERROR collecting parsimonious/tests/test_grammar.py ______________
ImportError while importing test module '/builddir/build/BUILD/parsimonious-0.8.1/parsimonious/tests/test_grammar.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)
parsimonious/__init__.py:9: in <module>
    from parsimonious.grammar import Grammar, TokenGrammar
parsimonious/grammar.py:14: in <module>
    from parsimonious.expressions import (Literal, Regex, Sequence, OneOf,
parsimonious/expressions.py:9: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
______________ ERROR collecting parsimonious/tests/test_nodes.py _______________
ImportError while importing test module '/builddir/build/BUILD/parsimonious-0.8.1/parsimonious/tests/test_nodes.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)
parsimonious/__init__.py:9: in <module>
    from parsimonious.grammar import Grammar, TokenGrammar
parsimonious/grammar.py:14: in <module>
    from parsimonious.expressions import (Literal, Regex, Sequence, OneOf,
parsimonious/expressions.py:9: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
=========================== short test summary info ============================
ERROR parsimonious/tests/test_benchmarks.py
ERROR parsimonious/tests/test_expressions.py
ERROR parsimonious/tests/test_grammar.py
ERROR parsimonious/tests/test_nodes.py
!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 4 errors in 0.12s ===============================
ERROR: InvocationError for command /usr/bin/py.test (exited with code 2)
___________________________________ summary ____________________________________
ERROR:   py311: commands failed

Removed from the inspect module:
    the getargspec function, deprecated since Python 3.0; use inspect.signature() or inspect.getfullargspec() instead.

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/04494215-python-parsimonious/

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

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-20 10:18:51 UTC
*** Bug 2099045 has been marked as a duplicate of this bug. ***

Comment 2 Miro Hrončok 2022-06-27 14:53:55 UTC
Hello,

This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 3 Miro Hrončok 2022-07-18 22:26:35 UTC
Hello,

This is the second reminder (step 4 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.