Bug 2034910 - python-verboselogs fails to build with Python 3.11: ImportError: cannot import name 'formatargspec' from 'inspect'
Summary: python-verboselogs fails to build with Python 3.11: ImportError: cannot impor...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-verboselogs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Scott K Logan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2021-12-22 13:24 UTC by Tomáš Hrnčiar
Modified: 2022-04-27 22:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-27 22:57:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-12-22 13:24:42 UTC
python-verboselogs fails to build with Python 3.11.0a3.


=================================== FAILURES ===================================
____________________ VerboseLogsTestCase.test_pylint_plugin ____________________

self = <verboselogs.tests.VerboseLogsTestCase testMethod=test_pylint_plugin>

    def test_pylint_plugin(self):
        """Test the :mod:`verboselogs.pylint` module."""
        saved_args = sys.argv
        try:
            sys.argv = ['pylint', '--load-plugins', 'verboselogs.pylint', '--errors-only', 'verboselogs']
>           __import__('pylint').run_pylint()

verboselogs/tests.py:69: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.11/site-packages/pylint/__init__.py:21: in run_pylint
    from pylint.lint import Run as PylintRun
/usr/lib/python3.11/site-packages/pylint/lint/__init__.py:76: in <module>
    from pylint.lint.parallel import check_parallel
/usr/lib/python3.11/site-packages/pylint/lint/parallel.py:8: in <module>
    from pylint import reporters
/usr/lib/python3.11/site-packages/pylint/reporters/__init__.py:26: in <module>
    from pylint import utils
/usr/lib/python3.11/site-packages/pylint/utils/__init__.py:46: in <module>
    from pylint.utils.ast_walker import ASTWalker
/usr/lib/python3.11/site-packages/pylint/utils/ast_walker.py:7: in <module>
    from astroid import nodes
/usr/lib/python3.11/site-packages/astroid/__init__.py:51: in <module>
    from astroid.nodes import node_classes, scoped_nodes
/usr/lib/python3.11/site-packages/astroid/nodes/__init__.py:27: in <module>
    from astroid.nodes.node_classes import (  # pylint: disable=redefined-builtin (Ellipsis)
/usr/lib/python3.11/site-packages/astroid/nodes/node_classes.py:47: in <module>
    from astroid import decorators, mixins, util
/usr/lib/python3.11/site-packages/astroid/decorators.py:27: in <module>
    import wrapt
/usr/lib64/python3.11/site-packages/wrapt/__init__.py:10: in <module>
    from .decorators import (adapter_factory, AdapterFactory, decorator,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    """This module implements decorators for implementing other decorators
    as well as some commonly used decorators.
    
    """
    
    import sys
    
    PY2 = sys.version_info[0] == 2
    
    if PY2:
        string_types = basestring,
    
        def exec_(_code_, _globs_=None, _locs_=None):
            """Execute code in a namespace."""
            if _globs_ is None:
                frame = sys._getframe(1)
                _globs_ = frame.f_globals
                if _locs_ is None:
                    _locs_ = frame.f_locals
                del frame
            elif _locs_ is None:
                _locs_ = _globs_
            exec("""exec _code_ in _globs_, _locs_""")
    
    else:
        string_types = str,
    
        import builtins
    
        exec_ = getattr(builtins, "exec")
        del builtins
    
    from functools import partial
>   from inspect import ismethod, isclass, formatargspec
E   ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

/usr/lib64/python3.11/site-packages/wrapt/decorators.py:34: ImportError
=========================== short test summary info ============================
FAILED verboselogs/tests.py::VerboseLogsTestCase::test_pylint_plugin - Import...
========================= 1 failed, 5 passed in 0.10s ==========================

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/03072396-python-verboselogs/

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

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

Comment 2 Scott K Logan 2022-04-27 22:57:36 UTC
I've dropped the pylint and astroid tests in rawhide. There is no reason to be running those tests in the RPM builds.


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