[self-tests] tests.test_extension.TestExtensionProperties.test_extras fails with Python 3.10.3

Bug #1966040 reported by Stanislav Levin
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
stevedore
Fix Released
High
Stephen Finucane

Bug Description

With Python 3.10.3 this test fails:
```
==============================
Failed 1 tests - output below:
==============================

stevedore.tests.test_extension.TestExtensionProperties.test_extras
------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/usr/src/RPM/BUILD/stevedore-3.5.0/stevedore/tests/test_extension.py", line 278, in test_extras'
    b" self.assertEqual(['[extra]'], self.ext1.extras)"
    b' File "/usr/lib64/python3.10/unittest/case.py", line 845, in assertEqual'
    b' assertion_func(first, second, msg=msg)'
    b' File "/usr/lib64/python3.10/unittest/case.py", line 1051, in assertListEqual'
    b' self.assertSequenceEqual(list1, list2, msg, seq_type=list)'
    b' File "/usr/lib64/python3.10/unittest/case.py", line 1033, in assertSequenceEqual'
    b' self.fail(msg)'
    b' File "/usr/lib64/python3.10/unittest/case.py", line 675, in fail'
    b' raise self.failureException(msg)'
    b"AssertionError: Lists differ: ['[extra]'] != ['extra']"
    b''
    b'First differing element 0:'
    b"'[extra]'"
    b"'extra'"
    b''
    b"- ['[extra]']"
    b'? - -'
    b''
    b"+ ['extra']"
    b''
```

reason:
https://docs.python.org/3/whatsnew/changelog.html#id3
> bpo-47004: Apply bugfixes from importlib_metadata 4.11.3, including bugfix for EntryPoint.extras, which was returning match objects and not the extras strings.

importlib_metadata's ticket:
https://github.com/python/importlib_metadata/issues/369

summary: [self-tests] tests.test_extension.TestExtensionProperties.test_extras
- fails with Python3.10
+ fails with Python 3.10.3
Revision history for this message
Michał Górny (mgorny) wrote :

Ping.

