pypi / python-dateutil
python-dateutil
What changed in python-dateutil 2 to 4, from its official release notes, upgrade guides and advisories. Also covers types-python-dateutil. Sources checked 2026-12-05.
12 breaking1 deprecations2 new APIs and options1 behavior and defaults3 tooling9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpython-dateutil 412 changes
Breaking changes 6
The parse_isodate, parse_isotime and parse_tzstr methods require numeric fields to contain exactly the expected number of ASCII digits.
Numeric fields must contain exactly the expected number of ASCII digits; previously accepted strings now raise ValueError.
Python versions older than 3.11 are no longer supported.
yearday=366 now resolves to December 31 in leap years instead of December 30.
The package no longer depends on six.
TZOFFSETFROM and TZOFFSETTO numeric fields now require exactly the expected number of ASCII digits.
Tooling 2
The build backend is now Hatchling, mainly affecting people building dateutil from source.
Package metadata is now in pyproject.toml; versions are still derived from Git tags and exposed as dateutil.__version__.
Fixes and other changes 4
Iterating over a cached rule no longer hangs forever when another iterator over the same rule has completed the cache.
Iterating over a cached rule set no longer hangs forever when another iterator over the same rule has completed the cache.
Unpickling a tzoffset now gives the same object as calling tzoffset(name, offset).
Unpickling a tzutc now gives the dateutil.tz.UTC singleton.
python-dateutil 315 changes
Breaking changes 6
The mutable search-path list has been removed; use
dateutil.tz.TZPATHanddateutil.tz.reset_tzpathinstead.The function no longer does anything and raises
RebuildDeprecationWarningas an error by default.Passing a relative key that refers to a file outside every directory on
TZPATHis deprecated and raisesDeprecatedTzKeyWarningas an error by default.The minimum supported version is now 1.6, fixing
No module named 'six.moves'errors with older versions.The package no longer bundles the IANA database; data comes from the system or the installed
tzdatapackage.For times in a gap,
fold=0uses the pre-transition offset andfold=1uses the post-transition offset, following PEP 495.
Deprecations 1
The module is deprecated and now wraps
tzdata; users are encouraged to migrate todateutil.tz.gettzor the standard library'szoneinfo.
New APIs and options 2
Allows runtime configuration of the IANA time zone data search path.
Provides the time zone data search path, which can be configured at runtime.
Behavior and default changes 1
Cached instances can now be pickled and deep-copied; cache settings are preserved and cached results regenerated on demand.
Fixes and other changes 5
Comparing against an unsupported type such as
Nonenow returnsTrueinstead of raisingTypeError.Experimental
X-parameters in anRRULEline are now ignored instead of raisingValueError, as RFC 5545 permits.The rewrite supports Version 2 and Version 3 tzfile binaries, resolving issues with timestamps beyond 2038 and slim format binaries.
Fixed-offset zones now return their offset, DST offset, and abbreviation when
utcoffset,dst, andtznameare called withNone, making attacheddatetime.timeobjects aware.dst()is inferred from standard time on both sides of each DST period and for each transition, fixing several double, half-hour, and changing-standard-offset cases.
python-dateutil 21 changes
Tooling 1
Starting with 2.4.1, source and binary distributions are signed by a PGP key signed by the key that made the previous release; PyPI distributions no longer have GPG signatures attached.