Bug 2094014

Summary: python-autograd fails to build with Python 3.11: ImportError: cannot import name 'getargspec' from 'inspect'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-autogradAssignee: Ben Beasley <code>
Status: CLOSED RAWHIDE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: adebola786, code, mhroncok, neuro-sig, 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-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:    
Bug Blocks: 2016048    

Description Tomáš Hrnčiar 2022-06-06 14:42:36 UTC
python-autograd fails to build with Python 3.11.0b3.


==================================== ERRORS ====================================
____________________ ERROR collecting autograd/test_util.py ____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/autograd/test_util.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)
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
__________________ ERROR collecting tests/test_binary_ops.py ___________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_binary_ops.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)
tests/test_binary_ops.py:4: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
___________________ ERROR collecting tests/test_builtins.py ____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_builtins.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)
tests/test_builtins.py:1: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
____________________ ERROR collecting tests/test_complex.py ____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_complex.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)
tests/test_complex.py:2: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
_____________________ ERROR collecting tests/test_core.py ______________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_core.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)
tests/test_core.py:5: in <module>
    from autograd.core import make_vjp
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
_____________________ ERROR collecting tests/test_dict.py ______________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_dict.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)
tests/test_dict.py:1: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
____________________ ERROR collecting tests/test_direct.py _____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_direct.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)
tests/test_direct.py:6: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
______________________ ERROR collecting tests/test_fft.py ______________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_fft.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)
tests/test_fft.py:3: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
____________________ ERROR collecting tests/test_graphs.py _____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_graphs.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)
tests/test_graphs.py:2: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
___________________ ERROR collecting tests/test_jacobian.py ____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_jacobian.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)
tests/test_jacobian.py:2: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
____________________ ERROR collecting tests/test_linalg.py _____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_linalg.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)
tests/test_linalg.py:4: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
_____________________ ERROR collecting tests/test_list.py ______________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_list.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)
tests/test_list.py:1: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
_____________________ ERROR collecting tests/test_logic.py _____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_logic.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)
tests/test_logic.py:5: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
_____________________ ERROR collecting tests/test_misc.py ______________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_misc.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)
tests/test_misc.py:1: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
_____________________ ERROR collecting tests/test_numpy.py _____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_numpy.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)
tests/test_numpy.py:4: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
__________________ ERROR collecting tests/test_scalar_ops.py ___________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_scalar_ops.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)
tests/test_scalar_ops.py:2: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
__________________ ERROR collecting tests/test_systematic.py ___________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_systematic.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)
tests/test_systematic.py:2: in <module>
    import autograd.numpy.random as npr
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
_____________________ ERROR collecting tests/test_tests.py _____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_tests.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)
tests/test_tests.py:1: in <module>
    from autograd.tracer import primitive, getval
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
____________________ ERROR collecting tests/test_truediv.py ____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_truediv.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)
tests/test_truediv.py:5: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
_____________________ ERROR collecting tests/test_tuple.py _____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_tuple.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)
tests/test_tuple.py:3: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
____________________ ERROR collecting tests/test_vspaces.py ____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_vspaces.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)
tests/test_vspaces.py:2: in <module>
    from autograd.core import vspace
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
___________________ ERROR collecting tests/test_wrappers.py ____________________
ImportError while importing test module '/builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_wrappers.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)
tests/test_wrappers.py:5: in <module>
    import autograd.numpy as np
autograd/__init__.py:2: in <module>
    from .differential_operators import (
autograd/differential_operators.py:5: in <module>
    from inspect import getargspec
E   ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)
=============================== warnings summary ===============================
tests/test_scipy.py:10
  /builddir/build/BUILD/autograd-e12041cc230188342688fd7426e885fd7e7e9f48/tests/test_scipy.py:10: UserWarning: Skipping scipy tests.
    warn('Skipping scipy tests.')

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR autograd/test_util.py
ERROR tests/test_binary_ops.py
ERROR tests/test_builtins.py
ERROR tests/test_complex.py
ERROR tests/test_core.py
ERROR tests/test_dict.py
ERROR tests/test_direct.py
ERROR tests/test_fft.py
ERROR tests/test_graphs.py
ERROR tests/test_jacobian.py
ERROR tests/test_linalg.py
ERROR tests/test_list.py
ERROR tests/test_logic.py
ERROR tests/test_misc.py
ERROR tests/test_numpy.py
ERROR tests/test_scalar_ops.py
ERROR tests/test_systematic.py
ERROR tests/test_tests.py
ERROR tests/test_truediv.py
ERROR tests/test_tuple.py
ERROR tests/test_vspaces.py
ERROR tests/test_wrappers.py
!!!!!!!!!!!!!!!!!!! Interrupted: 22 errors during collection !!!!!!!!!!!!!!!!!!!
======================== 1 warning, 22 errors in 0.57s =========================

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

https://bugs.python.org/issue?@action=redirect&bpo=45320
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/04494684-python-autograd/

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

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 2 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.

Comment 3 Red Hat Bugzilla 2023-09-15 01:55:34 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days