Skip to content

Commit a4f4da0

Browse files
authored
[Python/Django] Update Python version 3.12 (#9694)
1 parent e96c213 commit a4f4da0

File tree

6 files changed

+13
-26
lines changed

6 files changed

+13
-26
lines changed

frameworks/Python/django/benchmark_config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"flavor": "Python3",
1818
"orm": "Full",
1919
"platform": "WSGI",
20-
"webserver": "Meinheld",
20+
"webserver": "Gunicorn",
2121
"os": "Linux",
2222
"database_os": "Linux",
2323
"display_name": "Django",
@@ -77,7 +77,7 @@
7777
"flavor": "Python3",
7878
"orm": "Full",
7979
"platform": "WSGI",
80-
"webserver": "Meinheld",
80+
"webserver": "Gunicorn",
8181
"os": "Linux",
8282
"database_os": "Linux",
8383
"display_name": "Django [Postgres]",

frameworks/Python/django/django-postgresql.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-bullseye
1+
FROM python:3.12-bullseye
22

33
ADD ./ /django
44

frameworks/Python/django/django.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-bullseye
1+
FROM python:3.12-bullseye
22

33
ADD ./ /django
44

frameworks/Python/django/gunicorn_conf.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
_is_pypy = hasattr(sys, 'pypy_version_info')
66
_is_travis = os.environ.get('TRAVIS') == 'true'
77

8-
workers = int(multiprocessing.cpu_count() * 2.5)
8+
workers = int(multiprocessing.cpu_count())
99
if _is_travis:
1010
workers = 2
1111

@@ -14,16 +14,4 @@
1414
errorlog = '-'
1515
pidfile = 'gunicorn.pid'
1616
pythonpath = 'hello'
17-
18-
if _is_pypy:
19-
worker_class = "sync"
20-
else:
21-
worker_class = "meinheld.gmeinheld.MeinheldWorker"
22-
23-
def post_fork(server, worker):
24-
import meinheld
25-
import meinheld.server
26-
import meinheld.patch
27-
meinheld.server.set_access_logger(None)
28-
meinheld.set_keepalive(keepalive)
29-
meinheld.patch.patch_all()
17+
worker_class = 'sync'
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-r requirements.txt
2-
greenlet==0.4.17
3-
gunicorn==20.1.0
4-
meinheld==1.0.2
2+
greenlet==3.1.1
3+
gunicorn==21.2.0
4+
gevent==24.10.2
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Django==3.2.25
2-
mysqlclient==1.4.6
3-
psycopg2==2.9.6; implementation_name=='cpython'
4-
psycopg2cffi==2.9.0; implementation_name=='pypy'
5-
pytz==2020.4
6-
ujson==5.4.0
2+
mysqlclient==2.2.6
3+
psycopg2==2.9.9; implementation_name=='cpython'
4+
pytz==2023.2
5+
ujson==5.8.0

0 commit comments

Comments
 (0)