[Django] #37366: Update MySQL driver docs about gevent compat

6 views
Skip to first unread message

Django

unread,
Sep 23, 2026, 6:28:51 AM (yesterday) Sep 23
to django-...@googlegroups.com
#37366: Update MySQL driver docs about gevent compat
-------------------------------------+-------------------------------------
Reporter: Caleb Hattingh | Type:
| Cleanup/optimization
Status: new | Component:
| Documentation
Version: 6.1 | Severity: Normal
Keywords: mysql, gevent | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
mysqlclient is the "recommended choice", in bold in the docs, but it turns
out that it is not compatible with gevent, since gevent cannot monkey-
patch the networking code inside the native binary. I want to update the
docs to point that out and also add the pure-Python `PyMySQL` library as
an additional driver that is compatible with gevent.
--
Ticket URL: <https://code.djangoproject.com/ticket/37366>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 23, 2026, 6:29:17 AM (yesterday) Sep 23
to django-...@googlegroups.com
#37366: Update MySQL driver docs about gevent compat
-------------------------------------+-------------------------------------
Reporter: Caleb Hattingh | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 6.1
Severity: Normal | Resolution:
Keywords: mysql, gevent | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Caleb Hattingh):

I am claiming this ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/37366#comment:1>

Django

unread,
Sep 23, 2026, 6:38:50 AM (yesterday) Sep 23
to django-...@googlegroups.com
#37366: Update MySQL driver docs about gevent compat
-------------------------------------+-------------------------------------
Reporter: Caleb Hattingh | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 6.1
Severity: Normal | Resolution:
Keywords: mysql, gevent | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Caleb Hattingh:

Old description:

> mysqlclient is the "recommended choice", in bold in the docs, but it
> turns out that it is not compatible with gevent, since gevent cannot
> monkey-patch the networking code inside the native binary. I want to
> update the docs to point that out and also add the pure-Python `PyMySQL`
> library as an additional driver that is compatible with gevent.

New description:

mysqlclient is the "recommended choice", in bold in the docs, but it turns
out that it is not compatible with gevent, since gevent cannot monkey-
patch the networking code inside the native binary. I want to update the
docs to point that out and also add the pure-Python `PyMySQL` library as
an additional driver that is compatible with gevent.

I discovered this after several years using mysqlclient and gunicorn
together (with gevent workers), due to concurrency problems. The root
cause was difficult to diagnose and these proposed docs would have helped.

--
--
Ticket URL: <https://code.djangoproject.com/ticket/37366#comment:2>

Django

unread,
Sep 23, 2026, 3:54:54 PM (yesterday) Sep 23
to django-...@googlegroups.com
#37366: Update MySQL driver docs about gevent compat
-------------------------------------+-------------------------------------
Reporter: Caleb Hattingh | Owner: Caleb
Type: | Hattingh
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 6.1
Severity: Normal | Resolution:
Keywords: mysql, gevent | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Md. Saikat Islam):

* owner: (none) => Caleb Hattingh
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37366#comment:3>
Reply all
Reply to author
Forward
0 new messages