Bug 2264860

Summary: python-tomlkit fails to build with Python 3.13: TypeError: Time.__init__() missing 2 required positional arguments: 'trivia' and 'raw'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-tomlkitAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, maxwell, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tomlkit-0.12.4-3.fc41 python-tomlkit-0.13.2-1.el10_0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-22 16:30:31 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: 2244836    

Description Karolina Surma 2024-02-19 10:36:06 UTC
python-tomlkit fails to build with Python 3.13.0a4.

=================================== FAILURES ===================================
_________________________ test_dates_behave_like_dates _________________________

    def test_dates_behave_like_dates():
        i = item(date(2018, 7, 22))
    
        assert i == date(2018, 7, 22)
        assert i.as_string() == "2018-07-22"
    
        i += timedelta(days=1)
>       assert i == datetime(2018, 7, 23)
E       assert Date(2018, 7, 23) == datetime.datetime(2018, 7, 23, 0, 0)
E        +  where datetime.datetime(2018, 7, 23, 0, 0) = datetime(2018, 7, 23)

tests/test_items.py:692: AssertionError
_________________________ test_times_behave_like_times _________________________

    def test_times_behave_like_times():
        i = item(time(12, 34, 56))
    
        assert i == time(12, 34, 56)
        assert i.as_string() == "12:34:56"
    
>       i = i.replace(hour=13)

tests/test_items.py:726: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Time(12, 34, 56), args = (), kwargs = {'hour': 13}

    def replace(self, *args: Any, **kwargs: Any) -> time:
>       return self._new(super().replace(*args, **kwargs))
E       TypeError: Time.__init__() missing 2 required positional arguments: 'trivia' and 'raw'

tomlkit/items.py:1071: TypeError
=========================== short test summary info ============================
FAILED tests/test_items.py::test_dates_behave_like_dates - assert Date(2018, ...
FAILED tests/test_items.py::test_times_behave_like_times - TypeError: Time.__...
======================== 2 failed, 851 passed in 3.36s =========================

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07033909-python-tomlkit/

For all our attempts to build python-tomlkit with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-tomlkit/

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

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 2024-02-21 10:56:54 UTC
Issue upstream: https://github.com/sdispater/tomlkit/issues/333

Comment 2 Miro Hrončok 2024-05-22 12:10:53 UTC
Patch to backport: https://github.com/python-poetry/tomlkit/pull/349

Comment 3 Miro Hrončok 2024-05-22 15:29:38 UTC
Fedora PR: https://src.fedoraproject.org/rpms/python-tomlkit/pull-request/15

Comment 4 Fedora Update System 2024-05-22 16:25:56 UTC
FEDORA-2024-5ef4a0b62c (python-tomlkit-0.12.4-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-5ef4a0b62c

Comment 5 Fedora Update System 2024-05-22 16:30:31 UTC
FEDORA-2024-5ef4a0b62c (python-tomlkit-0.12.4-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2024-08-20 12:06:05 UTC
FEDORA-EPEL-2024-6607147707 (python-tomlkit-0.13.2-1.el10_0) has been submitted as an update to Fedora EPEL 10.0.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-6607147707

Comment 7 Fedora Update System 2024-08-21 02:52:26 UTC
FEDORA-EPEL-2024-6607147707 has been pushed to the Fedora EPEL 10.0 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-6607147707

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-08-22 01:53:22 UTC
FEDORA-EPEL-2024-6607147707 (python-tomlkit-0.13.2-1.el10_0) has been pushed to the Fedora EPEL 10.0 stable repository.
If problem still persists, please make note of it in this bug report.