guru/dev-python/stone/files/stone-3.3.1-python3_11.patch
Viorel Munteanu 8638db6456
dev-python/stone: enable python3_11
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
2023-01-25 12:55:35 +02:00

16 lines
730 B
Diff

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