Compare commits

...

4 Commits
4.2.0 ... main

Author SHA1 Message Date
pre-commit-ci[bot]
cb236385b8
[pre-commit.ci] pre-commit autoupdate (#563) 2025-07-07 20:49:15 +02:00
Carlton Gibson
1fb4592b6b Bumped version and changelog for v4.2.1 release. 2025-07-02 14:55:31 +02:00
Carlton Gibson
aa2dee2cf9
Fix twisted plugin installation with new packaging. (#562)
* Added test for twisted plugin installation.

Refs #557.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed setuptools configuration

Port correct configuration from old setup.cfg file.

Regression in #542. Fixes #557.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-01 18:15:51 -07:00
Thomas Fossati
1502de002c
Remove --nostatic and --insecure args to runserver command if staticfiles app is not installed. (#559) 2025-05-23 20:29:43 +02:00
6 changed files with 40 additions and 16 deletions

View File

@ -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:

View File

@ -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)
------------------

View File

@ -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

View File

@ -73,6 +73,7 @@ class Command(RunserverCommand):
"seconds (default: 5)"
),
)
if apps.is_installed("django.contrib.staticfiles"):
parser.add_argument(
"--nostatic",
action="store_false",

View File

@ -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
View 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}"