Bug 2095033 - python-mox3 fails to build with Python 3.11: AttributeError: module 'inspect' has no attribute 'getargspec'
Summary: python-mox3 fails to build with Python 3.11: AttributeError: module 'inspect'...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-mox3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Bezdicka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2099012 (view as bug list)
Depends On:
Blocks: PYTHON3.11 F37FTBFS F37FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2022-06-08 20:11 UTC by Miro Hrončok
Modified: 2022-06-28 10:01 UTC (History)
7 users (show)

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


Attachments (Terms of Use)

Description Miro Hrončok 2022-06-08 20:11:26 UTC
python-mox3 fails to build with Python 3.11.0b3.


Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/builddir/build/BUILD/mox3-1.1.0/mox3/tests/test_mox.py", line 1779, in testStubOutMethod_Unbound_NamedUsingPositional
    mox_helper.ExampleClass.NamedParams(instance, 'foo', baz=None)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      File "/builddir/build/BUILD/mox3-1.1.0/mox3/mox.py", line 812, in __call__
    mock_method = self._CreateMockMethod('__call__', method_to_mock=method)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      File "/builddir/build/BUILD/mox3-1.1.0/mox3/mox.py", line 623, in _CreateMockMethod
    return super(MockObject, self)._CreateMockMethod(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      File "/builddir/build/BUILD/mox3-1.1.0/mox3/mox.py", line 495, in _CreateMockMethod
    return MockMethod(method_name, self._expected_calls_queue,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      File "/builddir/build/BUILD/mox3-1.1.0/mox3/mox.py", line 1086, in __init__
    self._checker = MethodSignatureChecker(method_to_mock,
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      File "/builddir/build/BUILD/mox3-1.1.0/mox3/mox.py", line 909, in __init__
    self._args, varargs, varkw, defaults = inspect.getargspec(method)
                                           ^^^^^^^^^^^^^^^^^^

    AttributeError: module 'inspect' has no attribute 'getargspec'


See from https://docs.python.org/3.11/whatsnew/3.11.html#removed

Removed from the inspect module:

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





For the build logs, see:
https://download.copr.fedorainfracloud.org/results/@python/python3.11/fedora-rawhide-x86_64/04497156-python-mox3/

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

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/@python/python3.11/

Comment 1 Miro Hrončok 2022-06-09 13:06:25 UTC
Upstream says "This project is no longer maintained." maybe we shouldn't be using it then.


$ repoquery -q --repo=rawhide{,-source} --whatrequires python3-mox3
exaile-0:4.1.1-7.fc36.src
python-keystoneauth1-0:4.5.0-1.fc37.src

Comment 2 Miro Hrončok 2022-06-09 13:11:42 UTC
keystoneauth1 does not need this: https://src.fedoraproject.org/rpms/python-keystoneauth1/pull-request/1

Exaile still uses this though.

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

Comment 4 Miro Hrončok 2022-06-27 14:54:13 UTC
Hello,

This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 5 Miro Hrončok 2022-06-28 10:01:28 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 37.

Thanks for taking care of it!


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