diff --git a/frameworks/Python/django/benchmark_config.json b/frameworks/Python/django/benchmark_config.json index 47ff6ff7135..c4e3d51a143 100644 --- a/frameworks/Python/django/benchmark_config.json +++ b/frameworks/Python/django/benchmark_config.json @@ -17,7 +17,7 @@ "flavor": "Python3", "orm": "Full", "platform": "WSGI", - "webserver": "Meinheld", + "webserver": "Gunicorn", "os": "Linux", "database_os": "Linux", "display_name": "Django", @@ -77,7 +77,7 @@ "flavor": "Python3", "orm": "Full", "platform": "WSGI", - "webserver": "Meinheld", + "webserver": "Gunicorn", "os": "Linux", "database_os": "Linux", "display_name": "Django [Postgres]", diff --git a/frameworks/Python/django/django-postgresql.dockerfile b/frameworks/Python/django/django-postgresql.dockerfile index 51870d2750d..ff554710097 100644 --- a/frameworks/Python/django/django-postgresql.dockerfile +++ b/frameworks/Python/django/django-postgresql.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-bullseye +FROM python:3.12-bullseye ADD ./ /django diff --git a/frameworks/Python/django/django.dockerfile b/frameworks/Python/django/django.dockerfile index 261bd05fa12..a5b5182eabf 100644 --- a/frameworks/Python/django/django.dockerfile +++ b/frameworks/Python/django/django.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-bullseye +FROM python:3.12-bullseye ADD ./ /django diff --git a/frameworks/Python/django/gunicorn_conf.py b/frameworks/Python/django/gunicorn_conf.py index 356e04d1d4a..c6848f685b7 100644 --- a/frameworks/Python/django/gunicorn_conf.py +++ b/frameworks/Python/django/gunicorn_conf.py @@ -5,7 +5,7 @@ _is_pypy = hasattr(sys, 'pypy_version_info') _is_travis = os.environ.get('TRAVIS') == 'true' -workers = int(multiprocessing.cpu_count() * 2.5) +workers = int(multiprocessing.cpu_count()) if _is_travis: workers = 2 @@ -14,16 +14,4 @@ errorlog = '-' pidfile = 'gunicorn.pid' pythonpath = 'hello' - -if _is_pypy: - worker_class = "sync" -else: - worker_class = "meinheld.gmeinheld.MeinheldWorker" - - def post_fork(server, worker): - import meinheld - import meinheld.server - import meinheld.patch - meinheld.server.set_access_logger(None) - meinheld.set_keepalive(keepalive) - meinheld.patch.patch_all() +worker_class = 'sync' \ No newline at end of file diff --git a/frameworks/Python/django/requirements-gunicorn.txt b/frameworks/Python/django/requirements-gunicorn.txt index 4dae00dbf65..7ec2e47c136 100644 --- a/frameworks/Python/django/requirements-gunicorn.txt +++ b/frameworks/Python/django/requirements-gunicorn.txt @@ -1,4 +1,4 @@ -r requirements.txt -greenlet==0.4.17 -gunicorn==20.1.0 -meinheld==1.0.2 +greenlet==3.1.1 +gunicorn==21.2.0 +gevent==24.10.2 \ No newline at end of file diff --git a/frameworks/Python/django/requirements.txt b/frameworks/Python/django/requirements.txt index d5f982d585e..c7765c2c549 100644 --- a/frameworks/Python/django/requirements.txt +++ b/frameworks/Python/django/requirements.txt @@ -1,6 +1,5 @@ Django==3.2.25 -mysqlclient==1.4.6 -psycopg2==2.9.6; implementation_name=='cpython' -psycopg2cffi==2.9.0; implementation_name=='pypy' -pytz==2020.4 -ujson==5.4.0 +mysqlclient==2.2.6 +psycopg2==2.9.9; implementation_name=='cpython' +pytz==2023.2 +ujson==5.8.0