Bug 2022396 - powerline fails to build with Python 3.11: sphinx.errors.ExtensionError: Could not import extension powerline_autodoc (exception: cannot import name 'formatargspec' from 'inspect'
Summary: powerline fails to build with Python 3.11: sphinx.errors.ExtensionError: Coul...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: powerline
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christoph Erhardt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2098782 (view as bug list)
Depends On:
Blocks: PYTHON3.11 F37FTBFS F37FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2021-11-11 14:51 UTC by Tomáš Hrnčiar
Modified: 2022-06-23 10:39 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-06-23 10:39:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-11-11 14:51:41 UTC
powerline fails to build with Python 3.11.0a2.


Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/sphinx/registry.py", line 429, in load_extension
    mod = import_module(extname)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 897, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILD/powerline-2.8.2/docs/source/powerline_autodoc.py", line 6, in <module>
    from inspect import formatargspec
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/sphinx/application.py", line 237, in __init__
    self.setup_extension(extension)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/sphinx/application.py", line 393, in setup_extension
    self.registry.load_extension(self, extname)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/sphinx/registry.py", line 432, in load_extension
    raise ExtensionError(__('Could not import extension %s') % extname,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sphinx.errors.ExtensionError: Could not import extension powerline_autodoc (exception: cannot import name 'formatargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py))

Extension error:
Could not import extension powerline_autodoc (exception: cannot import name 'formatargspec' 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_callable 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/02939398-powerline/

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

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:28:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Christoph Erhardt 2022-05-28 13:32:13 UTC
Opened upstream bug report: https://github.com/powerline/powerline/issues/2209

Comment 3 Miro Hrončok 2022-06-20 10:15:59 UTC
*** Bug 2098782 has been marked as a duplicate of this bug. ***

Comment 4 Christoph Erhardt 2022-06-22 05:46:39 UTC
I'm working on it.

Comment 5 Christoph Erhardt 2022-06-22 20:19:35 UTC
Upstream pull request: https://github.com/powerline/powerline/pull/2212

Comment 6 Christoph Erhardt 2022-06-23 10:29:30 UTC
Patch was accepted upstream; building patched package for rawhide.

Comment 7 Christoph Erhardt 2022-06-23 10:39:23 UTC
Fixed with https://bodhi.fedoraproject.org/updates/FEDORA-2022-5f97cebf45.


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