diff --git a/.github/workflows/bleeding-edge.yaml b/.github/workflows/bleeding-edge.yaml index d810c08c4a5..73e5443ab0d 100644 --- a/.github/workflows/bleeding-edge.yaml +++ b/.github/workflows/bleeding-edge.yaml @@ -40,8 +40,7 @@ jobs: # the '-dev' suffix allows to use alphas and betas if no final release is available yet # this version should be upgraded as often as possible, typically once a year when numpy # and Cython are known to be compatible - # for next update (to '3.11-dev', 2022), see https://github.com/numpy/numpy/pull/21308 - python-version: '3.10-dev' + python-version: '3.11-dev' - name: Install dependencies run: | diff --git a/setup.cfg b/setup.cfg index 62803de27ba..e5b13531c53 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,10 +43,10 @@ install_requires = numpy>=1.14.5 packaging>=20.9 pyparsing>0.0 # hard dependency to MPL. We require it (unconstrained) in case MPL drops it in the future - tomli>=1.2.3 tomli-w>=0.4.0 tqdm>=3.4.0 unyt>=2.8.0 + tomli>=1.2.3;python_version < '3.11' python_requires = >=3.7,<3.12 include_package_data = True scripts = scripts/iyt @@ -102,9 +102,9 @@ minimal = matplotlib==2.2.3 more-itertools==8.4 numpy==1.14.5 - tomli==1.2.3 tomli-w==0.4.0 unyt==2.8.0 + tomli==1.2.3;python_version < '3.11' test = codecov~=2.0.15 coverage~=4.5.1 diff --git a/yt/utilities/configure.py b/yt/utilities/configure.py index 7345afcb9a1..132597ecb28 100644 --- a/yt/utilities/configure.py +++ b/yt/utilities/configure.py @@ -1,14 +1,18 @@ import os +import sys import warnings from typing import Callable, List -# TODO: import tomllib from the standard library instead in Python >= 3.11 -import tomli as tomllib import tomli_w from more_itertools import always_iterable from yt.utilities.configuration_tree import ConfigLeaf, ConfigNode +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib + configuration_callbacks: List[Callable[["YTConfig"], None]] = [] diff --git a/yt/visualization/volume_rendering/tests/test_composite.py b/yt/visualization/volume_rendering/tests/test_composite.py index e561413ba13..dedd6a3386a 100644 --- a/yt/visualization/volume_rendering/tests/test_composite.py +++ b/yt/visualization/volume_rendering/tests/test_composite.py @@ -81,4 +81,3 @@ def test_composite_vr(self): im = sc.render() im = ImageArray(im.d) im.write_png("composite.png") - return im diff --git a/yt/visualization/volume_rendering/tests/test_points.py b/yt/visualization/volume_rendering/tests/test_points.py index 165e02b671a..25c0d86da9e 100644 --- a/yt/visualization/volume_rendering/tests/test_points.py +++ b/yt/visualization/volume_rendering/tests/test_points.py @@ -66,4 +66,3 @@ def test_points_vr(self): sc.add_source(points_source) im = sc.render() im.write_png("points.png") - return im diff --git a/yt/visualization/volume_rendering/tests/test_save_render.py b/yt/visualization/volume_rendering/tests/test_save_render.py index e2930966c67..16b5ca18fcb 100644 --- a/yt/visualization/volume_rendering/tests/test_save_render.py +++ b/yt/visualization/volume_rendering/tests/test_save_render.py @@ -43,5 +43,3 @@ def test_save_render(self): # save a different format with/without sigma clips sc.save(os.path.join(self.tmpdir, "no_clip.jpg"), render=False) sc.save(os.path.join(self.tmpdir, "clip_2.jpg"), sigma_clip=2, render=False) - - return sc diff --git a/yt/visualization/volume_rendering/tests/test_simple_vr.py b/yt/visualization/volume_rendering/tests/test_simple_vr.py index 526938e0517..996f459f497 100644 --- a/yt/visualization/volume_rendering/tests/test_simple_vr.py +++ b/yt/visualization/volume_rendering/tests/test_simple_vr.py @@ -34,5 +34,4 @@ def tearDown(self): def test_simple_vr(self): ds = fake_random_ds(32) - im, sc = yt.volume_render(ds, fname="test.png", sigma_clip=4.0) - return im, sc + _im, _sc = yt.volume_render(ds, fname="test.png", sigma_clip=4.0)