mirror of
https://github.com/django/daphne.git
synced 2025-04-17 23:32:12 +03:00
Merge branch 'main' into root-path-for-websockets
This commit is contained in:
commit
68ee0c5c80
10
.github/workflows/tests.yml
vendored
10
.github/workflows/tests.yml
vendored
|
@ -16,24 +16,24 @@ jobs:
|
|||
- ubuntu
|
||||
- windows
|
||||
python-version:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
- "3.12"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
python -m pip install --upgrade tox tox-py
|
||||
python -m pip install --upgrade tox
|
||||
|
||||
- name: Run tox targets for ${{ matrix.python-version }}
|
||||
run: tox --py current
|
||||
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
repos:
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.2.2
|
||||
rev: v3.15.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py36-plus]
|
||||
args: [--py38-plus]
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.10.0
|
||||
rev: 23.12.1
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 5.10.1
|
||||
rev: 5.13.2
|
||||
hooks:
|
||||
- id: isort
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 5.0.4
|
||||
rev: 6.1.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies:
|
||||
- flake8-bugbear
|
||||
ci:
|
||||
autoupdate_schedule: quarterly
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
4.1.0 (unreleased)
|
||||
------------------
|
||||
|
||||
* Added support for Python 3.12
|
||||
|
||||
|
||||
4.0.0 (2022-10-07)
|
||||
------------------
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ Daphne supports terminating HTTP/2 connections natively. You'll
|
|||
need to do a couple of things to get it working, though. First, you need to
|
||||
make sure you install the Twisted ``http2`` and ``tls`` extras::
|
||||
|
||||
pip install -U 'Twisted[tls,http2]'
|
||||
pip install -U "Twisted[tls,http2]"
|
||||
|
||||
Next, because all current browsers only support HTTP/2 when using TLS, you will
|
||||
need to start Daphne with TLS turned on, which can be done using the Twisted endpoint syntax::
|
||||
|
@ -108,7 +108,7 @@ should start with a slash, but not end with one; for example::
|
|||
Python Support
|
||||
--------------
|
||||
|
||||
Daphne requires Python 3.7 or later.
|
||||
Daphne requires Python 3.8 or later.
|
||||
|
||||
|
||||
Contributing
|
||||
|
|
|
@ -21,6 +21,7 @@ if current_reactor is not None:
|
|||
+ "you can fix this warning by importing daphne.server early in your codebase or "
|
||||
+ "finding the package that imports Twisted and importing it later on.",
|
||||
UserWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
del sys.modules["twisted.internet.reactor"]
|
||||
asyncioreactor.install(twisted_loop)
|
||||
|
|
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
[build-system]
|
||||
requires = ["setuptools"]
|
||||
build-backend = "setuptools.build_meta"
|
50
setup.cfg
50
setup.cfg
|
@ -1,3 +1,53 @@
|
|||
[metadata]
|
||||
name = daphne
|
||||
version = attr: daphne.__version__
|
||||
url = https://github.com/django/daphne
|
||||
author = Django Software Foundation
|
||||
author_email = foundation@djangoproject.com
|
||||
description = Django ASGI (HTTP/WebSocket) server
|
||||
long_description = file: README.rst
|
||||
long_description_content_type = text/x-rst
|
||||
license = BSD
|
||||
classifiers =
|
||||
Development Status :: 4 - Beta
|
||||
Environment :: Web Environment
|
||||
Intended Audience :: Developers
|
||||
License :: OSI Approved :: BSD License
|
||||
Operating System :: OS Independent
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
Topic :: Internet :: WWW/HTTP
|
||||
|
||||
[options]
|
||||
package_dir =
|
||||
twisted=daphne/twisted
|
||||
packages = find:
|
||||
include_package_data = True
|
||||
install_requires =
|
||||
asgiref>=3.5.2,<4
|
||||
autobahn>=22.4.2
|
||||
twisted[tls]>=22.4
|
||||
python_requires = >=3.8
|
||||
setup_requires =
|
||||
pytest-runner
|
||||
zip_safe = False
|
||||
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
daphne = daphne.cli:CommandLineInterface.entrypoint
|
||||
|
||||
[options.extras_require]
|
||||
tests =
|
||||
django
|
||||
hypothesis
|
||||
pytest
|
||||
pytest-asyncio
|
||||
|
||||
[flake8]
|
||||
exclude = venv/*,tox/*,docs/*,testproject/*,js_client/*,.eggs/*
|
||||
extend-ignore = E123, E128, E266, E402, W503, E731, W601
|
||||
|
|
47
setup.py
47
setup.py
|
@ -1,47 +0,0 @@
|
|||
import os
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
from daphne import __version__
|
||||
|
||||
# We use the README as the long_description
|
||||
readme_path = os.path.join(os.path.dirname(__file__), "README.rst")
|
||||
with open(readme_path) as fp:
|
||||
long_description = fp.read()
|
||||
|
||||
setup(
|
||||
name="daphne",
|
||||
version=__version__,
|
||||
url="https://github.com/django/daphne",
|
||||
author="Django Software Foundation",
|
||||
author_email="foundation@djangoproject.com",
|
||||
description="Django ASGI (HTTP/WebSocket) server",
|
||||
long_description=long_description,
|
||||
license="BSD",
|
||||
zip_safe=False,
|
||||
package_dir={"twisted": "daphne/twisted"},
|
||||
packages=find_packages() + ["twisted.plugins"],
|
||||
include_package_data=True,
|
||||
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", "django"]},
|
||||
entry_points={
|
||||
"console_scripts": ["daphne = daphne.cli:CommandLineInterface.entrypoint"]
|
||||
},
|
||||
classifiers=[
|
||||
"Development Status :: 4 - Beta",
|
||||
"Environment :: Web Environment",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: BSD License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Topic :: Internet :: WWW/HTTP",
|
||||
],
|
||||
)
|
Loading…
Reference in New Issue
Block a user