Skip to content

Commit ca7b924

Browse files
authored
Merge pull request #238 from Flared/isra/add-py310-support
Add support to python 3.10 and 3.11
2 parents 95117b0 + 57151ca commit ca7b924

File tree

4 files changed

+53
-12
lines changed

4 files changed

+53
-12
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,59 @@ on:
1010

1111
jobs:
1212
ci:
13-
runs-on: ${{ matrix.os }}
14-
container: docker://altendky/hydra:ubuntu-20.04-3-minors
13+
runs-on: ubuntu-latest
1514
strategy:
1615
fail-fast: false
1716
matrix:
18-
os:
19-
- ubuntu-latest
17+
python:
18+
- version: "3.7"
19+
bin: python3.7
20+
tox: py37,report,codecov
21+
- version: "3.8"
22+
bin: python3.8
23+
tox: py38,report,codecov
24+
- version: "3.9"
25+
bin: python3.9
26+
tox: py39,report,codecov
27+
- version: "3.10"
28+
bin: python3.10
29+
tox: py310,report,codecov
30+
- version: "3.11"
31+
bin: python3.11
32+
tox: py311,report,codecov
33+
- version: pypy-3.7
34+
bin: pypy3
35+
tox: pypy3,report,codecov
36+
env:
37+
TOXTOOLPYTHON: "${{ matrix.python.bin }}"
38+
steps:
39+
- uses: actions/checkout@v3
40+
- name: Setup Python
41+
uses: actions/setup-python@v4
42+
with:
43+
python-version: ${{ matrix.python.version }}
44+
- name: Install
45+
run: |
46+
pip install tox
47+
- name: Test
48+
run: |
49+
tox -v -e "${{ matrix.python.tox }}"
50+
linting:
51+
name: Linting
52+
runs-on: ubuntu-latest
53+
strategy:
54+
matrix:
55+
python: ["3.10"]
2056
toxenv:
21-
- py37,report,codecov
22-
- py38,report,codecov
23-
- py39,report,codecov
24-
- pypy3,report,codecov
2557
- doc
2658
- check
2759
steps:
28-
- uses: actions/checkout@v1
60+
- uses: actions/checkout@v3
61+
- name: Set up Python ${{ matrix.python }}
62+
uses: actions/setup-python@v4
63+
with:
64+
python-version: ${{ matrix.python }}
65+
architecture: x64
2966
- name: Install
3067
run: |
3168
pip install tox
@@ -37,6 +74,7 @@ jobs:
3774
runs-on: ubuntu-latest
3875
needs:
3976
- ci
77+
- linting
4078
steps:
4179
- name: This
4280
shell: python

changelog.d/238.changes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support to Python 3.10 and 3.11.

src/desert/_make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def field_for_schema(
300300

301301
# t.NewType returns a function with a __supertype__ attribute
302302
newtype_supertype = getattr(typ, "__supertype__", None)
303-
if newtype_supertype and inspect.isfunction(typ):
303+
if newtype_supertype and typing_inspect.is_new_type(typ):
304304
metadata.setdefault("description", typ.__name__)
305305
field = field_for_schema(newtype_supertype, default=default)
306306

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ envlist =
55
clean,
66
check,
77
doc,
8-
{py37,py38,py39,pypy3},
8+
{py37,py38,py39,py310,py311,pypy3},
99
report
1010

1111
[testenv]
@@ -14,7 +14,9 @@ basepython =
1414
py37: {env:TOXPYTHON:python3.7}
1515
py38: {env:TOXPYTHON:python3.8}
1616
py39: {env:TOXPYTHON:python3.9}
17-
{doc,spell,bootstrap,clean,check,report,codecov}: {env:TOXTOOLPYTHON:python3.8}
17+
py310: {env:TOXPYTHON:python3.10}
18+
py311: {env:TOXPYTHON:python3.11}
19+
{doc,spell,bootstrap,clean,check,report,codecov}: {env:TOXTOOLPYTHON:python3.10}
1820
setenv =
1921
PYTHONPATH={toxinidir}/tests
2022
PYTHONUNBUFFERED=yes

0 commit comments

Comments
 (0)