Skip to content

Commit

Permalink
TST: start testing on Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Jun 13, 2022
1 parent 8b8b42b commit b7e5736
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/bleeding-edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -101,9 +101,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
Expand Down
8 changes: 6 additions & 2 deletions yt/utilities/configure.py
Original file line number Diff line number Diff line change
@@ -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]] = []


Expand Down

0 comments on commit b7e5736

Please sign in to comment.