Add Python 3.12 support (#141)

This commit is contained in:
Timothy Makobu 2023-10-16 19:05:46 +03:00 committed by GitHub
parent b0c8c32d7f
commit 1ae03f17a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 24 deletions

View file

@ -4,7 +4,7 @@ on: workflow_dispatch
env:
MATURIN_VERSION: 1.3.0
PY_ALL: 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9 pypy3.10
PY_ALL: 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10
jobs:
wheels:
@ -20,7 +20,7 @@ jobs:
- os: ubuntu
platform: linux
- os: macos
interpreter: 3.8 3.9 3.10 3.11 pypy3.9 pypy3.10
interpreter: 3.8 3.9 3.10 3.11 3.12 pypy3.9 pypy3.10
- os: ubuntu
platform: linux
target: aarch64

View file

@ -8,7 +8,7 @@ on:
env:
MATURIN_VERSION: 1.2.3
PYTHON_VERSION: 3.11
PYTHON_VERSION: 3.12
jobs:
lint:

View file

@ -6,7 +6,7 @@ on:
env:
MATURIN_VERSION: 1.3.0
PY_ALL: 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9 pypy3.10
PY_ALL: 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10
jobs:
sdist:
@ -43,7 +43,7 @@ jobs:
- os: ubuntu
platform: linux
- os: macos
interpreter: 3.8 3.9 3.10 3.11 pypy3.9 pypy3.10
interpreter: 3.8 3.9 3.10 3.11 3.12 pypy3.9 pypy3.10
- os: ubuntu
platform: linux
target: aarch64

View file

@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
@ -42,7 +42,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
@ -66,7 +66,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4

View file

@ -61,7 +61,7 @@ lint: lint-python lint-rust
.PHONY: test
test:
pytest -v test
pytest -v tests
.PHONY: all
all: format build-dev lint test

View file

@ -1,7 +1,7 @@
[project]
name = 'granian'
authors = [
{name = 'Giovanni Barillari', email = 'g@baro.dev'}
{ name = 'Giovanni Barillari', email = 'g@baro.dev' }
]
classifiers = [
'Development Status :: 5 - Production/Stable',
@ -15,11 +15,12 @@ classifiers = [
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python',
'Programming Language :: Rust',
'Topic :: Internet :: WWW/HTTP'
'Topic :: Internet :: WWW/HTTP',
]
dynamic = [
@ -27,26 +28,26 @@ dynamic = [
'keywords',
'license',
'readme',
'version'
'version',
]
requires-python = '>=3.8'
dependencies = [
'watchfiles~=0.18',
'typer~=0.4',
'uvloop~=0.17.0; sys_platform != "win32" and platform_python_implementation == "CPython"'
'watchfiles~=0.21',
'typer~=0.9',
'uvloop~=0.18.0; sys_platform != "win32" and platform_python_implementation == "CPython"',
]
[project.optional-dependencies]
lint = [
'black~=23.7.0',
'ruff~=0.0.287'
'black~=23.9.0',
'ruff~=0.0.292',
]
test = [
'httpx~=0.23.0',
'pytest~=7.1.2',
'pytest-asyncio~=0.18.3',
'websockets~=10.3'
'httpx~=0.25.0',
'pytest~=7.4.2',
'pytest-asyncio~=0.21.1',
'websockets~=11.0',
]
[project.urls]
@ -77,7 +78,7 @@ extend-select = [
'Q', # flake8-quotes
'RUF100', # ruff (unused noqa)
'S', # flake8-bandit
'W' # pycodestyle
'W', # pycodestyle
]
extend-ignore = [
'B008', # function calls in args defaults are fine
@ -86,7 +87,7 @@ extend-ignore = [
'B904', # rising without from is fine
'E501', # leave line length to black
'N818', # leave to us exceptions naming
'S101' # assert is fine
'S101', # assert is fine
]
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
mccabe = { max-complexity = 13 }
@ -103,7 +104,7 @@ known-first-party = ['granian', 'tests']
[tool.black]
color = true
line-length = 120
target-version = ['py38', 'py39', 'py310', 'py311']
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
skip-string-normalization = true # leave this to ruff
skip-magic-trailing-comma = true # leave this to ruff