Bug 2264860 - python-tomlkit fails to build with Python 3.13: TypeError: Time.__init__() missing 2 required positional arguments: 'trivia' and 'raw'
Summary: python-tomlkit fails to build with Python 3.13: TypeError: Time.__init__() mi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-tomlkit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-02-19 10:36 UTC by Karolina Surma
Modified: 2024-05-22 16:30 UTC (History)
4 users (show)

Fixed In Version: python-tomlkit-0.12.4-3.fc41
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-22 16:30:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-tomlkit pull-request 15 0 None None None 2024-05-22 15:29:38 UTC
Github python-poetry tomlkit pull 349 0 None Merged fix: Test failures with Python 3.13.0a4: test_dates_behave_like_dates and test_times_behave_like_times 2024-05-22 12:10:53 UTC
Github sdispater tomlkit issues 333 0 None open Test failures with Python 3.13.0a4: test_dates_behave_like_dates and test_times_behave_like_times 2024-02-21 10:56:54 UTC

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.


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