public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/deprecated/, dev-python/deprecated/files/
@ 2021-02-19  8:58 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-02-19  8:58 UTC (permalink / raw
  To: gentoo-commits

commit:     4adf6bb483480d045f450a387d9b7531c442a5bf
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 19 08:57:20 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Feb 19 08:57:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4adf6bb4

dev-python/deprecated: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/deprecated/Manifest                     |  1 -
 dev-python/deprecated/deprecated-1.2.10.ebuild     | 23 ---------
 .../deprecated/files/deprecated-1.2.10-py39.patch  | 57 ----------------------
 3 files changed, 81 deletions(-)

diff --git a/dev-python/deprecated/Manifest b/dev-python/deprecated/Manifest
index 7c981b68070..8913bac94ff 100644
--- a/dev-python/deprecated/Manifest
+++ b/dev-python/deprecated/Manifest
@@ -1,2 +1 @@
-DIST deprecated-1.2.10.gh.tar.gz 2967353 BLAKE2B 941fa81dd27940be4fde1219a9fe127777354aa2054b15178cade4a859b01f8dff426e0da8161bac580ff6446b44767f3207b474bb5f555826239db039085497 SHA512 4bd53b759d04ab15c74a4c147b2c69c73aed6e40555acf0e84cf0c5b7ffe248da234bd1311c5629f9357d50bc08e55e81363340dcfdabe88933525bcc7859a70
 DIST deprecated-1.2.11.gh.tar.gz 2968469 BLAKE2B 5b1b8872e8786897a51ff96a659ceef0deed81b3cf02edc1f69b6ee504a3c4510621b56678dd28fa795231dfe8481daf3a77bb151ee117fe0541af1983412548 SHA512 343f62a7a658569de885ac923a1de7f7b4cc5bf63d27d1b13474795ca38cc52932e35133b45d05c1b42d498af56f5945fad5c49b3cbdebda70337294da5d84c4

diff --git a/dev-python/deprecated/deprecated-1.2.10.ebuild b/dev-python/deprecated/deprecated-1.2.10.ebuild
deleted file mode 100644
index d9befb9fe1a..00000000000
--- a/dev-python/deprecated/deprecated-1.2.10.ebuild
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 2019-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} pypy3 )
-inherit distutils-r1
-
-DESCRIPTION="Python @deprecated decorator to deprecate old API"
-HOMEPAGE="https://github.com/tantale/deprecated"
-SRC_URI="https://github.com/tantale/deprecated/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-RDEPEND="dev-python/wrapt[${PYTHON_USEDEP}]"
-
-distutils_enable_tests pytest
-
-PATCHES=(
-	"${FILESDIR}"/${P}-py39.patch
-)

