Skip to content
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

DEPR: deprecate pytz support #46463

Open
jbrockmendel opened this issue Mar 21, 2022 · 2 comments
Open

DEPR: deprecate pytz support #46463

jbrockmendel opened this issue Mar 21, 2022 · 2 comments
Labels
Dependencies Required and optional dependencies Deprecate Functionality to remove in pandas Timezones Timezone data dtype

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Mar 21, 2022

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.

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 21, 2022
@lithomas1 lithomas1 added Timezones Timezone data dtype Deprecate Functionality to remove in pandas Dependencies Required and optional dependencies and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 23, 2022
@jbrockmendel
Copy link
Member Author

@MarcoGorelli want to try to get something here for 2.2?

@MarcoGorelli
Copy link
Member

I've had a new project come in at work so I don't think I have capacity to focus on this I'm afraid, I'm prioritising pdep6-related issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Required and optional dependencies Deprecate Functionality to remove in pandas Timezones Timezone data dtype
Projects
None yet
Development

No branches or pull requests

3 participants