Skip to content

Commit a8431f0

Browse files
committed
DEP: Remove tzdata as a hard dependency outside of Windows
1 parent 944c527 commit a8431f0

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ details, see the commit logs at https://github.com/pandas-dev/pandas.
115115
## Dependencies
116116
- [NumPy - Adds support for large, multi-dimensional arrays, matrices and high-level mathematical functions to operate on these arrays](https://www.numpy.org)
117117
- [python-dateutil - Provides powerful extensions to the standard datetime module](https://dateutil.readthedocs.io/en/stable/index.html)
118-
- [tzdata - Provides an IANA time zone database](https://tzdata.readthedocs.io/en/latest/)
118+
- [tzdata - Provides an IANA time zone database](https://tzdata.readthedocs.io/en/latest/) (Only required on Windows)
119119

120120
See the [full installation instructions](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies) for minimum supported versions of required, recommended and optional dependencies.
121121

doc/source/getting_started/install.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,13 @@ Package Minimum support
150150
================================================================ ==========================
151151
`NumPy <https://numpy.org>`__ 1.26.0
152152
`python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ 2.8.2
153-
`tzdata <https://pypi.org/project/tzdata/>`__ 2023.3
153+
*`tzdata <https://pypi.org/project/tzdata/>`__ 2023.3
154154
================================================================ ==========================
155155
156156
Generally, the minimum supported version is ~2 years old from the release date of a major or minor pandas version.
157157

158+
* ``tzdata`` is only required on Windows.
159+
158160
.. _install.optional_dependencies:
159161

160162
Optional dependencies

doc/source/whatsnew/v3.0.0.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,6 @@ The following required dependencies were updated:
657657
+=================+======================+
658658
| numpy | 1.26.0 |
659659
+-----------------+----------------------+
660-
| tzdata | 2023.3 |
661-
+-----------------+----------------------+
662660

663661
For `optional libraries <https://pandas.pydata.org/docs/getting_started/install.html>`_ the general recommendation is to use the latest version.
664662
The following table lists the lowest version per library that is currently being tested throughout the development of pandas.

pandas/_libs/tslibs/timezones.pyx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ cdef bint is_utc_zoneinfo(tzinfo tz):
5959
utc_zoneinfo = zoneinfo.ZoneInfo("UTC")
6060
except zoneinfo.ZoneInfoNotFoundError:
6161
return False
62-
# Warn if tzdata is too old, even if there is a system tzdata to alert
63-
# users about the mismatch between local/system tzdata
64-
import_optional_dependency("tzdata", errors="warn", min_version="2022.7")
6562

6663
return tz is utc_zoneinfo
6764

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ requires-python = '>=3.11'
2929
dependencies = [
3030
"numpy>=1.26.0",
3131
"python-dateutil>=2.8.2",
32-
"tzdata>=2023.3"
32+
"tzdata>=2023.3; platform_system == 'Windows'",
3333
]
3434
classifiers = [
3535
'Development Status :: 5 - Production/Stable',

0 commit comments

Comments
 (0)