diff --git a/dev-python/deprecated/files/deprecated-1.2.10-py39.patch b/dev-python/deprecated/files/deprecated-1.2.10-py39.patch
deleted file mode 100644
index 42ab81445b7..00000000000
--- a/dev-python/deprecated/files/deprecated-1.2.10-py39.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 629e7b702ede03262afeb86cd7a6d42d739504d2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 30 May 2020 09:30:58 +0200
-Subject: [PATCH] Update expected class method deprecation msgs in tests for
- py3.9
-
-Python 3.9 has fixed @classmethod combining with other decorators,
-making deprecated correctly report 'class method' (instead of function
-or static method).  Update the tests to account for that.
-
-Fixes #29
----
- tests/test_deprecated.py | 6 +++++-
- tests/test_sphinx.py     | 5 ++++-
- 2 files changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py
-index 3796640..e4c00ef 100644
---- a/tests/test_deprecated.py
-+++ b/tests/test_deprecated.py
-@@ -1,4 +1,5 @@
- # -*- coding: utf-8 -*-
-+import sys
- import warnings
- 
- import pytest
-@@ -184,7 +185,10 @@ def test_classic_deprecated_class_method__warns(classic_deprecated_class_method)
-     assert len(warns) == 1
-     warn = warns[0]
-     assert issubclass(warn.category, DeprecationWarning)
--    assert "deprecated function (or staticmethod)" in str(warn.message)
-+    if sys.version_info >= (3, 9):
-+        assert "deprecated class method" in str(warn.message)
-+    else:
-+        assert "deprecated function (or staticmethod)" in str(warn.message)
-     assert warn.filename == __file__, 'Incorrect warning stackLevel'
- 
- 
-diff --git a/tests/test_sphinx.py b/tests/test_sphinx.py
-index 42f2460..efc8628 100644
---- a/tests/test_sphinx.py
-+++ b/tests/test_sphinx.py
-@@ -334,7 +334,10 @@ def test_sphinx_deprecated_class_method__warns(sphinx_deprecated_class_method):
-     assert len(warns) == 1
-     warn = warns[0]
-     assert issubclass(warn.category, DeprecationWarning)
--    assert "deprecated function (or staticmethod)" in str(warn.message)
-+    if sys.version_info >= (3, 9):
-+        assert "deprecated class method" in str(warn.message)
-+    else:
-+        assert "deprecated function (or staticmethod)" in str(warn.message)
- 
- 
- def test_should_raise_type_error():
--- 
-2.26.2
-


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/deprecated/, dev-python/deprecated/files/
@ 2024-06-28  6:07 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-06-28  6:07 UTC (permalink / raw
  To: gentoo-commits

commit:     97e258600de0bcd413ff98f84c331908cc0b3788
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 28 05:55:47 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 28 05:55:47 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97e25860

dev-python/deprecated: Enable py3.13

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/deprecated/deprecated-1.2.14.ebuild     |  6 +++-
 .../deprecated/files/deprecated-1.2.14-py313.patch | 34 ++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/dev-python/deprecated/deprecated-1.2.14.ebuild b/dev-python/deprecated/deprecated-1.2.14.ebuild
index 2503a4b7b259..9f120ca0b27b 100644
--- a/dev-python/deprecated/deprecated-1.2.14.ebuild
+++ b/dev-python/deprecated/deprecated-1.2.14.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 DISTUTILS_USE_PEP517=setuptools
 PYPI_NO_NORMALIZE=1
 PYPI_PN=${PN^}
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
 
 inherit distutils-r1 pypi
 
@@ -24,4 +24,8 @@ RDEPEND="
 	dev-python/wrapt[${PYTHON_USEDEP}]
 "
 
+PATCHES=(
+	"${FILESDIR}/${P}-py313.patch"
+)
+
 distutils_enable_tests pytest

diff --git a/dev-python/deprecated/files/deprecated-1.2.14-py313.patch b/dev-python/deprecated/files/deprecated-1.2.14-py313.patch
new file mode 100644
index 000000000000..b0daead38417
--- /dev/null
+++ b/dev-python/deprecated/files/deprecated-1.2.14-py313.patch
@@ -0,0 +1,34 @@
+diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py
+index 0e467ae..69b10c1 100644
+--- a/tests/test_deprecated.py
++++ b/tests/test_deprecated.py
+@@ -152,6 +152,7 @@ def test_classic_deprecated_class__warns(classic_deprecated_class):
+         classic_deprecated_class()
+     assert len(warns) == 1
+     warn = warns[0]
++    print(warns)
+     assert issubclass(warn.category, DeprecationWarning)
+     assert "deprecated class" in str(warn.message)
+     assert warn.filename == __file__ or warn.category is WrongStackLevelWarning, 'Incorrect warning stackLevel'
+@@ -191,7 +192,7 @@ def test_classic_deprecated_class_method__warns(classic_deprecated_class_method)
+     assert len(warns) == 1
+     warn = warns[0]
+     assert issubclass(warn.category, DeprecationWarning)
+-    if sys.version_info >= (3, 9):
++    if (3, 9) <= sys.version_info < (3, 13):
+         assert "deprecated class method" in str(warn.message)
+     else:
+         assert "deprecated function (or staticmethod)" in str(warn.message)
+diff --git a/tests/test_sphinx.py b/tests/test_sphinx.py
+index a1d7753..8cf8e95 100644
+--- a/tests/test_sphinx.py
++++ b/tests/test_sphinx.py
+@@ -301,7 +301,7 @@ def test_sphinx_deprecated_class_method__warns(sphinx_deprecated_class_method):
+     assert len(warns) == 1
+     warn = warns[0]
+     assert issubclass(warn.category, DeprecationWarning)
+-    if sys.version_info >= (3, 9):
++    if (3, 9) <= sys.version_info < (3, 13):
+         assert "deprecated class method" in str(warn.message)
+     else:
+         assert "deprecated function (or staticmethod)" in str(warn.message)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-28  6:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-19  8:58 [gentoo-commits] repo/gentoo:master commit in: dev-python/deprecated/, dev-python/deprecated/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-06-28  6:07 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox