From 78aac7cf1a5d0a8a023f17558ffc14f2c5ef5cb8 Mon Sep 17 00:00:00 2001 From: wrobell Date: Sun, 22 Jun 2025 01:35:18 +0100 Subject: [PATCH] gnu: python-dateutil: Update to version 2.9.0. * gnu/packages/time.scm (python-dateutil)[source](patches): Remove the dateutil patch. * gnu/packages/patches/python-dateutil-pytest-compat.patch: Drop the patch as seems not required with pytest 8 anymore. * gnu/local.mk (dist_patch_DATA): Deregester patch. Change-Id: I61ef23a2795f6cecc73bbd337759dd4e088d4807 --- gnu/local.mk | 1 - .../python-dateutil-pytest-compat.patch | 43 ------------------- gnu/packages/time.scm | 15 +++---- 3 files changed, 7 insertions(+), 52 deletions(-) delete mode 100644 gnu/packages/patches/python-dateutil-pytest-compat.patch diff --git a/gnu/local.mk b/gnu/local.mk index a111f028050bb183626d618c2651da87656edf8f..05df9fd12c77faeb8d708f1554899951cb1192eb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2151,7 +2151,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-reproducible-build.patch \ %D%/packages/patches/python-cross-compile.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ - %D%/packages/patches/python-dateutil-pytest-compat.patch \ %D%/packages/patches/python-debugpy-unbundle-pydevd.patch \ %D%/packages/patches/python-docopt-pytest6-compat.patch \ %D%/packages/patches/python-fixtures-remove-monkeypatch-test.patch \ diff --git a/gnu/packages/patches/python-dateutil-pytest-compat.patch b/gnu/packages/patches/python-dateutil-pytest-compat.patch deleted file mode 100644 index 5cff57e94c27ad0e49afef3ffa675fb6e395f4ab..0000000000000000000000000000000000000000 --- a/gnu/packages/patches/python-dateutil-pytest-compat.patch +++ /dev/null @@ -1,43 +0,0 @@ -Add compatibility with newer versions of pytest. - -Taken from upstream: - - https://github.com/dateutil/dateutil/commit/2bdd63158b7f981fc6d70a869680451bdfd8d848 - -diff --git a/dateutil/test/test_internals.py b/dateutil/test/test_internals.py -index 53081314..b32e6723 100644 ---- a/dateutil/test/test_internals.py -+++ b/dateutil/test/test_internals.py -@@ -9,6 +9,7 @@ - - import sys - import pytest -+import warnings - - from dateutil.parser._parser import _ymd - from dateutil import tz -@@ -65,18 +66,17 @@ def test_parser_parser_private_not_warns(): - from dateutil.parser._parser import _timelex, _tzparser - from dateutil.parser._parser import _parsetz - -- with pytest.warns(None) as recorder: -+ with warnings.catch_warnings(): -+ warnings.simplefilter("error") - _tzparser() -- assert len(recorder) == 0 - -- with pytest.warns(None) as recorder: -+ with warnings.catch_warnings(): -+ warnings.simplefilter("error") - _timelex('2014-03-03') - -- assert len(recorder) == 0 -- -- with pytest.warns(None) as recorder: -+ with warnings.catch_warnings(): -+ warnings.simplefilter("error") - _parsetz('+05:00') -- assert len(recorder) == 0 - - - @pytest.mark.tzstr diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm index 602f92f3ded9cd143a05a68d9f83db5c58d209e4..db1b0bf3fac0d19d8ea232dd0e52becbd9dcb507 100644 --- a/gnu/packages/time.scm +++ b/gnu/packages/time.scm @@ -348,22 +348,21 @@ Pendulum instances.") (define-public python-dateutil (package (name "python-dateutil") - (version "2.8.2") + (version "2.9.0") (source (origin (method url-fetch) (uri (pypi-uri "python-dateutil" version)) - (patches (search-patches "python-dateutil-pytest-compat.patch")) (sha256 - (base32 "11iy7m4bp2lgfkcl0r6xzf34bvk7ppjmsyn2ygfikbi72v6cl8q1")))) + (base32 "02b7qqimar3p311m0y5z8b09v4qdd0qia037lpzj0nrzqqckxrvq")))) (build-system pyproject-build-system) (arguments (list - #:test-flags '(list ; avoid freezegun dependency - "--ignore=dateutil/test/test_utils.py" - "--ignore=dateutil/test/test_rrule.py" - ;; XXX: Fails to get timezone from /etc/localtime. - "--ignore=dateutil/test/test_tz.py"))) + #:test-flags '(list ;avoid freezegun dependency + "--ignore=tests/test_utils.py" + "--ignore=tests/test_rrule.py" + ;; XXX: Fails to get timezone from /etc/localtime. + "--ignore=tests/test_tz.py"))) (native-inputs (list python-pytest python-pytest-cov