Python 3.10 support (#432)

This commit is contained in:
Elvis Pranskevichus 2021-08-06 18:02:12 -07:00 committed by GitHub
parent 6cb2ed0f3d
commit 2519e2df62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 19 deletions

View File

@ -1,5 +1,5 @@
[flake8]
filename = *.py,*.pyx,*.pxd,*.pxi,*.pyi
filename = *.py,*.pyi
ignore = E402,E731,D100,D101,D102,D103,D104,D105,W503,W504,E252
exclude = .git,__pycache__,build,dist,.eggs,postgres,vendor

View File

@ -14,27 +14,27 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, 3.10.0-rc.1]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 50
submodules: true
- name: Check if release PR.
uses: edgedb/action-release/validate-pr@master
continue-on-error: true
id: release
with:
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
missing_version_ok: yes
version_file: uvloop/_version.py
version_line_pattern: |
__version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"])
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
if: steps.release.outputs.version == 0
with:
python-version: ${{ matrix.python-version }}
@ -60,7 +60,7 @@ jobs:
regression-tests:
name: "Regression Tests"
needs: [test]
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- run: echo OK

View File

@ -2,17 +2,22 @@
import alabaster
import os
import re
import sys
sys.path.insert(0, os.path.abspath('..'))
with open(os.path.abspath('../setup.py'), 'rt') as f:
_m = re.search(r'''VERSION\s*=\s*(?P<q>'|")(?P<ver>[\d\.]+)(?P=q)''',
f.read())
if not _m:
raise RuntimeError('unable to read the version from setup.py')
version = _m.group('ver')
version_file = os.path.join(os.path.dirname(os.path.dirname(__file__)),
'uvloop', '_version.py')
with open(version_file, 'r') as f:
for line in f:
if line.startswith('__version__ ='):
_, _, version = line.partition('=')
version = version.strip(" \n'\"")
break
else:
raise RuntimeError(
'unable to read the version from uvloop/_version.py')
# -- General configuration ------------------------------------------------

View File

@ -1,4 +1,4 @@
[pytest]
addopts = --capture=no --assert=plain --strict --tb native
addopts = --capture=no --assert=plain --strict-markers --tb native
testpaths = tests
filterwarnings = default

View File

@ -29,18 +29,18 @@ TEST_DEPENDENCIES = [
# their combination breaks too often
# (example breakage: https://gitlab.com/pycqa/flake8/issues/427)
'aiohttp',
'flake8~=3.8.4',
'flake8~=3.9.2',
'psutil',
'pycodestyle~=2.6.0',
'pycodestyle~=2.7.0',
'pyOpenSSL~=19.0.0',
'mypy>=0.800',
]
# Dependencies required to build documentation.
DOC_DEPENDENCIES = [
'Sphinx~=1.7.3',
'sphinxcontrib-asyncio~=0.2.0',
'sphinx_rtd_theme~=0.2.4',
'Sphinx~=4.1.2',
'sphinxcontrib-asyncio~=0.3.0',
'sphinx_rtd_theme~=0.5.2',
]
EXTRA_DEPENDENCIES = {
@ -311,6 +311,7 @@ setup(
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: Apache Software License',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',