Compare commits

..

No commits in common. "main" and "4.2.0" have entirely different histories.
main ... 4.2.0

6 changed files with 16 additions and 40 deletions

View File

@ -1,6 +1,6 @@
repos: repos:
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v3.20.0 rev: v3.19.1
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.3.0 rev: 7.2.0
hooks: hooks:
- id: flake8 - id: flake8
additional_dependencies: additional_dependencies:

View File

@ -1,11 +1,3 @@
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)
------------------ ------------------

View File

@ -1,6 +1,6 @@
import sys import sys
__version__ = "4.2.1" __version__ = "4.2.0"
# Windows on Python 3.8+ uses ProactorEventLoop, which is not compatible with # Windows on Python 3.8+ uses ProactorEventLoop, which is not compatible with

View File

@ -73,19 +73,18 @@ class Command(RunserverCommand):
"seconds (default: 5)" "seconds (default: 5)"
), ),
) )
if apps.is_installed("django.contrib.staticfiles"): parser.add_argument(
parser.add_argument( "--nostatic",
"--nostatic", action="store_false",
action="store_false", dest="use_static_handler",
dest="use_static_handler", help="Tells Django to NOT automatically serve static files at STATIC_URL.",
help="Tells Django to NOT automatically serve static files at STATIC_URL.", )
) parser.add_argument(
parser.add_argument( "--insecure",
"--insecure", action="store_true",
action="store_true", dest="insecure_serving",
dest="insecure_serving", help="Allows serving static files even if DEBUG is False.",
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)

View File

@ -55,7 +55,7 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[tool.setuptools] [tool.setuptools]
package-dir = { daphne = "daphne", twisted = "daphne/twisted" } packages = ["daphne"]
[tool.setuptools.dynamic] [tool.setuptools.dynamic]
version = { attr = "daphne.__version__" } version = { attr = "daphne.__version__" }

View File

@ -1,15 +0,0 @@
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}"