From a2b4198a9e9de485c707a45855396a61569a18b7 Mon Sep 17 00:00:00 2001 From: Kyle Mandli Date: Mon, 2 Nov 2026 12:34:57 -0500 Subject: [PATCH] Remove remaining six usage from petclaw petclaw/plot.py imported six, breaking collection of petclaw tests in the macOS nightly CI where six is not installed. Signed-off-by: Kyle Mandli Assisted-by: claude claude-opus-5-5 --- src/petclaw/fileio/hdf5.py | 5 ++--- src/petclaw/fileio/petsc.py | 1 - src/petclaw/plot.py | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/petclaw/fileio/hdf5.py b/src/petclaw/fileio/hdf5.py index 8fdf612d..482294cb 100644 --- a/src/petclaw/fileio/hdf5.py +++ b/src/petclaw/fileio/hdf5.py @@ -15,7 +15,6 @@ from clawpack.petclaw import geometry from clawpack import petclaw -import six logger = logging.getLogger('pyclaw.fileio') @@ -81,7 +80,7 @@ def write(solution,frame,path,file_prefix='claw',write_aux=False, """ option_defaults = {'compression':None,'compression_opts':None, 'chunks':None,'shuffle':False,'fletcher32':False} - for (k,v) in six.iteritems(option_defaults): + for (k,v) in option_defaults.items(): options[k] = options.get(k,v) filename = os.path.join(path,'%s%s.hdf' % @@ -160,7 +159,7 @@ def read(solution,frame,path='./',file_prefix='claw',read_aux=True, patches = [] with h5py.File(filename,'r',driver='mpio',comm=MPI.COMM_WORLD) as f: - for patch in six.itervalues(f): + for patch in f.values(): # Construct each dimension dimensions = [] dim_names = [ name.decode('ascii') diff --git a/src/petclaw/fileio/petsc.py b/src/petclaw/fileio/petsc.py index e0f9251c..ba266b02 100644 --- a/src/petclaw/fileio/petsc.py +++ b/src/petclaw/fileio/petsc.py @@ -10,7 +10,6 @@ from petsc4py import PETSc import pickle import os -from six.moves import range def write(solution,frame,path='./',file_prefix='claw',write_aux=False, diff --git a/src/petclaw/plot.py b/src/petclaw/plot.py index 1eb4ded6..e194ba36 100644 --- a/src/petclaw/plot.py +++ b/src/petclaw/plot.py @@ -1,4 +1,3 @@ -from six.moves import range def interactive_plot(outdir='./_output',file_format='petsc',setplot=None): """ Convenience function for launching an interactive plotting session.