-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Consider testing zoneinfo
with tzdata
PyPI package installed
#99649
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
Comments
In general, I dislike that Python test suite depends on an external resources. It makes tests more error prone :-( Is it possible to mock the 3rd party tzdata package in tests? |
Yes, me too. I guess this can also set a bad precedent: other 3rd-party libs can be added after that as well.
I was thinking about something similar. Maybe storing some old version of it in No idea how hard it would be, because I've never seen what's inside |
I'm not talking about an hypothetical issue. For 3 weeks, I'm getting tons of email because some buildbots fail to download data from unicode.org, and so test_unicodedata fails randomly. I qualify these issues as "network issue". It happens a lot. Browse https://mail.python.org/archives/list/buildbot-status@python.org/ and search for "test_unicodedata". Example: https://buildbot.python.org/all/#/builders/662/builds/960
|
As per my reply in #99602 (comment), we don't need the |
PR #19909 added However, PRs #25679 and #30257 removed those CI files, so Should we install it as part of another GitHub Actions workflow? (Replies on this issue suggest not.) Should we remove it? |
Yes, let's remove |
@sobolevn do you think adding a test for I think we should add a test for |
Feature or enhancement
Right now none of our build bots test
zoneinfo
withtzdata
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:
But, presence / absence of this 3rd party package change the behavior of
zoneinfo
module: bothC
andPython
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
load_tzdata
raisingOSError
, not `ZoneInfoNotFound… #99602CC @pganssle
The text was updated successfully, but these errors were encountered: