Skip to content

DEPR: deprecate pytz support #46463

Open
Open
@jbrockmendel

Description

@jbrockmendel

We've already agreed on changing the defaults from pytz to stdlib/zoneinfo objects in 2.0. I'm now thinking we should go even further and deprecate support for pytz objects altogether. We wouldn't necessarily have to raise, but do something like

def disallow_pytz(tzinfo tz):
     if is_pytz_tzinfo(tz):
         return corresponding_zoneinfo(tz)
    return tz

The upshot of this is that we could remove a bunch of cython code that is pytz-specific. From there we would be able to de-duplicate conversion._localize_tso with tzconversion.tz_convert_from_utc_single.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DependenciesRequired and optional dependenciesDeprecateFunctionality to remove in pandasTimezonesTimezone data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions