Python3.11: test_method_spec_compat fails

Bug #1982851 reported by Cyril Roelandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.versionedobjects
Fix Released
Undecided
Unassigned

Bug Description

Using Python3.11:

oslo_versionedobjects.tests.test_fixture.TestMethodSpec.test_method_spec_compat ------------------------------------------------------------------------------- Captured traceback: ~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/home/cyril/tmp/openstack/repos/oslo.versionedobjects/oslo_versionedobjects/tests/test_fixture.py", line 760, in test_method_spec_compat self.assertEqual(inspect.ArgSpec(args=['a', 'b', 'kw1'], varargs=None, ^^^^^^^^^^^^^^^ AttributeError: module 'inspect' has no attribute 'ArgSpec'

This is because both inspect.getargspec and inspect.ArgSpec have been removed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.versionedobjects (master)
Changed in oslo.versionedobjects:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.versionedobjects (master)

Reviewed: https://review.opendev.org/c/openstack/oslo.versionedobjects/+/851036
Committed: https://opendev.org/openstack/oslo.versionedobjects/commit/2b1202938afad9ac174f86f1e6b2ec7a0bf5c743
Submitter: "Zuul (22348)"
Branch: master

commit 2b1202938afad9ac174f86f1e6b2ec7a0bf5c743
Author: Cyril Roelandt <email address hidden>
Date: Tue Jul 26 16:38:54 2022 +0200

    Python3.11: Do not use inspect.ArgSpec

    Python3.11 will remove inspect.ArgSpec and cause test failures on the
    CI.

    Closes-Bug: #1982851
    Change-Id: I4bc4ab6cfeb3d15072145aa093d3407f35ddf41e

Changed in oslo.versionedobjects:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.versionedobjects 3.0.1

This issue was fixed in the openstack/oslo.versionedobjects 3.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.