Bug 2027343 - python-traitlets fails to build with Python 3.11: AssertionError: 'red' != 'Color.red'
Summary: python-traitlets fails to build with Python 3.11: AssertionError: 'red' != 'C...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-traitlets
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2021-11-29 12:54 UTC by Tomáš Hrnčiar
Modified: 2022-04-25 08:17 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-04-25 08:17:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-11-29 12:54:29 UTC
python-traitlets fails to build with Python 3.11.0a2.

=================================== FAILURES ===================================
________________ TestUseEnum.test_assign_scoped_enum_value_name ________________

self = <traitlets.tests.test_traitlets_enum.TestUseEnum testMethod=test_assign_scoped_enum_value_name>

    def test_assign_scoped_enum_value_name(self):
        # -- CONVERT: string => Enum value (item)
        scoped_names = ["Color.red", "Color.green", "Color.blue", "Color.yellow"]
        for value in scoped_names:
            example = self.Example()
            example.color = value
            self.assertIsInstance(example.color, Color)
>           self.assertEqual(str(example.color), value)
E           AssertionError: 'red' != 'Color.red'
E           - red
E           + Color.red

example    = <traitlets.tests.test_traitlets_enum.TestUseEnum.Example object at 0x7eff12ab2a40>
scoped_names = ['Color.red', 'Color.green', 'Color.blue', 'Color.yellow']
self       = <traitlets.tests.test_traitlets_enum.TestUseEnum testMethod=test_assign_scoped_enum_value_name>
value      = 'Color.red'

traitlets/tests/test_traitlets_enum.py:90: AssertionError
============================= slowest 10 durations =============================
0.01s call     traitlets/tests/test_traitlets.py::TestTraitType::test_deprecated_metadata_access
0.01s call     traitlets/tests/test_traitlets.py::TestTraitType::test_deprecated_method_warnings

(8 durations < 0.005s hidden.  Use -vv to show these durations.)
=========================== short test summary info ============================
FAILED traitlets/tests/test_traitlets_enum.py::TestUseEnum::test_assign_scoped_enum_value_name
======================== 1 failed, 398 passed in 2.57s =========================

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/02992642-python-traitlets/

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

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

Comment 2 Tomáš Hrnčiar 2022-04-25 08:17:07 UTC
Recent builds in COPR started to pass so I am closing this.

https://copr.fedorainfracloud.org/coprs/g/python/python3.11/build/4305109/


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