diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-07-24 02:11:45 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-07-24 02:11:45 +0100 |
commit | b49088575eb777ced2551f484da86317332d6087 (patch) | |
tree | bf9a151cf2d61956340d555659ffc098ee1da466 /dev-python/isodate | |
parent | 514d1bbe260df2521fe60f1a3ec87cfcfde1a829 (diff) |
gentoo resync : 24.07.2021
Diffstat (limited to 'dev-python/isodate')
-rw-r--r-- | dev-python/isodate/Manifest | 3 | ||||
-rw-r--r-- | dev-python/isodate/files/isodate-0.6.0-py310.patch | 95 | ||||
-rw-r--r-- | dev-python/isodate/isodate-0.6.0-r2.ebuild (renamed from dev-python/isodate/isodate-0.6.0-r1.ebuild) | 20 |
3 files changed, 107 insertions, 11 deletions
diff --git a/dev-python/isodate/Manifest b/dev-python/isodate/Manifest index ffd0ffe3744b..c9d218000ebc 100644 --- a/dev-python/isodate/Manifest +++ b/dev-python/isodate/Manifest @@ -1,3 +1,4 @@ +AUX isodate-0.6.0-py310.patch 3387 BLAKE2B 669a1eb70890aa2be676be24489f4434dcf9b8f56cda20bef91913e8d648ede59b78b5e6697cf5d56461db43e9a0df14d76c2210ee0f434d0e7303a9a7eeee18 SHA512 a9c9662f95c60895eef90278d8f628cc06f56d6ed24780e03b7e45d13acf677dce4114e450876bc47fd47c637c933f48a47eb4bbb2b628ec1da7e4063059b694 DIST isodate-0.6.0.tar.gz 28480 BLAKE2B a7499c736b67193ac73026df7a7c9d9bd5b743a5d556fe5e8ba0a62e8a5238d64afb88547a27e4bcbe706483e3e1e97eecd437e4e1c730c20652cff5926502fc SHA512 e977748e13ee2c94ab47bfc47113d152280e9acff6f70e773de73717392148dd2c111a7db2d9fa3679d37936c6ed9a23dc526cb00bd601df45459b6a244f9f7d -EBUILD isodate-0.6.0-r1.ebuild 694 BLAKE2B 28636c22c1802f5bb69d6e1b8eb52bffc71375d427dbabb72d487208fc01f0112e032e93c4052ffad83330eb1f0b000054671c0878c5726c271f3ac3e5956750 SHA512 dd01c3955893ba0b4e6d84754401b69243bdf7e44b641b9d4b23d6e5664968fd9d0810f56cc07feaaa009e1df06f2de820a291ce672cb6375e11ff692e35e7ce +EBUILD isodate-0.6.0-r2.ebuild 629 BLAKE2B 74460c2091f1e6634461cae46cbbf576680a6d9d0d172fe67cfdaf7721641b7d6cd306d10d274f6d810a8e8b3092aed7d019e0f4f591b884baf60174da295c47 SHA512 894784c520c8c23b6b524feb89938800b2b6459fd5a752c85dd6339edd9902462d9f7a2189b12cefaf1b66ca2b31fbe09bf3b5a8b70a80d98c6b457671b5e2c4 MISC metadata.xml 1120 BLAKE2B 9889dda56ccb8afebcf88184839aef3527090675f9a51444185c2d22f2eb89eae009b3138edb3a03c3d024b7a6d0ec586bad08480f869a030303a736c3a00dab SHA512 c9213c9a90a27f29d51584edc4537055a82962f9153cbd68fcf8868409be2af625f754c1b8c9e1f5d00ddf6696809a118fa33a742f5e241ba6a4141937f60dce diff --git a/dev-python/isodate/files/isodate-0.6.0-py310.patch b/dev-python/isodate/files/isodate-0.6.0-py310.patch new file mode 100644 index 000000000000..81b38b48a2a9 --- /dev/null +++ b/dev-python/isodate/files/isodate-0.6.0-py310.patch @@ -0,0 +1,95 @@ +From 40358ac82b948ea8377d5ca32b576def31b39a84 Mon Sep 17 00:00:00 2001 +From: Jose Eduardo <jose.eduardo.gd@gmail.com> +Date: Fri, 19 Jul 2019 16:21:56 +0100 +Subject: [PATCH 1/8] Avoid unclosed file warning + +--- + setup.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index e39446f..9634625 100644 +--- a/setup.py ++++ b/setup.py +@@ -30,7 +30,8 @@ + + + def read(*rnames): +- return open(os.path.join(os.path.dirname(__file__), *rnames)).read() ++ with open(os.path.join(os.path.dirname(__file__), *rnames)) as read_file: ++ return read_file.read() + + + setup(name='isodate', + +From 91bf24dd1610d5f6ac5d4867457f0703046017d2 Mon Sep 17 00:00:00 2001 +From: Jose Eduardo <jose.eduardo.gd@gmail.com> +Date: Fri, 19 Jul 2019 16:22:22 +0100 +Subject: [PATCH 2/8] Raise warnings produced by isodate as errors during tests + +--- + src/isodate/tests/__init__.py | 3 +++ + tox.ini | 2 ++ + 2 files changed, 5 insertions(+) + +diff --git a/src/isodate/tests/__init__.py b/src/isodate/tests/__init__.py +index b1d46bd..7208cbd 100644 +--- a/src/isodate/tests/__init__.py ++++ b/src/isodate/tests/__init__.py +@@ -29,6 +29,7 @@ + ''' + + import unittest ++import warnings + from isodate.tests import (test_date, test_time, test_datetime, test_duration, + test_strf, test_pickle) + +@@ -37,6 +38,8 @@ def test_suite(): + ''' + Return a new TestSuite instance consisting of all available TestSuites. + ''' ++ warnings.filterwarnings("error", module=r"isodate(\..)*") ++ + return unittest.TestSuite([ + test_date.test_suite(), + test_time.test_suite(), + +From fc0fb3278da5f463ca5b2f0a3acafbbf2869bd7a Mon Sep 17 00:00:00 2001 +From: Jose Eduardo <jose.eduardo.gd@gmail.com> +Date: Fri, 19 Jul 2019 16:29:43 +0100 +Subject: [PATCH 4/8] Fix Python 3.8 DeprecationWarning + +Ref: https://docs.python.org/3.8/whatsnew/3.8.html + +> Many builtin and extension functions that take integer arguments will +> now emit a deprecation warning for Decimals, Fractions and any other +> objects that can be converted to integers only with a loss (e.g. that +> have the `__int__()` method but do not have the `__index__()` method). +> In future version they will be errors. (Contributed by Serhiy +> Storchaka in bpo-36048.) +--- + src/isodate/duration.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/isodate/duration.py b/src/isodate/duration.py +index 6d1848c..d923cee 100644 +--- a/src/isodate/duration.py ++++ b/src/isodate/duration.py +@@ -180,7 +180,7 @@ def __add__(self, other): + newday = maxdays + else: + newday = other.day +- newdt = other.replace(year=newyear, month=newmonth, day=newday) ++ newdt = other.replace(year=int(newyear), month=int(newmonth), day=newday) + # does a timedelta + date/datetime + return self.tdelta + newdt + except AttributeError: +@@ -264,7 +264,7 @@ def __rsub__(self, other): + newday = maxdays + else: + newday = other.day +- newdt = other.replace(year=newyear, month=newmonth, day=newday) ++ newdt = other.replace(year=int(newyear), month=int(newmonth), day=newday) + return newdt - self.tdelta + except AttributeError: + # other probably was not compatible with data/datetime diff --git a/dev-python/isodate/isodate-0.6.0-r1.ebuild b/dev-python/isodate/isodate-0.6.0-r2.ebuild index cbd14a1fcff7..4b9e27d5136c 100644 --- a/dev-python/isodate/isodate-0.6.0-r1.ebuild +++ b/dev-python/isodate/isodate-0.6.0-r2.ebuild @@ -1,10 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 - -PYTHON_COMPAT=( python3_{7..9} pypy3 ) +EAPI=8 +PYTHON_COMPAT=( python3_{8..10} pypy3 ) inherit distutils-r1 DESCRIPTION="ISO 8601 date/time/duration parser and formatter" @@ -14,14 +13,15 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" -IUSE="test" -RESTRICT="!test? ( test )" RDEPEND="dev-python/six[${PYTHON_USEDEP}]" -BDEPEND=" - test? ( ${RDEPEND} )" + +distutils_enable_tests unittest + +PATCHES=( + "${FILESDIR}"/${P}-py310.patch +) python_test() { - "${EPYTHON}" -m unittest discover -v -s "${BUILD_DIR}/lib" \ - || die "Testing failed with ${EPYTHON}" + eunittest -s "${BUILD_DIR}/lib" } |