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

Implement zoneinfo support and make pytz optional #940

Merged
merged 7 commits into from Jan 11, 2023

Conversation

ds-cbo
Copy link
Contributor

@ds-cbo ds-cbo commented Jan 5, 2023

Fixes #716

Copy link
Member

@akx akx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! ❤️

Some change requests, a big one being that pytz should IMO be supported alongside zoneinfo and preferred where available for backward compatibility reasons.
I'm all ears if there's something I'm missing and that'd be a terrible idea. :D

babel/dates.py Outdated Show resolved Hide resolved
babel/dates.py Outdated Show resolved Hide resolved
babel/dates.py Outdated Show resolved Hide resolved
babel/dates.py Outdated Show resolved Hide resolved
babel/dates.py Show resolved Hide resolved
babel/localtime/_helpers.py Outdated Show resolved Hide resolved
docs/dev.rst Outdated Show resolved Hide resolved
docs/dates.rst Outdated Show resolved Hide resolved
docs/installation.rst Outdated Show resolved Hide resolved
tests/test_dates.py Outdated Show resolved Hide resolved
@ds-cbo ds-cbo requested a review from akx January 10, 2023 09:35
@akx akx added this to the Babel 2.12 milestone Jan 11, 2023
@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #940 (2a410e0) into master (53637dd) will decrease coverage by 1.25%.
The diff coverage is 65.76%.

@@            Coverage Diff             @@
##           master     #940      +/-   ##
==========================================
- Coverage   91.78%   90.53%   -1.26%     
==========================================
  Files          23       24       +1     
  Lines        4348     4395      +47     
==========================================
- Hits         3991     3979      -12     
- Misses        357      416      +59     
Impacted Files Coverage Δ
babel/localtime/__init__.py 62.16% <50.00%> (-1.00%) ⬇️
babel/localtime/_unix.py 30.76% <53.84%> (+6.63%) ⬆️
babel/localtime/_helpers.py 61.53% <61.53%> (ø)
babel/dates.py 85.08% <67.24%> (-7.37%) ⬇️
babel/localtime/_win32.py 62.96% <71.42%> (+0.69%) ⬆️
babel/support.py 85.09% <100.00%> (-0.06%) ⬇️
babel/util.py 97.32% <100.00%> (-0.03%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@akx akx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop pytz as a dependency
2 participants