🔥(backend) remove whitenoise package

whitenoise middleware is failing a lot with a cancelled exception from
asyncio. Using whitenoise is not needed in our case, we are just serving
an API with django and DRF. We decided to completely remove it.
This commit is contained in:
Manuel Raynaud
2026-09-03 08:25:15 +02:00
parent 53bf783447
commit c69e790703
5 changed files with 7 additions and 16 deletions
+4
View File
@@ -29,6 +29,10 @@ and this project adheres to
- 📄(frontend) allowed partially export when MIT #2551
- 🐛(backend) manage async support for Docs custom middleware
### Removed
- 🔥(backend) remove whitenoise package
## [v5.5.0] - 2026-08-24
### Added
+1 -1
View File
@@ -139,7 +139,7 @@ These are the environment variables you can set for the `impress-backend` contai
| SILK_INTERCEPT_PERCENT | Percentage of requests silk records (lower it under load) | 100 |
| SILK_MAX_RECORDED_REQUESTS | Ring-buffer size: oldest recorded requests are dropped past this | 10000 |
| SPECTACULAR_SETTINGS_ENABLE_DJANGO_DEPLOY_CHECK | | false |
| STORAGES_STATICFILES_BACKEND | | whitenoise.storage.CompressedManifestStaticFilesStorage |
| STORAGES_STATICFILES_BACKEND | | django.contrib.staticfiles.storage.StaticFilesStorage |
| THEME_CUSTOMIZATION_CACHE_TIMEOUT | Cache duration for the customization settings | 86400 |
| THEME_CUSTOMIZATION_FILE_PATH | Full path to the file customizing the theme. An example is provided in src/backend/impress/configuration/theme/default.json | BASE_DIR/impress/configuration/theme/default.json |
| TRASHBIN_CUTOFF_DAYS | Trashbin cutoff | 30 |
+2 -3
View File
@@ -160,7 +160,7 @@ class Base(Configuration):
},
"staticfiles": {
"BACKEND": values.Value(
"whitenoise.storage.CompressedManifestStaticFilesStorage",
"django.contrib.staticfiles.storage.StaticFilesStorage",
environ_name="STORAGES_STATICFILES_BACKEND",
),
},
@@ -354,7 +354,6 @@ class Base(Configuration):
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
@@ -1301,7 +1300,7 @@ class Build(Base):
},
"staticfiles": {
"BACKEND": values.Value(
"whitenoise.storage.CompressedManifestStaticFilesStorage",
"django.contrib.staticfiles.storage.StaticFilesStorage",
environ_name="STORAGES_STATICFILES_BACKEND",
),
},
-1
View File
@@ -68,7 +68,6 @@ dependencies = [
"requests==2.34.2",
"sentry-sdk==2.66.1",
"uvicorn==0.51.0",
"whitenoise==6.12.0",
]
[project.urls]
-11
View File
@@ -995,7 +995,6 @@ dependencies = [
{ name = "requests" },
{ name = "sentry-sdk" },
{ name = "uvicorn" },
{ name = "whitenoise" },
]
[package.optional-dependencies]
@@ -1084,7 +1083,6 @@ requires-dist = [
{ name = "sentry-sdk", specifier = "==2.66.1" },
{ name = "types-requests", marker = "extra == 'dev'", specifier = "==2.33.0.20260712" },
{ name = "uvicorn", specifier = "==0.51.0" },
{ name = "whitenoise", specifier = "==6.12.0" },
]
provides-extras = ["dev"]
@@ -2595,15 +2593,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/41/52/e465037f5375f43533d1a80b6923955201596a99142ed524d77b571a1418/wcwidth-0.7.0-py3-none-any.whl", hash = "sha256:5d69154c429a82910e241c738cd0e2976fac8a2dd47a1a805f4afed1c0f136f2", size = 110825, upload-time = "2026-05-02T16:04:11.033Z" },
]
[[package]]
name = "whitenoise"
version = "6.12.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/cb/2a/55b3f3a4ec326cd077c1c3defeee656b9298372a69229134d930151acd01/whitenoise-6.12.0.tar.gz", hash = "sha256:f723ebb76a112e98816ff80fcea0a6c9b8ecde835f8ddda25df7a30a3c2db6ad", size = 26841, upload-time = "2026-02-27T00:05:42.028Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/db/eb/d5583a11486211f3ebd4b385545ae787f32363d453c19fffd81106c9c138/whitenoise-6.12.0-py3-none-any.whl", hash = "sha256:fc5e8c572e33ebf24795b47b6a7da8da3c00cff2349f5b04c02f28d0cc5a3cc2", size = 20302, upload-time = "2026-02-27T00:05:40.086Z" },
]
[[package]]
name = "wrapt"
version = "1.17.3"