# dateutil changelog > Extensions to the standard Python datetime module - Vendor: dateutil - Category: Developer Tools - Official site: https://github.com/dateutil/dateutil - Tracked by: What's New (https://whatsnew.fyi/product/dateutil) - Harvested from: GitHub (dateutil/dateutil) - Entries below: 10 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. ## Releases ### 2.9.0.post0 - Date: 2024-03-01 - Version: 2.9.0.post0 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.9.0.post0 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.9.0.post0 #### Version 2.9.0.post0 (2024-03-01) ##### Bugfixes - Pinned `setuptools_scm` to `<8`, which should make the generated `_version.py` file compatible with all supported versions of Python. ### 2.9.0 - Date: 2024-03-01 - Version: 2.9.0 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.9.0 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.9.0 #### Version 2.9.0 (2024-02-29) ##### Data updates - Updated tzdata version to 2024a. (gh pr #1342) ##### Features - Made all `dateutil` submodules lazily imported using [PEP 562](https://www.python.org/dev/peps/pep-0562/). On Python 3.7+, things like `import dateutil; dateutil.tz.gettz("America/New_York")` will now work without explicitly importing `dateutil.tz`, with the import occurring behind the scenes on first use. The old behavior remains on Python 3.6 and earlier. Fixed by Orson Adams. (gh issue #771, gh pr #1007) ##### Bugfixes - Removed a call to `datetime.utcfromtimestamp`, which is deprecated as of Python 3.12. Reported by Hugo van Kemenade (gh pr #1284), fixed by Thomas Grainger (gh pr #1285). ##### Documentation changes - Added note into docs and tests where relativedelta would return last day of the month only if the same day on a different month resolves to a date that doesn\'t exist. Reported by \@hawkEye-01 (gh issue #1167). Fixed by \@Mifrill (gh pr #1168) ### 2.8.2 - Date: 2021-07-14 - Version: 2.8.2 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.8.2 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.8.2 Version 2.8.2 (2021-07-08) ========================== Data updates ------------ - Updated tzdata version to 2021a. (gh pr #1128) Bugfixes -------- - Fixed a bug in the parser where non-``ValueError`` exceptions would be raised during exception handling; this would happen, for example, if an ``IllegalMonthError`` was raised in ``dateutil`` code. Fixed by Mark Bailey. (gh issue #981, pr #987). - Fixed the custom ``repr`` for ``dateutil.parser.ParserError``, which was not defined due to an indentation error. (gh issue #991, gh pr #993) - Fixed a bug that caused ``b'`` prefixes to appear in parse_isodate exception messages. Reported and fixed by Paul Brown (@pawl) (gh pr #1122) - Make ``isoparse`` raise when trying to parse times with inconsistent use of `:` separator. Reported and fixed by @mariocj89 (gh pr #1125). - Fixed ``tz.gettz()`` not returning local time when passed an empty string. Reported by @labrys (gh issues #925, #926). Fixed by @ffe4 (gh pr #1024) Documentation changes --------------------- - Rearranged parser documentation into "Functions", "Classes" and "Warnings and Exceptions" categories. (gh issue #992, pr #994). - Updated ``parser.parse`` documentation to reflect the switch from ``ValueError`` to ``ParserError``. (gh issue #992, pr #994). - Fixed methods in the ``rrule`` module not being displayed in the docs. (gh pr #1025) - Changed some relative links in the exercise documentation to refer to the document locations in the input tree, rather than the generated HTML files in the HTML output tree (which presumably will not exist in non-HTML output formats). (gh pr #1078). Misc ---- - Moved ``test_imports.py``, ``test_internals.py`` and ``test_utils.py`` to pytest. Reported and fixed by @jpurviance (gh pr #978) - Added project_urls for documentation and source. Patch by @andriyor (gh pr #975). - Simplified handling of bytes and bytearray in ``_parser._timelex``. Reported and fixed by @frenzymadness (gh issue #1060). - Changed the tests against the upstream tz database to always generate fat binaries, since until GH-590 and GH-1059 are resolved, "slim" zic binaries will cause problems in many zones, causing the tests to fail. This also updates ``zoneinfo.rebuild`` to always generate fat binaries. (gh pr #1076). - Moved sdist and wheel generation to use `python-build`. Reported and fixed by @mariocj89 (gh pr #1133). ### 2.8.1 - Date: 2019-11-03 - Version: 2.8.1 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.8.1 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.8.1 Version 2.8.1 (2019-11-03) ========================== Data updates ------------ - Updated tzdata version to 2019c. Bugfixes -------- - Fixed a race condition in the `tzoffset` and `tzstr` \"strong\" caches on Python 2.7. Reported by \@kainjow (gh issue \#901). - Parsing errors will now raise `ParserError`, a subclass of `ValueError`, which has a nicer string representation. Patch by \@gfyoung (gh pr \#881). - `parser.parse` will now raise `TypeError` when `tzinfos` is passed a type that cannot be interpreted as a time zone. Prior to this change, it would raise an `UnboundLocalError` instead. Patch by \@jbrockmendel (gh pr \#891). - Changed error message raised when when passing a `bytes` object as the time zone name to gettz in Python 3. Reported and fixed by \@labrys () (gh issue \#927, gh pr \#935). - Changed compatibility logic to support a potential Python 4.0 release. Patch by Hugo van Kemenade (gh pr \#950). - Updated many modules to use `tz.UTC` in favor of `tz.tzutc()` internally, to avoid an unnecessary function call. (gh pr \#910). - Fixed issue where `dateutil.tz` was using a backported version of `contextlib.nullcontext` even in Python 3.7 due to a malformed import statement. (gh pr \#963). Tests ----- - Switched from using assertWarns to using pytest.warns in the test suite. (gh pr \#969). - Fix typo in setup.cfg causing PendingDeprecationWarning to not be explicitly specified as an error in the warnings filter. (gh pr \#966) - Fixed issue where `test_tzlocal_offset_equal` would fail in certain environments (such as FreeBSD) due to an invalid assumption about what time zone names are provided. Reported and fixed by Kubilay Kocak (gh issue \#918, pr \#928). - Fixed a minor bug in `test_isoparser` related to `bytes`/`str` handling. Fixed by \@fhuang5 (gh issue \#776, gh pr \#879). - Explicitly listed all markers used in the pytest configuration. (gh pr \#915) - Extensive improvements to the parser test suite, including the adoption of `pytest`-style tests and the addition of parametrization of several test cases. Patches by \@jbrockmendel (gh prs \#735, \#890, \#892, \#894). - Added tests for tzinfos input types. Patch by \@jbrockmendel (gh pr \#891). - Fixed failure of test suite when changing the TZ variable is forbidden. Patch by \@shadchin (gh pr \#893). - Pinned all test dependencies on Python 3.3. (gh prs \#934, \#962) Documentation changes --------------------- - Fixed many misspellings, typos and styling errors in the comments and documentation. Patch by Hugo van Kemenade (gh pr \#952). Misc ---- - Added Python 3.8 to the trove classifiers. (gh pr \#970) - Moved as many keys from `setup.py` to `setup.cfg` as possible. Fixed by \@FakeNameSE, \@aquinlan82, \@jachen20, and \@gurgenz221 (gh issue \#871, gh pr \#880). - Reorganized `parser` methods by functionality. Patch by \@jbrockmendel (gh pr \#882). - Switched `release.py` over to using `pep517.build` for creating releases, rather than direct invocations of `setup.py`. Fixed by \@smeng10 (gh issue \#869, gh pr \#875). - Added a \"build\" environment into the tox configuration, to handle dependency management when making releases. Fixed by \@smeng10 (gh issue \#870,r gh pr \#876). - GH \#916, GH \#971 ### 2.7.5 — Version 2.7.5 (2018-10-27) - Date: 2018-10-27 - Version: 2.7.5 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.7.5 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.7.5 Data updates ------------ - Update tzdata to 2018g ### 2.7.4 — Version 2.7.4 (2018-10-24) - Date: 2018-10-25 - Version: 2.7.4 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.7.4 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.7.4 Data updates ------------ - Updated tzdata version to 2018f. ### 2.7.3 — Version 2.7.3 (2018-05-09) - Date: 2018-05-10 - Version: 2.7.3 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.7.3 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.7.3 Data updates ------------ - Update tzdata to 2018e. (gh pr #710) Bugfixes -------- - Fixed an issue where decimal.Decimal would cast `NaN` or infinite value in a parser.parse, which will raise decimal.Decimal-specific errors. Reported and fixed by @amureki (gh issue #662, gh pr #679). - Fixed a ValueError being thrown if tzinfos call explicity returns ``None``. Reported by @pganssle (gh issue #661) Fixed by @parsethis (gh pr #681) - Fixed incorrect parsing of certain dates earlier than 100 AD when repesented in the form "%B.%Y.%d", e.g. "December.0031.30". (gh issue #687, pr #700) - Fixed a bug where automatically generated DTSTART was naive even if a specified UNTIL had a time zone. Automatically generated DTSTART will now take on the timezone of an UNTIL date, if provided. Reported by @href (gh issue #652). Fixed by @absreim (gh pr #693). Documentation changes --------------------- - Corrected link syntax and updated URL to https for ISO year week number notation in relativedelta examples. (gh issue #670, pr #711) - Add doctest examples to tzfile documentation. Done by @weatherpattern and @pganssle (gh pr #671) - Updated the documentation for relativedelta. Removed references to tuple arguments for weekday, explained effect of weekday(_, 1) and better explained the order of operations that relativedelta applies. Fixed by @kvn219 @huangy22 and @ElliotJH (gh pr #673) - Added changelog to documentation. (gh issue #692, gh pr #707) - Changed order of keywords in rrule docstring. Reported and fixed by @rmahajan14 (gh issue #686, gh pr #695). - Added documentation for ``dateutil.tz.gettz``. Reported by @pganssle (gh issue #647). Fixed by @weatherpattern (gh pr #704) - Cleaned up malformed RST in the ``tz`` documentation. (gh issue #702, gh pr #706) - Changed the default theme to sphinx_rtd_theme, and changed the sphinx configuration to go along with that. (gh pr #707) - Reorganized ``dateutil.tz`` documentation and fixed issue with the ``dateutil.tz`` docstring. (gh pr #714) Misc ---- - GH #674, GH #688, GH #699 ### 2.7.2 — Version 2.7.2 (2018-03-26) - Date: 2018-03-26 - Version: 2.7.2 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.7.2 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.7.2 Bugfixes -------- - Fixed an issue with the setup script running in non-UTF-8 environment. Reported and fixed by @gergondet (gh pr #651) Misc ---- - GH #655 ### 2.7.1 — Version 2.7.1 (2018-03-24) - Date: 2018-03-24 - Version: 2.7.1 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.7.1 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.7.1 Data updates ------------ - Updated tzdata version to 2018d. Bugfixes -------- - Fixed issue where parser.parse would occasionally raise decimal.Decimal-specific error types rather than ValueError. Reported by @amureki (gh issue #632). Fixed by @pganssle (gh pr #636). - Improve error message when rrule's dtstart and until are not both naive or both aware. Reported and fixed by @ryanpetrello (gh issue #633, gh pr #634) Misc ---- - GH #644, GH #648 ### 2.7.0 — Version 2.7.0 - Date: 2018-03-11 - Version: 2.7.0 - Original notes: https://github.com/dateutil/dateutil/releases/tag/2.7.0 - Permalink: https://whatsnew.fyi/product/dateutil/releases/2.7.0 - Dropped support for Python 2.6 (gh pr #362 by @jdufresne) - Dropped support for Python 3.2 (gh pr #626) - Updated zoneinfo file to 2018c (gh pr #616) - Changed licensing scheme so all new contributions are dual licensed under Apache 2.0 and BSD. (gh pr #542, issue #496) - Added __all__ variable to the root package. Reported by @tebriel (gh issue #406), fixed by @mariocj89 (gh pr #494) - Added python_requires to setup.py so that pip will distribute the right version of dateutil. Fixed by @jakec-github (gh issue #537, pr #552) - Added the utils submodule, for miscellaneous utilities. - Added within_delta function to utils - added by @justanr (gh issue #432, gh pr #437) - Added today function to utils (gh pr #474) - Added default_tzinfo function to utils (gh pr #475), solving an issue reported by @nealmcb (gh issue #94) - Added dedicated ISO 8601 parsing function isoparse (gh issue #424). Initial implementation by @pganssle in gh pr #489 and #622, with a pre-release fix by @kirit93 (gh issue #546, gh pr #573). - Moved parser module into parser/_parser.py and officially deprecated the use of several private functions and classes from that module. (gh pr #501, #515) - Tweaked parser error message to include rejected string format, added by @pbiering (gh pr #300) - Add support for parsing bytesarray, reported by @uckelman (gh issue #417) and fixed by @uckelman and @pganssle (gh pr #514) - Started raising a warning when the parser finds a timezone string that it cannot construct a tzinfo instance for (rather than succeeding with no indication of an error). Reported and fixed by @jbrockmendel (gh pr #540) - Dropped the use of assert in the parser. Fixed by @jbrockmendel (gh pr #502) - Fixed to assertion logic in parser to support dates like '2015-15-May', reported and fixed by @jbrockmendel (gh pr #409) - Fixed IndexError in parser on dates with trailing colons, reported and fixed by @jbrockmendel (gh pr #420) - Fixed bug where hours were not validated, leading to improper parse. Reported by @heappro (gh pr #353), fixed by @jbrockmendel (gh pr #482) - Fixed problem parsing strings in %b-%Y-%d format. Reported and fixed by @jbrockmendel (gh pr #481) - Fixed problem parsing strings in the %d%B%y format. Reported by @asishm (gh issue #360), fixed by @jbrockmendel (gh pr #483) - Fixed problem parsing certain unambiguous strings when year <99 (gh pr #510). Reported by @alexwlchan (gh issue #293). - Fixed issue with parsing an unambiguous string representation of an ambiguous datetime such that if possible the correct value for fold is set. Fixes issue reported by @JordonPhillips and @pganssle (gh issue #318, #320, gh pr #517) - Fixed issue with improper rounding of fractional components. Reported by @dddmello (gh issue #427), fixed by @m-dz (gh pr #570) - Performance improvement to parser from removing certain min() calls. Reported and fixed by @jbrockmendel (gh pr #589) - Significantly refactored parser code by @jbrockmendel (gh prs #419, #436, #490, #498, #539) and @pganssle (gh prs #435, #468) - Implementated of __hash__ for relativedelta and weekday, reported and fixed by @mrigor (gh pr #389) - Implemented __abs__ for relativedelta. Reported by @binnisb and @pferreir (gh issue #350, pr #472) - Fixed relativedelta.weeks property getter and setter to work for both negative and positive values. Reported and fixed by @souliane (gh issue #459, pr #460) - Fixed issue where passing whole number floats to the months or years arguments of the relativedelta constructor would lead to errors during addition. Reported by @arouanet (gh pr #411), fixed by @lkollar (gh pr #553) - Added a pre-built tz.UTC object representing UTC (gh pr #497) - Added a cache to tz.gettz so that by default it will return the same object for identical inputs. This will change the semantics of certain operations between datetimes constructed wi _[Truncated at 4000 characters — full notes: https://github.com/dateutil/dateutil/releases/tag/2.7.0]_