Bug 2345522

Summary: 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'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: yt-dlpAssignee: Maxwell G <maxwell>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: alekcejk, edpil02, fti-bugs, ksurma, maxwell, mhroncok, mikel, sniventals
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yt-dlp-2025.06.09-3.fc43 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-06-18 14:14:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2322407, 2339432, 2339435    

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.