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

ENH: Explicitly opt out of pytz support #60025

Open
1 of 3 tasks
davetapley opened this issue Oct 13, 2024 · 1 comment
Open
1 of 3 tasks

ENH: Explicitly opt out of pytz support #60025

davetapley opened this issue Oct 13, 2024 · 1 comment
Labels
Enhancement Needs Info Clarification about behavior needed to assess issue Timezones Timezone data dtype

Comments

@davetapley
Copy link
Contributor

davetapley commented Oct 13, 2024

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I wish I could explicitly opt out of using pytz with pandas, even if another library (APScheduler in my case) uses it as a dependency.

APScheduler is due to also drop pytz requirement in future, but I'd like to get ahead now.

Feature Description

Patch here to

pytz = import_optional_dependency("pytz", errors="ignore")

cdef tzinfo utc_pytz = pytz.UTC if pytz else None

Alternative Solutions

N/A

Additional Context

@davetapley davetapley added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 13, 2024
@rhshadrach
Copy link
Member

Thanks for the request. From

https://pandas.pydata.org/docs/dev/whatsnew/v3.0.0.html#pytz-now-an-optional-dependency

it is my understanding that in 3.0 you should not be getting pytz objects unless you are explicitly using them. So I'm not sure what it'd mean to "explicitly opt out of pytz". Can you clarify?

@rhshadrach rhshadrach added Timezones Timezone data dtype Needs Info Clarification about behavior needed to assess issue and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Needs Info Clarification about behavior needed to assess issue Timezones Timezone data dtype
Projects
None yet
Development

No branches or pull requests

2 participants