Skip to content

Replace gunicorn with waitress#1614

Merged
ChrisLovering merged 1 commit into
mainfrom
waitress
May 12, 2026
Merged

Replace gunicorn with waitress#1614
ChrisLovering merged 1 commit into
mainfrom
waitress

Conversation

@jchristgit
Copy link
Copy Markdown
Contributor

@jchristgit jchristgit commented May 12, 2026

This commit replaces the gunicorn WSGI server with waitress. It
loses the statsd statistics, but gives us peace of mind.

The setup was tested by commenting out the python manage.py run
command in docker-compose.yml. Note that migrations need to be run for
the index page to work via podman compose exec web -- python manage.py migrate.

Rationale

Over the last few months, our dependency gunicorn has received a large amount
of contributions written primarily by the maintainer with close to zero external
review.

None of these implemented features are anything we need: dirty workers,
uWSGI protocol support, control socket, shared memory, .... Nor do I
ever recall looking for any of these features in it.

The sheer volume of code and the general format of changes also strongly reeks
of LLM authorship or assistance.

Of course, every maintainer is free to do with their software whatever they
wish. But, as with any other dependency, I will evaluate any updates, keeping in
mind that any dependency we have here has full access to our database and API.

We do not need a WSGI server with regular feature development. We need one that
works and is maintained - that is the only requirement. See the linked
issue for more discussion.

Fixes: #1613

This commit replaces the `gunicorn` WSGI server with `waitress`. It
loses the statsd statistics, but gives us peace of mind.

The setup was tested by commenting out the `python manage.py run`
command in `docker-compose.yml`. Note that migrations need to be run for
the index page to work via `podman compose exec web -- python manage.py
migrate`.

Rationale
=========

Over the last few months, our dependency `gunicorn` has received a large amount
of contributions written primarily by the maintainer with close to zero external
review.

None of these implemented features are anything we need: dirty workers,
uWSGI protocol support, control socket, shared memory, ....  Nor do I
ever recall looking for any of these features in it.

The sheer volume of code and the general format of changes also strongly reeks
of LLM authorship or assistance.

Of course, every maintainer is free to do with their software whatever they
wish. But, as with any other dependency, I will evaluate any updates, keeping in
mind that any dependency we have here has full access to our database and API.

We do not need a WSGI server with regular feature development. We need one that
works and is maintained - that is the only requirement. See the linked
issue for more discussion.

Fixes: #1613
Signed-off-by: Johannes Christ <jc@jchri.st>
@jchristgit jchristgit requested a review from MarkKoz as a code owner May 12, 2026 18:35
@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for pydis-static ready!

Name Link
🔨 Latest commit 4121f59
🔍 Latest deploy log https://app.netlify.com/projects/pydis-static/deploys/6a0372faea3a87000813b28c
😎 Deploy Preview https://deploy-preview-1614--pydis-static.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@python-discord-policy-bot python-discord-policy-bot Bot requested a review from a team May 12, 2026 18:35
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — waitress into main

@ChrisLovering ChrisLovering merged commit 737905c into main May 12, 2026
10 of 11 checks passed
@ChrisLovering ChrisLovering deleted the waitress branch May 12, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate away from gunicorn

3 participants