dev-python/stone: enable python3_11

Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
This commit is contained in:
Viorel Munteanu
2023-01-25 10:17:36 +02:00
parent 75b669333f
commit 8638db6456
3 changed files with 21 additions and 3 deletions

View File

@@ -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