mirror of
https://github.com/django/daphne.git
synced 2025-08-02 09:40:09 +03:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cb236385b8 | ||
|
1fb4592b6b | ||
|
aa2dee2cf9 | ||
|
1502de002c |
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v3.19.1
|
rev: v3.20.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py39-plus]
|
args: [--py39-plus]
|
||||||
|
@ -14,7 +14,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 7.2.0
|
rev: 7.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
4.2.1 (2025-07-02)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* Fixed a packaging error in 4.2.0.
|
||||||
|
|
||||||
|
* Removed --nostatic and --insecure args to runserver command when staticfiles
|
||||||
|
app is not installed.
|
||||||
|
|
||||||
4.2.0 (2025-05-16)
|
4.2.0 (2025-05-16)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
__version__ = "4.2.0"
|
__version__ = "4.2.1"
|
||||||
|
|
||||||
|
|
||||||
# Windows on Python 3.8+ uses ProactorEventLoop, which is not compatible with
|
# Windows on Python 3.8+ uses ProactorEventLoop, which is not compatible with
|
||||||
|
|
|
@ -73,18 +73,19 @@ class Command(RunserverCommand):
|
||||||
"seconds (default: 5)"
|
"seconds (default: 5)"
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
if apps.is_installed("django.contrib.staticfiles"):
|
||||||
"--nostatic",
|
parser.add_argument(
|
||||||
action="store_false",
|
"--nostatic",
|
||||||
dest="use_static_handler",
|
action="store_false",
|
||||||
help="Tells Django to NOT automatically serve static files at STATIC_URL.",
|
dest="use_static_handler",
|
||||||
)
|
help="Tells Django to NOT automatically serve static files at STATIC_URL.",
|
||||||
parser.add_argument(
|
)
|
||||||
"--insecure",
|
parser.add_argument(
|
||||||
action="store_true",
|
"--insecure",
|
||||||
dest="insecure_serving",
|
action="store_true",
|
||||||
help="Allows serving static files even if DEBUG is False.",
|
dest="insecure_serving",
|
||||||
)
|
help="Allows serving static files even if DEBUG is False.",
|
||||||
|
)
|
||||||
|
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
self.http_timeout = options.get("http_timeout", None)
|
self.http_timeout = options.get("http_timeout", None)
|
||||||
|
|
|
@ -55,7 +55,7 @@ requires = ["setuptools"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.setuptools]
|
||||||
packages = ["daphne"]
|
package-dir = { daphne = "daphne", twisted = "daphne/twisted" }
|
||||||
|
|
||||||
[tool.setuptools.dynamic]
|
[tool.setuptools.dynamic]
|
||||||
version = { attr = "daphne.__version__" }
|
version = { attr = "daphne.__version__" }
|
||||||
|
|
15
tests/test_packaging.py
Normal file
15
tests/test_packaging.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def test_fd_endpoint_plugin_installed():
|
||||||
|
# Find the site-packages directory
|
||||||
|
for path in sys.path:
|
||||||
|
if "site-packages" in path:
|
||||||
|
site_packages = Path(path)
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
raise AssertionError("Could not find site-packages in sys.path")
|
||||||
|
|
||||||
|
plugin_path = site_packages / "twisted" / "plugins" / "fd_endpoint.py"
|
||||||
|
assert plugin_path.exists(), f"fd_endpoint.py not found at {plugin_path}"
|
Loading…
Reference in New Issue
Block a user