Changed in python-stevedore:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Stephen Finucane (stephenfinucane)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stevedore (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/stevedore/+/856830

Changed in python-stevedore:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stevedore (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/stevedore/+/860391

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stevedore (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/stevedore/+/860393

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stevedore (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/stevedore/+/860395

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stevedore (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/stevedore/+/860397

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stevedore (master)

Reviewed: https://review.opendev.org/c/openstack/stevedore/+/856830
Committed: https://opendev.org/openstack/stevedore/commit/663d56c9535c64f4f8bd363abf69406975585ee9
Submitter: "Zuul (22348)"
Branch: master

commit 663d56c9535c64f4f8bd363abf69406975585ee9
Author: Stephen Finucane <email address hidden>
Date: Fri Sep 9 16:50:45 2022 +0100

    Fix compatibility with Python 3.10, 3.9.11

    A fix to 'importlib.metadata' in Python 3.10 [1], later backported to
    3.9 and released in 3.9.11 [2], has broken our tests. Fix them.

    [1] https://github.com/python/cpython/commit/b1e286860742e7ba6fadc75e3ddb6c2899a56919
    [2] https://github.com/python/cpython/commit/177be52517da9a876a3f9e670f88c4731b906986

    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-bug: #1966040
    Change-Id: Iff536d4f4267efbebc4be1e7e5da8a9fde39f79b

Changed in python-stevedore:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stevedore (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/stevedore/+/860391
Committed: https://opendev.org/openstack/stevedore/commit/2312415517cd5ded007127d21f75f78ff2f63f52
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 2312415517cd5ded007127d21f75f78ff2f63f52
Author: Stephen Finucane <email address hidden>
Date: Fri Sep 9 16:50:45 2022 +0100

    Fix compatibility with Python 3.10, 3.9.11

    A fix to 'importlib.metadata' in Python 3.10 [1], later backported to
    3.9 and released in 3.9.11 [2], has broken our tests. Fix them.

    [1] https://github.com/python/cpython/commit/b1e286860742e7ba6fadc75e3ddb6c2899a56919
    [2] https://github.com/python/cpython/commit/177be52517da9a876a3f9e670f88c4731b906986

    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-bug: #1966040
    Change-Id: Iff536d4f4267efbebc4be1e7e5da8a9fde39f79b
    (cherry picked from commit 663d56c9535c64f4f8bd363abf69406975585ee9)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stevedore (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/stevedore/+/860393
Committed: https://opendev.org/openstack/stevedore/commit/9c78134d7b2a3a355bb2ba155fe80382d375e3ab
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 9c78134d7b2a3a355bb2ba155fe80382d375e3ab
Author: Stephen Finucane <email address hidden>
Date: Fri Sep 9 16:50:45 2022 +0100

    Fix compatibility with Python 3.10, 3.9.11

    A fix to 'importlib.metadata' in Python 3.10 [1], later backported to
    3.9 and released in 3.9.11 [2], has broken our tests. Fix them.

    [1] https://github.com/python/cpython/commit/b1e286860742e7ba6fadc75e3ddb6c2899a56919
    [2] https://github.com/python/cpython/commit/177be52517da9a876a3f9e670f88c4731b906986

    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-bug: #1966040
    Change-Id: Iff536d4f4267efbebc4be1e7e5da8a9fde39f79b
    (cherry picked from commit 663d56c9535c64f4f8bd363abf69406975585ee9)
    (cherry picked from commit 2312415517cd5ded007127d21f75f78ff2f63f52)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stevedore (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/stevedore/+/860397
Committed: https://opendev.org/openstack/stevedore/commit/ab0135e09af9b36403532e86766ac0c89e8016ea
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit ab0135e09af9b36403532e86766ac0c89e8016ea
Author: Stephen Finucane <email address hidden>
Date: Fri Sep 9 16:50:45 2022 +0100

    Fix compatibility with Python 3.10, 3.9.11

    A fix to 'importlib.metadata' in Python 3.10 [1], later backported to
    3.9 and released in 3.9.11 [2], has broken our tests. Fix them.

    [1] https://github.com/python/cpython/commit/b1e286860742e7ba6fadc75e3ddb6c2899a56919
    [2] https://github.com/python/cpython/commit/177be52517da9a876a3f9e670f88c4731b906986

    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-bug: #1966040
    Change-Id: Iff536d4f4267efbebc4be1e7e5da8a9fde39f79b
    (cherry picked from commit 663d56c9535c64f4f8bd363abf69406975585ee9)
    (cherry picked from commit 2312415517cd5ded007127d21f75f78ff2f63f52)
    (cherry picked from commit 9c78134d7b2a3a355bb2ba155fe80382d375e3ab)
    (cherry picked from commit b006bcd083929145fe48ff3fdb3ca0732763924e)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/stevedore 4.0.1

This issue was fixed in the openstack/stevedore 4.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/stevedore 3.5.1

This issue was fixed in the openstack/stevedore 3.5.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/stevedore 3.3.2

This issue was fixed in the openstack/stevedore 3.3.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stevedore (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/stevedore/+/860395
Committed: https://opendev.org/openstack/stevedore/commit/52433382eed2e4f1783fe3a14813d2409b122d41
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 52433382eed2e4f1783fe3a14813d2409b122d41
Author: Stephen Finucane <email address hidden>
Date: Fri Sep 9 16:50:45 2022 +0100

    Fix compatibility with Python 3.10, 3.9.11

    A fix to 'importlib.metadata' in Python 3.10 [1], later backported to
    3.9 and released in 3.9.11 [2], has broken our tests. Fix them.

    [1] https://github.com/python/cpython/commit/b1e286860742e7ba6fadc75e3ddb6c2899a56919
    [2] https://github.com/python/cpython/commit/177be52517da9a876a3f9e670f88c4731b906986

    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-bug: #1966040
    Change-Id: Iff536d4f4267efbebc4be1e7e5da8a9fde39f79b
    (cherry picked from commit 663d56c9535c64f4f8bd363abf69406975585ee9)
    (cherry picked from commit 2312415517cd5ded007127d21f75f78ff2f63f52)
    (cherry picked from commit 9c78134d7b2a3a355bb2ba155fe80382d375e3ab)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/stevedore 4.1.0

This issue was fixed in the openstack/stevedore 4.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/stevedore 3.4.2

This issue was fixed in the openstack/stevedore 3.4.2 release.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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