Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
On a fresh install:
~/Desktopλpython3.11-Xwarn_default_encodingPython3.11.8 (main,Feb62024,21:21:21) [Clang15.0.0 (clang-1500.1.0.2.5)]ondarwinType"help","copyright","credits"or"license"formoreinformation.>>>importzoneinfo;zoneinfo.available_timezones()...
afterpython3.11 -m pip install tzdata:
~/Desktopλpython3.11-Xwarn_default_encodingPython3.11.8 (main,Feb62024,21:21:21) [Clang15.0.0 (clang-1500.1.0.2.5)]ondarwinType"help","copyright","credits"or"license"formoreinformation.>>>importzoneinfo;zoneinfo.available_timezones()/opt/homebrew/Cellar/python@3.11/3.11.8/Frameworks/Python.framework/Versions/3.11/lib/python3.11/zoneinfo/_tzpath.py:121:EncodingWarning:'encoding'argumentnotspecified
I tested python 3.10 (no), 3.11 (yes), 3.12 (yes), and 3.13 (yes).
This occurs because.open("r") does not specify an encoding here:
try:withresources.files("tzdata").joinpath("zones").open("r")asf:forzoneinf:zone=zone.strip()ifzone:valid_zones.add(zone)except (ImportError,FileNotFoundError):pass
CPython versions tested on:
3.11
Operating systems tested on:
macOS
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Done