gems-uff / noworkflow

Supporting infrastructure to run scientific experiments without a scientific workflow management system.
http://gems-uff.github.io/noworkflow
MIT License
115 stars 28 forks source link

Support newer python versions #155

Open JoaoFelipe opened 3 weeks ago

JoaoFelipe commented 3 weeks ago

We need to update noworkflow to support newer Python version. I'm creating this issues to document what we need to fix on noworkflow for that.

JoaoFelipe commented 3 weeks ago

Before Python 3.9, Subscript was defined as:

Subscript(expr value, slice slice, expr_context ctx)

and slice was defined as

slice = Slice(expr? lower, expr? upper, expr? step)
          | ExtSlice(slice* dims)
          | Index(expr value)

Now, subscript accepts an expression as slice:

Subscript(expr value, expr slice, expr_context ctx)

The Index and ExtSlice nodes were removed, and Slice became an expression. I don't think we have a special logic for Index in noWorkflow, so we don't need to change anything about that. But we may need to change what we had for ExtSlice and for Slice.