FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Bug]: Recent date conversion error in CI · Issue #32521 · matplotlib/matplotlib · GitHub

Repository navigation

[Bug]: Recent date conversion error in CI #32521

Closed

Description

Bug summary

E.g. in

Possibly related to pandas 3.1 been released today (https://github.com/pandas-dev/pandas/releases/tag/v3.1.0)

Code for reproduction

CI run

Actual outcome

___________________________ test_date2num_dst_pandas ___________________________
[gw0] linux -- Python 3.11.17 /opt/hostedtoolcache/Python/3.11.17/x64/bin/python

pd = <module 'pandas' from '/opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages/pandas/__init__.py'>

    def test_date2num_dst_pandas(pd):
        # Test for github issue #3896, but in date2num around DST transitions
        # with a timezone-aware pandas date_range object.
    
        def tz_convert(*args):
            return pd.DatetimeIndex.tz_convert(*args).astype(object)
    
>       _test_date2num_dst(pd.date_range, tz_convert)

lib/matplotlib/tests/test_dates.py:1063: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/matplotlib/tests/test_dates.py:983: in _test_date2num_dst
    dt_bxl = tz_convert(dt_utc, BRUSSELS)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/matplotlib/tests/test_dates.py:1061: in tz_convert
    return pd.DatetimeIndex.tz_convert(*args).astype(object)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages/pandas/core/indexes/base.py:1159: in astype
    new_values = values.astype(dtype, copy=copy)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages/pandas/core/arrays/datetimes.py:764: in astype
    return dtl.DatetimeLikeArrayMixin.astype(self, dtype, copy)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.11.17/x64/lib/python3.11/site-packages/pandas/core/arrays/datetimelike.py:474: in astype
    converted = ints_to_pydatetime(
pandas/_libs/tslibs/vectorized.pyx:124: in pandas._libs.tslibs.vectorized.ints_to_pydatetime
    ???
pandas/_libs/tslibs/tzconversion.pyx:91: in pandas._libs.tslibs.tzconversion.Localizer.__cinit__
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   AttributeError: 'NoneType' object has no attribute 'total_seconds'

pandas/_libs/tslibs/timezones.pyx:475: AttributeError

Expected outcome

No error.

Additional information

No response

Operating system

No response

Matplotlib Version

main

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

None

Activity

  1. iccir commented on Oct 22, 2026

    Contributor
  2. QuLogic commented on Oct 22, 2026

    Member

    It may soon be time to consider moving forward on #17538.

  3. added this to the v3.11.3 milestone on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL