Bug 2021889

Summary: grammalecte fails to build with Python 3.11: ImportError: cannot import name 'getargspec' from 'inspect'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: grammalecteAssignee: Mohamed El Morabity <pikachu.2014>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: mhroncok, pikachu.2014, thrnciar, tir.karthi
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-06-22 11:49:14 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: 2021856    
Bug Blocks: 2016048    

Description Tomáš Hrnčiar 2021-11-10 12:00:40 UTC
grammalecte fails to build with Python 3.11.0a2.

This looks like an error in bottle.

======================================================================
ERROR: bottle (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: bottle
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/loader.py", line 132, in loadTestsFromName
    module = __import__(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/grammalecte-2.1.2/python/grammalecte/bottle.py", line 43, in <module>
    from inspect import getargspec
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)


----------------------------------------------------------------------
Ran 14 tests in 46.619s

FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=14 errors=1 failures=0>
Tests with expected errors: 5507  and suggestions: 5497 > 99.82 %
error: Test failed: <unittest.runner.TextTestResult run=14 errors=1 failures=0>

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

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/02939957-grammalecte/

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

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 Ben Cotton 2022-02-08 21:30:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Karthikeyan Singaravelan 2022-06-22 05:50:03 UTC
This seems to be due to vendored bottle code that was updated in https://github.com/Pofilo/grammalecte/commit/0c96e89c28a7d61af10d20ad96b5e03904cac407

Comment 3 Miro Hrončok 2022-06-22 11:49:14 UTC
Closing this in bulk as it built with Python 3.11. If this needs to remain open for a followup, feel free to reopen, I won't close in bulk again.