mirror of
https://github.com/django/daphne.git
synced 2025-08-02 01:40:07 +03:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cb236385b8 | ||
|
1fb4592b6b | ||
|
aa2dee2cf9 | ||
|
1502de002c |
|
@ -1,6 +1,6 @@
|
|||
repos:
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.19.1
|
||||
rev: v3.20.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py39-plus]
|
||||
|
@ -14,7 +14,7 @@ repos:
|
|||
hooks:
|
||||
- id: isort
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 7.2.0
|
||||
rev: 7.3.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
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)
|
||||
------------------
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
|
||||
__version__ = "4.2.0"
|
||||
__version__ = "4.2.1"
|
||||
|
||||
|
||||
# Windows on Python 3.8+ uses ProactorEventLoop, which is not compatible with
|
||||
|
|
|
@ -73,18 +73,19 @@ class Command(RunserverCommand):
|
|||
"seconds (default: 5)"
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--nostatic",
|
||||
action="store_false",
|
||||
dest="use_static_handler",
|
||||
help="Tells Django to NOT automatically serve static files at STATIC_URL.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--insecure",
|
||||
action="store_true",
|
||||
dest="insecure_serving",
|
||||
help="Allows serving static files even if DEBUG is False.",
|
||||
)
|
||||
if apps.is_installed("django.contrib.staticfiles"):
|
||||
parser.add_argument(
|
||||
"--nostatic",
|
||||
action="store_false",
|
||||
dest="use_static_handler",
|
||||
help="Tells Django to NOT automatically serve static files at STATIC_URL.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--insecure",
|
||||
action="store_true",
|
||||
dest="insecure_serving",
|
||||
help="Allows serving static files even if DEBUG is False.",
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
self.http_timeout = options.get("http_timeout", None)
|
||||
|
|
|
@ -55,7 +55,7 @@ requires = ["setuptools"]
|
|||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["daphne"]
|
||||
package-dir = { daphne = "daphne", twisted = "daphne/twisted" }
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
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