Overview

Gunicorn 21.2, released on July 19, 2023, is the first major release in over two years. It modernizes Python support and fixes many accumulated bugs.

Main Features

Modernized Python support

Gunicorn 21.2 supports Python 3.7 to 3.11 and drops older versions. Internal code uses modern Python features.

python
# gunicorn.conf.py - Gunicorn 21.2
bind = '0.0.0.0:8000'
workers = 4
worker_class = 'gthread'
threads = 2

# gunicorn app:app -c gunicorn.conf.py

Accumulated fixes

Numerous fixes for signal handling, graceful reload, and compatibility with ASGI frameworks via third-party workers.

python
# Using Uvicorn as ASGI worker
# gunicorn app:app -k uvicorn.workers.UvicornWorker

# gunicorn.conf.py
worker_class = 'uvicorn.workers.UvicornWorker'
workers = 4
accesslog = '-'
errorlog = '-'

Sources