python3-dateutil: update to 2.9.0, adopt.
Closes: #51647 [via git-merge-pr]
This commit is contained in:
parent
e302919683
commit
fd080f8b6b
|
@ -1,25 +0,0 @@
|
|||
Taken from https://github.com/dateutil/dateutil/pull/1285
|
||||
|
||||
From f2293200747fb03d56c6c5997bfebeabe703576f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Grainger <tagrain@gmail.com>
|
||||
Date: Fri, 2 Jun 2023 14:06:41 +0100
|
||||
Subject: [PATCH 1/2] avoid deprecated utcfromtimestamp
|
||||
|
||||
Fixes #1284
|
||||
---
|
||||
src/dateutil/tz/tz.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/dateutil/tz/tz.py b/src/dateutil/tz/tz.py
|
||||
index c67f56d46..617591446 100644
|
||||
--- a/dateutil/tz/tz.py
|
||||
+++ b/dateutil/tz/tz.py
|
||||
@@ -34,7 +34,7 @@
|
||||
from warnings import warn
|
||||
|
||||
ZERO = datetime.timedelta(0)
|
||||
-EPOCH = datetime.datetime.utcfromtimestamp(0)
|
||||
+EPOCH = datetime.datetime(1970, 1, 1, 0, 0)
|
||||
EPOCHORDINAL = EPOCH.toordinal()
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
From 2bdd63158b7f981fc6d70a869680451bdfd8d848 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jakub=20Kul=C3=ADk?= <kulikjak@gmail.com>
|
||||
Date: Thu, 10 Feb 2022 10:28:42 +0100
|
||||
Subject: [PATCH] Remove deprecated pytest.warns(None) from test_internals.py
|
||||
|
||||
---
|
||||
tests/test_internals.py | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/tests/test_internals.py b/tests/test_internals.py
|
||||
index 530813147..b32e6723f 100644
|
||||
--- a/dateutil/test/test_internals.py
|
||||
+++ b/dateutil/test/test_internals.py
|
||||
@@ -9,6 +9,7 @@ code that may be difficult to reach through the standard API calls.
|
||||
|
||||
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
|
|
@ -1,17 +1,17 @@
|
|||
# Template file for 'python3-dateutil'
|
||||
pkgname=python3-dateutil
|
||||
version=2.8.2
|
||||
revision=4
|
||||
build_style=python3-module
|
||||
hostmakedepends="python3-setuptools_scm"
|
||||
version=2.9.0
|
||||
revision=1
|
||||
build_style=python3-pep517
|
||||
hostmakedepends="python3-setuptools_scm python3-wheel"
|
||||
depends="python3-six tzdata"
|
||||
checkdepends="python3-pytest-cov python3-hypothesis python3-freezegun ${depends}"
|
||||
short_desc="Extensions to the standard Python3 datetime module"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
|
||||
license="Apache-2.0, BSD-3-Clause"
|
||||
homepage="https://github.com/dateutil/dateutil"
|
||||
distfiles="${PYPI_SITE}/p/python-dateutil/python-dateutil-${version}.tar.gz"
|
||||
checksum=0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
|
||||
checksum=78e73e19c63f5b20ffa567001531680d939dc042bf7850431877645523c66709
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE
|
||||
|
|
Loading…
Reference in New Issue