diff --git a/.azure/templates/install.yml b/.azure/templates/install.yml index 4e3bdd7b3f..c5796e5b83 100644 --- a/.azure/templates/install.yml +++ b/.azure/templates/install.yml @@ -10,6 +10,17 @@ parameters: default: scipy steps: + - bash: | + # laggards on Azure/GHA team dropped miniconda on macos images + # https://github.com/actions/runner-images/issues/9262 + mkdir -p ~/miniconda3 + curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh + bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 + rm ~/miniconda3/miniconda.sh + echo "##vso[task.setvariable variable=CONDA;]${HOME}/miniconda3" + displayName: Install miniconda + condition: startsWith(variables.image, 'macos') + - bash: echo "##vso[task.prependpath]$CONDA/bin" displayName: Add conda to PATH condition: or(startsWith(variables.image, 'macos'), startsWith(variables.image, 'ubuntu')) diff --git a/fipy/variables/operatorVariable.py b/fipy/variables/operatorVariable.py index bf30f0bf9c..4a2342d7a2 100644 --- a/fipy/variables/operatorVariable.py +++ b/fipy/variables/operatorVariable.py @@ -238,7 +238,7 @@ def _py3kInstructions(self, op, style, argDict, id, freshen): stack.append(stack.pop() + "(" + ", ".join(args + kwargs) + ")") elif ins.opname == 'LOAD_DEREF': # Changed in Python 3.11 - stack.append(op.__closure__[ins.arg-1].cell_contents) + stack.append(ins.argrepr) elif ins.opname == 'RESUME': # New in Python 3.11 pass @@ -250,8 +250,8 @@ def _py3kInstructions(self, op, style, argDict, id, freshen): pass elif ins.opname == 'CALL': # New in Python 3.11 - kwargs = [kw + "=" + str(stack.pop()) for kw in kws] - positionals = [stack.pop() for _ in range(ins.argval - len(kws))] + kwargs = [kw + "=" + str(stack.pop()) for kw in kws][::-1] + positionals = [stack.pop() for _ in range(ins.argval - len(kws))][::-1] callable = stack.pop() if len(stack) > 0: call_self = callable @@ -1257,6 +1257,12 @@ def _testBinOp(self): [[ 0 1 2 3 4 5 6 7 8] [ 0 -1 -2 -3 -4 -5 -6 -7 -8]] + Test operator variable with unusual index argument + + >>> vcv.dot(vcv) # doctest: +ELLIPSIS + (...MeshVariable._dot(CellVariable(value=array([[0, 1, 2], + [1, 2, 3]]), mesh=UniformGrid2D(dx=1.0, nx=3, dy=1.0, ny=1)), CellVariable(value=array([[0, 1, 2], + [1, 2, 3]]), mesh=UniformGrid2D(dx=1.0, nx=3, dy=1.0, ny=1)), index)) """ pass