Description
Feature or enhancement
Right now none of our build bots test zoneinfo
with tzdata
pypi package installed.
Proof: https://github.com/python/cpython/pull/99602/files#diff-7908b1930bd1135d6f8077ef5ff578b02577f5f7042b54be88b9b86b6c7af45dR27-R35
Link to the package: https://pypi.org/project/tzdata/
However, it works locally:
(.venv) ~/Desktop/cpython issue-99508 ✔
» pip install tzdata
Collecting tzdata
Using cached tzdata-2022.6-py2.py3-none-any.whl (338 kB)
Installing collected packages: tzdata
Successfully installed tzdata-2022.6
(.venv) ~/Desktop/cpython issue-99508 ✔
» python
Python 3.12.0a2+ (heads/main:a3360facba, Nov 19 2022, 14:10:54) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import importlib.metadata
>>> importlib.metadata.metadata("tzdata")
<importlib.metadata._adapters.Message object at 0x107d5df50>
But, presence / absence of this 3rd party package change the behavior of zoneinfo
module: both C
and Python
versions of it.
So, we need to be sure that tests can check all combinations.
Risks
Right now we don't have 3rd party packages installed for tests.
This might cause quite a lot of problems: where / how / when to install it.
It also can affect test / buildbot stability, because pip
sometimes just fails to install some packages and you have to retry.
Pitch
I think we should test with tzdata
PyPI package installed on at least one buildbot / CI job.
The question is: how can we do it without compromising the CI setup and reliability?
Previous discussion
- PEP 615: Add zoneinfo module #84683 (comment)
- gh-96463: fix
load_tzdata
raisingOSError
, not `ZoneInfoNotFound… #99602 - ZoneInfo object raises OSError instead of ZoneInfoNotFoundError for timezone input larger than 255 characters #96463
CC @pganssle