commit:     8638db6456176bed1182784e26f747639f57075b
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 25 08:17:36 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Jan 25 10:55:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8638db64

dev-python/stone: enable python3_11

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 dev-python/stone/Manifest                           |  2 +-
 dev-python/stone/files/stone-3.3.1-python3_11.patch | 15 +++++++++++++++
 dev-python/stone/stone-3.3.1.ebuild                 |  7 +++++--
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/dev-python/stone/Manifest b/dev-python/stone/Manifest
index 619d554c0..8a0159f95 100644
--- a/dev-python/stone/Manifest
+++ b/dev-python/stone/Manifest
@@ -1 +1 @@
-DIST stone-3.3.1.tar.gz 282831 BLAKE2B 
b9a866e43feedea28cd33b89f78100be520a2756fa78888e9a786ae27942a5c19df51010c0af952de70c782d3fc3588de1ae0f58450d807053989bb91d285f15
 SHA512 
ee07f01b6f10e771afbe6ca6f07d7efa24a5460e5c163f339ae84a8b7742a659f5cb535e674a2f315d1bfa95b7c02e56f46db1f397188b5b6705f6c00c1e9d73
+DIST stone-3.3.1.gh.tar.gz 282831 BLAKE2B 
b9a866e43feedea28cd33b89f78100be520a2756fa78888e9a786ae27942a5c19df51010c0af952de70c782d3fc3588de1ae0f58450d807053989bb91d285f15
 SHA512 
ee07f01b6f10e771afbe6ca6f07d7efa24a5460e5c163f339ae84a8b7742a659f5cb535e674a2f315d1bfa95b7c02e56f46db1f397188b5b6705f6c00c1e9d73

diff --git a/dev-python/stone/files/stone-3.3.1-python3_11.patch 
b/dev-python/stone/files/stone-3.3.1-python3_11.patch
new file mode 100644
index 000000000..f2826fdc5
--- /dev/null
+++ b/dev-python/stone/files/stone-3.3.1-python3_11.patch
@@ -0,0 +1,15 @@
+Replace method deprecated in 3.10 and removed in 3.11.  Upstream is slow to 
release a fix.
+
+See also: https://github.com/dropbox/stone/issues/288
+
+--- a/stone/frontend/ir_generator.py
++++ b/stone/frontend/ir_generator.py
+@@ -1074,7 +1074,7 @@
+         assert issubclass(data_type_class, DataType), \
+             'Expected stone.data_type.DataType, got %r' % data_type_class
+ 
+-        argspec = inspect.getargspec(data_type_class.__init__)  # noqa: E501 
# pylint: disable=deprecated-method,useless-suppression
++        argspec = inspect.getfullargspec(data_type_class.__init__)
+         argspec.args.remove('self')
+         num_args = len(argspec.args)
+         # Unfortunately, argspec.defaults is None if there are no defaults

diff --git a/dev-python/stone/stone-3.3.1.ebuild 
b/dev-python/stone/stone-3.3.1.ebuild
index 09fba448a..e588e6fa8 100644
--- a/dev-python/stone/stone-3.3.1.ebuild
+++ b/dev-python/stone/stone-3.3.1.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} )
 
 inherit distutils-r1
 
@@ -13,7 +14,7 @@ HOMEPAGE="
        https://github.com/dropbox/stone
        https://pypi.org/project/stone/
 "
-SRC_URI="https://github.com/dropbox/${PN}/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI="https://github.com/dropbox/${PN}/archive/refs/tags/v${PV}.tar.gz -> 
${P}.gh.tar.gz"
 
 LICENSE="MIT"
 SLOT="0"
@@ -24,6 +25,8 @@ RDEPEND="
        >=dev-python/six-1.3.0[${PYTHON_USEDEP}]
 "
 
+PATCHES=( "${FILESDIR}"/${P}-python3_11.patch )
+
 distutils_enable_tests pytest
 
 python_prepare_all() {

Reply via email to