Skip to content

TST: don't fail on systems with tzdata backzone enabled #51486

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

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

rebecca-palmer
Copy link
Contributor

test_dst.py specifies Africa/Kinshasa but expects a transition date (AmbiguousTimeError) that is actually for Africa/Lagos. On systems that enable tzdata's backzone file (which Debian and Ubuntu unstable now do), these are different, and the test hence fails (log).

This makes the obvious fix.

@MarcoGorelli MarcoGorelli self-requested a review February 19, 2023 19:23
@rebecca-palmer
Copy link
Contributor Author

The Windows timeout seems to be something that "randomly" happens (see other recent failures). Maybe we should increase the timeout, or if that's too expensive, run only a subset of tests there?

@simonjayhawkins simonjayhawkins added Testing pandas testing functions or related to the test suite Timezones Timezone data dtype labels Feb 22, 2023
@MarcoGorelli
Copy link
Member

Thanks @rebecca-palmer

No objections to merging, would just appreciate it if you explain the issue a little more

Is it that Africa/Kinshasa is erroneously raising AmbiguousTimeError for 1905-07-01, and that it shouldn't be doing so, so you're replacing it with Africa/Lagos, which correctly raises AmbiguousTimeError for that date?

thanks!

raspbian-autopush pushed a commit to raspbian-packages/pandas that referenced this pull request Mar 1, 2023
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/1031437
Forwarded: pandas-dev/pandas#51486


Gbp-Pq: Name 1031437.patch
@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Mar 26, 2023
@MarcoGorelli
Copy link
Member

gentle ping (would much appreciate a little explanation of why this is necessary, I couldn't follow it from the link)

@rebecca-palmer
Copy link
Contributor Author

Africa/Lagos has a transition, and hence the AmbiguousTimeError the test checks for, on that date.

On systems without backzone enabled, Africa/Kinshasa is a copy of Africa/Lagos (because they're the same timezone since before 1970(?)), and also does that.

However, on systems with backzone enabled, Africa/Kinshasa has its own timezone history, which doesn't have a transition on that date. This causes the test to fail on such systems.

This fixes this by instead using Africa/Lagos in the test.

@MarcoGorelli MarcoGorelli added this to the 2.1 milestone Mar 29, 2023
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Makes sense - thanks @rebecca-palmer !

@MarcoGorelli MarcoGorelli merged commit 70e8474 into pandas-dev:main Mar 29, 2023
raspbian-autopush pushed a commit to raspbian-packages/pandas that referenced this pull request Dec 19, 2023
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/1031437
Forwarded: pandas-dev/pandas#51486


Gbp-Pq: Name 1031437.patch
raspbian-autopush pushed a commit to raspbian-packages/pandas that referenced this pull request Dec 19, 2023
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/1031437
Forwarded: pandas-dev/pandas#51486


Gbp-Pq: Name 1031437.patch
raspbian-autopush pushed a commit to raspbian-packages/pandas that referenced this pull request Feb 6, 2024
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/1031437
Forwarded: pandas-dev/pandas#51486


Gbp-Pq: Name 1031437.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants