Skip to content

Commit c0972d2

Browse files
authored
add python 3.11 tests (#722)
uvloop is disabled on python 3.11 for now due to cython incompatibility. a new cython version has since been released but uvloop needs to be built against this new cython version. see MagicStack/uvloop#450 and MagicStack/uvloop#459
1 parent c9e349d commit c0972d2

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- '3.8'
2727
- '3.9'
2828
- '3.10'
29-
# - '3.11.0-alpha.4'
29+
- '3.11-dev'
3030
db:
3131
- [mysql, '5.7']
3232
- [mysql, '8.0']

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ PyMySQL>=1.0.0,<=1.0.2
88
sphinx>=1.8.1, <4.4.1
99
sphinxcontrib-asyncio==0.3.0
1010
sqlalchemy>1.2.12,<=1.3.16
11-
uvloop==0.16.0
11+
uvloop==0.16.0; python_version < '3.11'
1212
pyroma==3.2

tests/conftest.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,21 @@
33
import os
44
import re
55
import ssl
6+
import sys
67

78
import aiomysql
89
import pymysql
910
import pytest
10-
import uvloop
11+
12+
13+
# version gate can be removed once uvloop supports python 3.11
14+
# https://github.com/MagicStack/uvloop/issues/450
15+
# https://github.com/MagicStack/uvloop/pull/459
16+
PY_311 = sys.version_info >= (3, 11)
17+
if PY_311:
18+
uvloop = None
19+
else:
20+
import uvloop
1121

1222

1323
@pytest.fixture

0 commit comments

Comments
 (0)