Skip to content

Commit

Permalink
Updated supported Python and dependency versions. (#417)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
carltongibson authored May 23, 2022
1 parent eae1ff0 commit 5e70979
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 43 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/pre-commit.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
- ubuntu
- windows
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.11.0
rev: v2.32.1
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 5.8.0
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 3.9.0
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -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)
------------------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ should start with a slash, but not end with one; for example::
Python Support
--------------

Daphne requires Python 3.6 or later.
Daphne requires Python 3.7 or later.


Contributing
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ profile = black

[tool:pytest]
testpaths = tests
asyncio_mode = strict
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
package_dir={"twisted": "daphne/twisted"},
packages=find_packages() + ["twisted.plugins"],
include_package_data=True,
install_requires=["twisted[tls]>=19.7", "autobahn>=0.18", "asgiref>=3.2.10,<4"],
python_requires=">=3.6",
install_requires=["twisted[tls]>=22.4", "autobahn>=22.4.2", "asgiref>=3.5.2,<4"],
python_requires=">=3.7",
setup_requires=["pytest-runner"],
extras_require={"tests": ["hypothesis", "pytest", "pytest-asyncio"]},
entry_points={
Expand All @@ -37,7 +37,6 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand Down
8 changes: 3 additions & 5 deletions tests/test_http_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ def normalize_headers(self, headers):
Lowercases and sorts headers, and strips transfer-encoding ones.
"""
return sorted(
[
(name.lower(), value.strip())
for name, value in headers
if name.lower() != b"transfer-encoding"
]
(name.lower(), value.strip())
for name, value in headers
if name.lower() != b"transfer-encoding"
)

def encode_headers(self, headers):
Expand Down
6 changes: 1 addition & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
[tox]
envlist =
py{36,37,38,39,310}-twisted{197,latest}

py{37,38,39,310}
[testenv]
usedevelop = true
extras = tests
commands =
pytest -v {posargs}
deps =
twisted187: twisted==19.7.0
twistedlatest: twisted>=20.3.0

0 comments on commit 5e70979

Please sign in to comment.