Bug 2021889 - grammalecte fails to build with Python 3.11: ImportError: cannot import name 'getargspec' from 'inspect'
Summary: grammalecte fails to build with Python 3.11: ImportError: cannot import name...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: grammalecte
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mohamed El Morabity
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2021856
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2021-11-10 12:00 UTC by Tomáš Hrnčiar
Modified: 2022-06-22 11:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-22 11:49:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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