pandas
pandas copied to clipboard
DEPS/TST: tzdata is optional, not required
- [ ] closes #47332 (Replace xxxx with the Github issue number)
- [ ] Tests added and passed if fixing a bug or adding a new feature
- [ ] All code checks passed.
- [ ] Added type annotations to new arguments/methods/functions.
- [ ] Added an entry in the latest
doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.
OK, this works now. We should probably specify a minimum tzdata version too, though.
@jbrockmendel Do you have anything in mind?
no idea, cc @pganssle ?
seems fine, does this need backport?
We should probably specify a minimum tzdata version too, though.
My 2c is might as well have the min version be the latest available version since this is a new feature.
does this need backport?
Don't think so since ZoneInfo support will be new for 1.5.
does this need backport?
Don't think so since
ZoneInfosupport will be new for 1.5.
correct. the failures were only on nightlies (main). 1.4.x is passing tests (or was when I last run the build test which is running again now ready for release https://github.com/MacPython/pandas-wheels/pull/173)
Zoneinfo is also kinda wonky, since it doesn't really need the tzdata package, just a copy of the IANA tz database. I'm not sure we have a way to check the version of the IANA tz database, though.
Zoneinfo is also kinda wonky, since it doesn't really need the tzdata package, just a copy of the IANA tz database. I'm not sure we have a way to check the version of the IANA tz database, though.
I don't think we should necessarily runtime check tzdata in pandas, but it would be good to state that the minimum version we test with tzdata=2022.1
This is blocking #47442, so we should probably merge this now, and open an issue to discuss tzdata version, since there is not yet enough consensus on that.
IMO setting tzdata=2022.1 should be okay for now.
OK, so I've updated this PR again. It's too difficult/costly to check the version of the system IANA tz db if present, so we're just going to specify a minimum version.
If tzdata is installed, though, the minimum version will be enforced through a warning, even if they have an up to date IANA tz db, since we would want to warn them of the mismatch.
Hello @lithomas1! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:
Comment last updated at 2022-08-09 13:55:50 UTC
I'm going to self merge this in a couple of days if no other comments, so we can get the Python 3.11 testing in.
thanks @lithomas1 this is great