Skip to content

Test failures with Python 3.14: segfault and AssertionErrors in test_local_time_positive_integer/test_local_time_negative_integer #900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 tasks done
befeleme opened this issue May 21, 2025 · 0 comments
Labels

Comments

@befeleme
Copy link

  • I am on the latest Pendulum version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: Fedora Linux 43

  • Pendulum version: 3.1.0

Issue

Hi, I'm trying to build pendulum for Fedora Linux with Python 3.14.0b1.
I see two issues happening there.

test_from_format results in Segmentation fault for two parameters:

        ("1234567890", "X", "2009-02-13T23:31:30+00:00", None),
        ("1234567890123", "x", "2009-02-13T23:31:30.123000+00:00", None),

When removed these, the test suite runs successfully, but with two more failures:

__________________________________________ test_local_time_positive_integer ___________________________________________

    def test_local_time_positive_integer():
        d = pendulum.datetime(2016, 8, 7, 12, 34, 56, 123456)
    
        t = local_time(d.int_timestamp, 0, d.microsecond)
>       assert d.year == t[0]
E       AssertionError: assert 2016 == 8
E        +  where 2016 = DateTime(2016, 8, 7, 12, 34, 56, 123456, tzinfo=Timezone('UTC')).year

tests/helpers/test_local_time.py:12: AssertionError
__________________________________________ test_local_time_negative_integer ___________________________________________

    def test_local_time_negative_integer():
        d = pendulum.datetime(1951, 8, 7, 12, 34, 56, 123456)
    
        t = local_time(d.int_timestamp, 0, d.microsecond)
>       assert d.year == t[0]
E       AssertionError: assert 1951 == 8
E        +  where 1951 = DateTime(1951, 8, 7, 12, 34, 56, 123456, tzinfo=Timezone('UTC')).year
@ashb ashb added the bug label May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants