From 9415ce2fa50232cb5104cd8db656bb83a218ee99 Mon Sep 17 00:00:00 2001 From: Marco Edward Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Mon, 17 Oct 2022 16:47:20 +0100 Subject: [PATCH] BUG: guess_datetime_format fails to read 13/2019 in dateutil==2.8.1 (#49145) * :arrow_up: increase minimum python-dateutil version * add 13/2019 test case Co-authored-by: MarcoGorelli <> --- ci/deps/actions-38-minimum_versions.yaml | 2 +- doc/source/getting_started/install.rst | 2 +- doc/source/whatsnew/v2.0.0.rst | 2 ++ pandas/tests/tslibs/test_parsing.py | 1 + setup.cfg | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ci/deps/actions-38-minimum_versions.yaml b/ci/deps/actions-38-minimum_versions.yaml index fd23080c2ab04..d40f0cff21feb 100644 --- a/ci/deps/actions-38-minimum_versions.yaml +++ b/ci/deps/actions-38-minimum_versions.yaml @@ -16,7 +16,7 @@ dependencies: - boto3 # required dependencies - - python-dateutil=2.8.1 + - python-dateutil=2.8.2 - numpy=1.20.3 - pytz=2020.1 diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index 00251854e3ffa..1be421d54f231 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -236,7 +236,7 @@ Dependencies Package Minimum supported version ================================================================ ========================== `NumPy `__ 1.20.3 -`python-dateutil `__ 2.8.1 +`python-dateutil `__ 2.8.2 `pytz `__ 2020.1 ================================================================ ========================== diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index fea3d70d81554..dbcd0e0078707 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -99,6 +99,8 @@ If installed, we now require: +=================+=================+==========+=========+ | mypy (dev) | 0.981 | | X | +-----------------+-----------------+----------+---------+ +| python-dateutil | 2.8.2 | X | X | ++-----------------+-----------------+----------+---------+ For `optional libraries `_ the general recommendation is to use the latest version. The following table lists the lowest version per library that is currently being tested throughout the development of pandas. diff --git a/pandas/tests/tslibs/test_parsing.py b/pandas/tests/tslibs/test_parsing.py index fcfca5a27763b..a4e12315d34e0 100644 --- a/pandas/tests/tslibs/test_parsing.py +++ b/pandas/tests/tslibs/test_parsing.py @@ -214,6 +214,7 @@ def test_guess_datetime_format_with_locale_specific_formats(string, fmt): "1/1/1/1", "this_is_not_a_datetime", "51a", + "13/2019", ], ) def test_guess_datetime_format_invalid_inputs(invalid_dt): diff --git a/setup.cfg b/setup.cfg index c164bd6be83d9..9c88731f74ac8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,7 +33,7 @@ packages = find: install_requires = numpy>=1.20.3; python_version<'3.10' numpy>=1.21.0; python_version>='3.10' - python-dateutil>=2.8.1 + python-dateutil>=2.8.2 pytz>=2020.1 python_requires = >=3.8 include_package_data = True