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

Fix for #990 #1006

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix for #990 #1006

wants to merge 2 commits into from

Conversation

mdklatt
Copy link

@mdklatt mdklatt commented Jun 1, 2023

This PR:

All checks are passing except for some unrelated and previously-broken tests:

  • [doctest] babel.dates.format_time
  • [doctest] babel.dates.get_timezone_name

Need some working tests before attempting to fix python-babel#990.

Refs python-babel#990
In certain OS installations, the target of /etc/localtime contains
double slashes. This is a valid path, but not a valid zoneinfo key.
This fix replaces `os.readlink` with `os.path.realpath`, which is
guaranteed to return a normalized path.

Fixes python-babel#990
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #1006 (deebeb2) into master (95a0ea8) will decrease coverage by 1.34%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1006      +/-   ##
==========================================
- Coverage   90.90%   89.57%   -1.34%     
==========================================
  Files          25       25              
  Lines        4356     4356              
==========================================
- Hits         3960     3902      -58     
- Misses        396      454      +58     
Impacted Files Coverage Δ
babel/localtime/_unix.py 30.76% <100.00%> (ø)

... and 8 files with indirect coverage changes

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

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.

Crash with double-slashes in /etc/localtime on Python 3.9
1 participant