Skip to content

Commit eba2fb9

Browse files
committed
update
1 parent 7e48282 commit eba2fb9

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

doc/source/getting_started/install.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,15 @@ the method requiring that dependency is called.
273273
Timezones
274274
^^^^^^^^^
275275

276-
========================= ================== =============================================================
277-
Dependency Minimum Version Notes
278-
========================= ================== =============================================================
279-
tzdata 2022.1 Allows the use of ``zoneinfo`` timezones with pandas
280-
========================= ================== =============================================================
276+
========================= ========================= =============================================================
277+
Dependency Minimum Version Notes
278+
========================= ========================= =============================================================
279+
tzdata 2022.1(pypi)/ Allows the use of ``zoneinfo`` timezones with pandas.
280+
2022a(for system tzdata) **Note**: You only need to install the pypi package, if your
281+
system does not already provide the IANA tz database.
282+
However, the minimum tzdata version still applies, even if it
283+
is not enforced through an error.
284+
========================= ========================= =============================================================
281285

282286
Visualization
283287
^^^^^^^^^^^^^

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ dependencies:
4848
- scipy
4949
- sqlalchemy
5050
- tabulate
51-
- tzdata>=2022.1
51+
- tzdata>=2022a
5252
- xarray
5353
- xlrd
5454
- xlsxwriter

pandas/_libs/tslibs/timezones.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ try:
99
# py39+
1010
import zoneinfo
1111
from zoneinfo import ZoneInfo
12-
import_optional_dependency("tzdata", errors="raise", min_version="2022.1")
1312
except ImportError:
1413
zoneinfo = None
1514
ZoneInfo = None
@@ -70,6 +69,9 @@ cdef inline bint is_utc_zoneinfo(tzinfo tz):
7069
utc_zoneinfo = ZoneInfo("UTC")
7170
except zoneinfo.ZoneInfoNotFoundError:
7271
return False
72+
# Warn if tzdata is too old, even if there is a system tzdata to alert
73+
# users about the mismatch between local/system tzdata
74+
import_optional_dependency("tzdata", errors="warn", min_version="2022.1")
7375

7476
return tz is utc_zoneinfo
7577

scripts/generate_pip_deps_from_conda.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import yaml
2222

2323
EXCLUDE = {"python", "c-compiler", "cxx-compiler"}
24+
REMAP_VERSION = {"tzdata": "2022.1"}
2425
RENAME = {"pytables": "tables", "geopandas-base": "geopandas", "pytorch": "torch"}
2526

2627

@@ -41,7 +42,8 @@ def conda_package_to_pip(package: str):
4142
pkg, version = package.split(compare)
4243
if pkg in EXCLUDE:
4344
return
44-
45+
if pkg in REMAP_VERSION:
46+
return "".join((pkg, compare, REMAP_VERSION[pkg]))
4547
if pkg in RENAME:
4648
return "".join((RENAME[pkg], compare, version))
4749

0 commit comments

Comments
 (0)