pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-deprecation py-deprecation: desupport python 2.x



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e0d55f31a872
branches:  trunk
changeset: 372582:e0d55f31a872
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu Jan 27 11:35:02 2022 +0000

description:
py-deprecation: desupport python 2.x

diffstat:

 devel/py-deprecation/Makefile                                 |   7 +-
 devel/py-deprecation/distinfo                                 |   3 +-
 devel/py-deprecation/patches/patch-tests_test__deprecation.py |  43 +++++++++++
 3 files changed, 48 insertions(+), 5 deletions(-)

diffs (82 lines):

diff -r 5bd257c0ec6f -r e0d55f31a872 devel/py-deprecation/Makefile
--- a/devel/py-deprecation/Makefile     Thu Jan 27 11:24:27 2022 +0000
+++ b/devel/py-deprecation/Makefile     Thu Jan 27 11:35:02 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2022/01/04 20:53:00 wiz Exp $
+# $NetBSD: Makefile,v 1.15 2022/01/27 11:35:02 wiz Exp $
 
 DISTNAME=      deprecation-2.1.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
@@ -11,12 +11,11 @@
 COMMENT=       Library to handle automated deprecations
 LICENSE=       apache-2.0
 
-TEST_DEPENDS+= ${PYPKGPREFIX}-unittest2-[0-9]*:../../devel/py-unittest2
+DEPENDS+=      ${PYPKGPREFIX}-packaging-[0-9]*:../../devel/py-packaging
 
-PYTHON_VERSIONED_DEPENDENCIES+=        packaging
+PYTHON_VERSIONS_INCOMPATIBLE=  27
 
 USE_LANGUAGES= # none
 
 .include "../../lang/python/egg.mk"
-.include "../../lang/python/versioned_dependencies.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 5bd257c0ec6f -r e0d55f31a872 devel/py-deprecation/distinfo
--- a/devel/py-deprecation/distinfo     Thu Jan 27 11:24:27 2022 +0000
+++ b/devel/py-deprecation/distinfo     Thu Jan 27 11:35:02 2022 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.13 2021/10/26 10:18:22 nia Exp $
+$NetBSD: distinfo,v 1.14 2022/01/27 11:35:02 wiz Exp $
 
 BLAKE2s (deprecation-2.1.0.tar.gz) = 0b20926142823763d3f36a9c2a42ad46eee8c719178b0a958920764c4932d34d
 SHA512 (deprecation-2.1.0.tar.gz) = c184665d210c6eeb3f055b23e75c3714f3b18050e03bfe1384baf6c2504f1370116ae0e8c53ff818ccc54c0d633bbb3ba5791fe20b8029f3be0207b019a00275
 Size (deprecation-2.1.0.tar.gz) = 173788 bytes
+SHA1 (patch-tests_test__deprecation.py) = e2e4fa2c14ea0b6ccf003cd1ecc0f6fd694c0fe7
diff -r 5bd257c0ec6f -r e0d55f31a872 devel/py-deprecation/patches/patch-tests_test__deprecation.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-deprecation/patches/patch-tests_test__deprecation.py     Thu Jan 27 11:35:02 2022 +0000
@@ -0,0 +1,43 @@
+$NetBSD: patch-tests_test__deprecation.py,v 1.1 2022/01/27 11:35:02 wiz Exp $
+
+Convert from unittest2 to unittest
+
+--- tests/test_deprecation.py.orig     2020-04-20 14:14:19.000000000 +0000
++++ tests/test_deprecation.py
+@@ -10,16 +10,14 @@
+ # License for the specific language governing permissions and limitations
+ # under the License.
+ 
+-# As we unfortunately support Python 2.7, it lacks TestCase.subTest which
+-# is in 3.4+ or in unittest2
+-import unittest2
++import unittest
+ import warnings
+ 
+ import deprecation
+ from datetime import date
+ 
+ 
+-class Test_deprecated(unittest2.TestCase):
++class Test_deprecated(unittest.TestCase):
+ 
+     def test_args_set_on_base_class(self):
+         args = (1, 2, 3, 4)
+@@ -230,7 +228,7 @@ class Test_deprecated(unittest2.TestCase
+             self.assertEqual(sot.method(), ret_val)
+ 
+ 
+-class Test_fail_if_not_removed(unittest2.TestCase):
++class Test_fail_if_not_removed(unittest.TestCase):
+ 
+     @deprecation.deprecated(deprecated_in="1.0", current_version="2.0")
+     def _deprecated_method(self):
+@@ -259,7 +257,7 @@ class Test_fail_if_not_removed(unittest2
+         except AssertionError:
+             self.fail("A DeprecatedWarning shouldn't cause a failure")
+ 
+-    @unittest2.expectedFailure
++    @unittest.expectedFailure
+     @deprecation.fail_if_not_removed
+     def test_literal_UnsupportedWarning(self):
+         self._unsupported_method()



Home | Main Index | Thread Index | Old Index