Skip to content

Commit a0c156d

Browse files
Debian Science Teamrebecca-palmer
Debian Science Team
authored andcommitted
Fix pytables expressions with Python 3.9
ast.Index has been replaced by a bare value, so we need to do the conversion from Constant to int Author: Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/972015 Forwarded: pandas-dev/pandas#37217 Gbp-Pq: Name python39_compat.patch
1 parent a44db2e commit a0c156d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/core/computation/pytables.py

+4
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@ def visit_Subscript(self, node, **kwargs):
425425
value = value.value
426426
except AttributeError:
427427
pass
428+
try:
429+
slobj = slobj.value
430+
except AttributeError:
431+
pass
428432

429433
try:
430434
return self.const_type(value[slobj], self.env)

0 commit comments

Comments
 (0)