Skip to content

Commit 448678e

Browse files
committed
Add support for Python 3.10
1 parent de07d0a commit 448678e

File tree

3 files changed

+29
-19
lines changed

3 files changed

+29
-19
lines changed

.github/workflows/tests.yml

+26-17
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,16 @@ jobs:
1717
# job.
1818
strategy:
1919
matrix:
20-
python-version: [3.6, 3.7, 3.8, 3.9]
21-
os: [ubuntu-latest, macos-latest, windows-latest]
20+
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0-beta.4]
21+
os: [ubuntu-latest, macos-latest, windows-latest]
22+
loop: [asyncio, uvloop]
23+
exclude:
24+
# uvloop does not support Python 3.6
25+
- loop: uvloop
26+
python-version: 3.6
27+
# uvloop does not support windows
28+
- loop: uvloop
29+
os: windows-latest
2230

2331
runs-on: ${{ matrix.os }}
2432

@@ -27,23 +35,23 @@ jobs:
2735
shell: bash
2836

2937
steps:
30-
- uses: actions/checkout@v1
38+
- uses: actions/checkout@v2
3139
with:
3240
fetch-depth: 50
3341
submodules: true
3442

3543
- name: Check if release PR.
3644
uses: edgedb/action-release/validate-pr@master
37-
continue-on-error: true
3845
id: release
3946
with:
4047
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
48+
missing_version_ok: yes
4149
version_file: asyncpg/_version.py
4250
version_line_pattern: |
4351
__version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"])
4452
4553
- name: Set up Python ${{ matrix.python-version }}
46-
uses: actions/setup-python@v1
54+
uses: actions/setup-python@v2
4755
if: steps.release.outputs.version == 0
4856
with:
4957
python-version: ${{ matrix.python-version }}
@@ -56,28 +64,29 @@ jobs:
5664
- name: Install Python Deps
5765
if: steps.release.outputs.version == 0
5866
run: |
59-
python -m pip install -U pip setuptools
60-
pip install -e .[test]
67+
python -m pip install -U pip setuptools wheel
68+
python -m pip install -e .[test]
6169
6270
- name: Test
6371
if: steps.release.outputs.version == 0
72+
env:
73+
LOOP_IMPL: ${{ matrix.loop }}
6474
run: |
65-
python setup.py test
66-
67-
- name: Test under uvloop
68-
if: steps.release.outputs.version == 0 && matrix.os != 'windows-latest' && matrix.python-version != '3.9'
69-
run: |
70-
env USE_UVLOOP=1 python setup.py test
75+
if [ "${LOOP_IMPL}" = "uvloop" ]; then
76+
env USE_UVLOOP=1 python setup.py test
77+
else
78+
python setup.py test
79+
fi
7180
7281
test-postgres:
7382
strategy:
7483
matrix:
7584
postgres-version: [9.5, 9.6, 10, 11, 12, 13]
7685

77-
runs-on: ubuntu-20.04
86+
runs-on: ubuntu-latest
7887

7988
steps:
80-
- uses: actions/checkout@v1
89+
- uses: actions/checkout@v2
8190
with:
8291
fetch-depth: 50
8392
submodules: true
@@ -104,7 +113,7 @@ jobs:
104113
>> "${GITHUB_ENV}"
105114
106115
- name: Set up Python ${{ matrix.python-version }}
107-
uses: actions/setup-python@v1
116+
uses: actions/setup-python@v2
108117
if: steps.release.outputs.version == 0
109118
with:
110119
python-version: ${{ matrix.python-version }}
@@ -127,7 +136,7 @@ jobs:
127136
regression-tests:
128137
name: "Regression Tests"
129138
needs: [test-platforms, test-postgres]
130-
runs-on: ubuntu-20.04
139+
runs-on: ubuntu-latest
131140

132141
steps:
133142
- run: echo OK

asyncpg/pgproto

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# (example breakage: https://gitlab.com/pycqa/flake8/issues/427)
3535
'pycodestyle~=2.5.0',
3636
'flake8~=3.7.9',
37-
'uvloop~=0.14.0;platform_system!="Windows"',
37+
'uvloop>=0.15.3; platform_system != "Windows" and python_version >= "3.7"',
3838
]
3939

4040
# Dependencies required to build documentation.
@@ -263,6 +263,7 @@ def finalize_options(self):
263263
'Programming Language :: Python :: 3.7',
264264
'Programming Language :: Python :: 3.8',
265265
'Programming Language :: Python :: 3.9',
266+
'Programming Language :: Python :: 3.10',
266267
'Programming Language :: Python :: Implementation :: CPython',
267268
'Topic :: Database :: Front-Ends',
268269
],

0 commit comments

Comments
 (0)