unstale

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 init

@unstale/cli 0.3.1 on npm

python-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.

    4.0.0release notes

  • Numeric fields must contain exactly the expected number of ASCII digits; previously accepted strings now raise ValueError.

    4.0.0release notes

  • Python versions older than 3.11 are no longer supported.

    4.0.0release notes

  • yearday=366 now resolves to December 31 in leap years instead of December 30.

    4.0.0release notes

  • The package no longer depends on six.

    4.0.0release notes

  • TZOFFSETFROM and TZOFFSETTO numeric fields now require exactly the expected number of ASCII digits.

    4.0.0release notes

Tooling 2

  • The build backend is now Hatchling, mainly affecting people building dateutil from source.

    4.0.0release notes

  • Package metadata is now in pyproject.toml; versions are still derived from Git tags and exposed as dateutil.__version__.

    4.0.0release notes

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.

    4.0.0release notes

  • Iterating over a cached rule set no longer hangs forever when another iterator over the same rule has completed the cache.

    4.0.0release notes

  • Unpickling a tzoffset now gives the same object as calling tzoffset(name, offset).

    4.0.0release notes

  • Unpickling a tzutc now gives the dateutil.tz.UTC singleton.

    4.0.0release notes

python-dateutil 315 changes

Breaking changes 6

  • The mutable search-path list has been removed; use dateutil.tz.TZPATH and dateutil.tz.reset_tzpath instead.

    3.0.0release notes

  • The function no longer does anything and raises RebuildDeprecationWarning as an error by default.

    3.0.0release notes

  • Passing a relative key that refers to a file outside every directory on TZPATH is deprecated and raises DeprecatedTzKeyWarning as an error by default.

    3.0.0release notes

  • The minimum supported version is now 1.6, fixing No module named 'six.moves' errors with older versions.

    3.0.0release notes

  • The package no longer bundles the IANA database; data comes from the system or the installed tzdata package.

    3.0.0release notes

  • For times in a gap, fold=0 uses the pre-transition offset and fold=1 uses the post-transition offset, following PEP 495.

    3.0.0release notes

Deprecations 1

  • The module is deprecated and now wraps tzdata; users are encouraged to migrate to dateutil.tz.gettz or the standard library's zoneinfo.

    3.0.0release notes

New APIs and options 2

  • Allows runtime configuration of the IANA time zone data search path.

    3.0.0release notes

  • Provides the time zone data search path, which can be configured at runtime.

    3.0.0release notes

Behavior and default changes 1

  • Cached instances can now be pickled and deep-copied; cache settings are preserved and cached results regenerated on demand.

    3.0.0release notes

Fixes and other changes 5

  • Comparing against an unsupported type such as None now returns True instead of raising TypeError.

    3.0.0release notes

  • Experimental X- parameters in an RRULE line are now ignored instead of raising ValueError, as RFC 5545 permits.

    3.0.0release notes

  • The rewrite supports Version 2 and Version 3 tzfile binaries, resolving issues with timestamps beyond 2038 and slim format binaries.

    3.0.0release notes

  • Fixed-offset zones now return their offset, DST offset, and abbreviation when utcoffset, dst, and tzname are called with None, making attached datetime.time objects aware.

    3.0.0release notes

  • 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.

    3.0.0release notes

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.

    2.4.1docs