Skip to content

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

Open
@befeleme

Description

@befeleme
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions