mirror of
https://github.com/django/daphne.git
synced 2024-11-25 01:03:45 +03:00
Updated supported Python and dependency versions. (#417)
* Updated Python support and dependencies. * Updated Python support in README. * Removed PY36 from GHA workflow. * Remove pre-commit workflow. Fixes #397 * Updated Black in pre-commit to 22.3.0. * Update all pre-commit hooks. * [pre-commit.ci] auto fixes from pre-commit.com hooks
This commit is contained in:
parent
eae1ff0df4
commit
5e709795b4
24
.github/workflows/pre-commit.yml
vendored
24
.github/workflows/pre-commit.yml
vendored
|
@ -1,24 +0,0 @@
|
||||||
name: pre-commit
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pre-commit:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: 3.9
|
|
||||||
|
|
||||||
- uses: pre-commit/action@v2.0.0
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
1
.github/workflows/tests.yml
vendored
1
.github/workflows/tests.yml
vendored
|
@ -16,7 +16,6 @@ jobs:
|
||||||
- ubuntu
|
- ubuntu
|
||||||
- windows
|
- windows
|
||||||
python-version:
|
python-version:
|
||||||
- "3.6"
|
|
||||||
- "3.7"
|
- "3.7"
|
||||||
- "3.8"
|
- "3.8"
|
||||||
- "3.9"
|
- "3.9"
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v2.11.0
|
rev: v2.32.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py36-plus]
|
args: [--py36-plus]
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 20.8b1
|
rev: 22.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
language_version: python3
|
language_version: python3
|
||||||
- repo: https://github.com/pycqa/isort
|
- repo: https://github.com/pycqa/isort
|
||||||
rev: 5.8.0
|
rev: 5.10.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 3.9.0
|
rev: 4.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
|
Unreleased
|
||||||
|
----------
|
||||||
|
|
||||||
|
* Dropped support for Python 3.6.
|
||||||
|
|
||||||
|
* Updated dependencies to the latest versions.
|
||||||
|
|
||||||
|
Previously a range of Twisted versions have been supported. Recent Twisted
|
||||||
|
releases (22.2, 22.4) have issued security fixes, so those are now the
|
||||||
|
minimum supported version. Given the stability of Twisted, supporting a
|
||||||
|
range of versions does not represent a good use of maintainer time. Going
|
||||||
|
forward the latest Twisted version will be required.
|
||||||
|
|
||||||
3.0.2 (2021-04-07)
|
3.0.2 (2021-04-07)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ should start with a slash, but not end with one; for example::
|
||||||
Python Support
|
Python Support
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Daphne requires Python 3.6 or later.
|
Daphne requires Python 3.7 or later.
|
||||||
|
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
|
|
|
@ -8,3 +8,4 @@ profile = black
|
||||||
|
|
||||||
[tool:pytest]
|
[tool:pytest]
|
||||||
testpaths = tests
|
testpaths = tests
|
||||||
|
asyncio_mode = strict
|
||||||
|
|
5
setup.py
5
setup.py
|
@ -22,8 +22,8 @@ setup(
|
||||||
package_dir={"twisted": "daphne/twisted"},
|
package_dir={"twisted": "daphne/twisted"},
|
||||||
packages=find_packages() + ["twisted.plugins"],
|
packages=find_packages() + ["twisted.plugins"],
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=["twisted[tls]>=19.7", "autobahn>=0.18", "asgiref>=3.2.10,<4"],
|
install_requires=["twisted[tls]>=22.4", "autobahn>=22.4.2", "asgiref>=3.5.2,<4"],
|
||||||
python_requires=">=3.6",
|
python_requires=">=3.7",
|
||||||
setup_requires=["pytest-runner"],
|
setup_requires=["pytest-runner"],
|
||||||
extras_require={"tests": ["hypothesis", "pytest", "pytest-asyncio"]},
|
extras_require={"tests": ["hypothesis", "pytest", "pytest-asyncio"]},
|
||||||
entry_points={
|
entry_points={
|
||||||
|
@ -37,7 +37,6 @@ setup(
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.6",
|
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
|
|
|
@ -13,11 +13,9 @@ class TestHTTPResponse(DaphneTestCase):
|
||||||
Lowercases and sorts headers, and strips transfer-encoding ones.
|
Lowercases and sorts headers, and strips transfer-encoding ones.
|
||||||
"""
|
"""
|
||||||
return sorted(
|
return sorted(
|
||||||
[
|
|
||||||
(name.lower(), value.strip())
|
(name.lower(), value.strip())
|
||||||
for name, value in headers
|
for name, value in headers
|
||||||
if name.lower() != b"transfer-encoding"
|
if name.lower() != b"transfer-encoding"
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def encode_headers(self, headers):
|
def encode_headers(self, headers):
|
||||||
|
|
6
tox.ini
6
tox.ini
|
@ -1,12 +1,8 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
py{36,37,38,39,310}-twisted{197,latest}
|
py{37,38,39,310}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = true
|
usedevelop = true
|
||||||
extras = tests
|
extras = tests
|
||||||
commands =
|
commands =
|
||||||
pytest -v {posargs}
|
pytest -v {posargs}
|
||||||
deps =
|
|
||||||
twisted187: twisted==19.7.0
|
|
||||||
twistedlatest: twisted>=20.3.0
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user