Bug 2345522 - yt-dlp fails to build with Python 3.14: TestTraversal.test_traversal_morsel: AssertionError: `...` should yield all values: Left contains one more item: 'item_value'
Summary: yt-dlp fails to build with Python 3.14: TestTraversal.test_traversal_morsel: ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yt-dlp
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Maxwell G
QA Contact:
URL:
Whiteboard:
: 2372243 (view as bug list)
Depends On:
Blocks: PYTHON3.14 F43FTBFS F43FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2025-02-13 11:30 UTC by Karolina Surma
Modified: 2025-06-18 14:14 UTC (History)
8 users (show)

Fixed In Version: yt-dlp-2025.06.09-3.fc43
Clone Of:
Environment:
Last Closed: 2025-06-18 14:14:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github yt-dlp yt-dlp issues 13452 0 None open Tests fail on Python 3.14 2025-06-11 17:47:58 UTC

Description Karolina Surma 2025-02-13 11:30:22 UTC
yt-dlp fails to build with Python 3.14.05.

_____________________ TestTraversal.test_traversal_morsel ______________________

self = <test.test_traversal.TestTraversal object at 0x7fdfdd8b4d40>

    def test_traversal_morsel(self):
        values = {
            'expires': 'a',
            'path': 'b',
            'comment': 'c',
            'domain': 'd',
            'max-age': 'e',
            'secure': 'f',
            'httponly': 'g',
            'version': 'h',
            'samesite': 'i',
        }
        morsel = http.cookies.Morsel()
        morsel.set('item_key', 'item_value', 'coded_value')
        morsel.update(values)
        values['key'] = 'item_key'
        values['value'] = 'item_value'
    
        for key, value in values.items():
            assert traverse_obj(morsel, key) == value, \
                'Morsel should provide access to all values'
>       assert traverse_obj(morsel, ...) == list(values.values()), \
            '`...` should yield all values'
E       AssertionError: `...` should yield all values
E       assert ['a', 'b', 'c...'e', 'f', ...] == ['a', 'b', 'c...'e', 'f', ...]
E         
E         At index 9 diff: '' != 'item_key'
E         Left contains one more item: 'item_value'
E         
E         Full diff:
E           [
E               'a',...
E         
E         ...Full output truncated (12 lines hidden), use '-vv' to show

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08651171-yt-dlp/

For all our attempts to build yt-dlp with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/yt-dlp/

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.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
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 Karolina Surma 2025-06-11 16:07:25 UTC
*** Bug 2372243 has been marked as a duplicate of this bug. ***

Comment 2 edpil02 2025-06-18 08:06:19 UTC
There is an upstream patc merged  yesterday.

[test] traversal: Fix morsel tests for Python 3.14 #13471

Comment 3 Fedora Update System 2025-06-18 14:11:40 UTC
FEDORA-2025-4832e2934b (yt-dlp-2025.06.09-3.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-4832e2934b

Comment 4 Fedora Update System 2025-06-18 14:14:00 UTC
FEDORA-2025-4832e2934b (yt-dlp-2025.06.09-3.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


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