* Do not use removed ast class. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pscript?expand=0&rev=24
18 lines
781 B
Diff
18 lines
781 B
Diff
Index: pscript-0.8.0/pscript/commonast.py
|
|
===================================================================
|
|
--- pscript-0.8.0.orig/pscript/commonast.py
|
|
+++ pscript-0.8.0/pscript/commonast.py
|
|
@@ -1032,7 +1032,11 @@ class NativeAstConverter:
|
|
|
|
def _convert_index_like(self, n):
|
|
c = self._convert
|
|
- if isinstance(n, (ast.Slice, ast.Index, ast.ExtSlice, ast.Ellipsis)):
|
|
+ if sys.version_info[:2] >= (3, 14):
|
|
+ check_inst = (ast.Slice, ast.Index, ast.ExtSlice)
|
|
+ else:
|
|
+ check_inst = (ast.Slice, ast.Index, ast.ExtSlice, ast.Ellipsis)
|
|
+ if isinstance(n, check_inst):
|
|
return c(n) # Python < 3.8 (and also 3.8 on Windows?)
|
|
elif isinstance(n, ast.Tuple):
|
|
assert isinstance(n, ast.Tuple)
|