#37363: Restore PyPy testing now that PyPy supports Python 3.12
-------------------------------------+-------------------------------------
Reporter: Paolo Melchiorre | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Packaging | Version: dev
Severity: Normal | Resolution:
Keywords: pypy | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Paolo Melchiorre):
I think there’s some useful context from when PyPy testing was removed in
2025.
At the time, I opened [ticket:36123 #36123] proposing that we also remove
the PyPy compatibility claim from the Django documentation. My reasoning
was that, since no PyPy version supported Python 3.12, Django could no
longer actually test that compatibility.
Sarah closed that ticket as `wontfix`, pointing out that this had already
been discussed in the PR and that the decision was to '''keep PyPy support
rather than "give up" on it'''. See [ticket:36123#comment:1 Sarah's
reply].
The original PR discussion also made the intended future behavior quite
explicit.
Sarah asked:
''“When they do release 3.12 support ... would we backport potential
fixes to keep compatibility to pypy?”''
[
https://github.com/django/django/pull/19067#discussion_r1922140512
Sarah's comment]
And Mariusz replied:
'''“Yes, in the same way we backport support for the newest Python
version.”'''
[
https://github.com/django/django/pull/19067#discussion_r1922195581
Mariusz's reply]
So the scenario we discussed back then has now actually happened: '''PyPy
8.0.0 has been released with Python 3.12 support'''.
My reading of that discussion is that the last explicit decision we made
was to keep claiming PyPy compatibility, with the intention of restoring
and maintaining it once PyPy caught up with a Python version supported by
Django.
That is also what our documentation still says today:
''“Django is compatible with versions of PyPy corresponding to the
supported Python versions”''
[
https://docs.djangoproject.com/en/dev/topics/performance/#id1 Django
documentation]
So I think we should now follow through on that decision and at least
'''test Django with PyPy 8.0.0''' to see whether the compatibility we
still document is actually true.
**If we’ve changed our mind** since then and no longer want to maintain
PyPy compatibility, that’s also a perfectly reasonable decision to make.
But in that case I think we should make that decision explicitly and
'''remove or qualify the compatibility statement in the documentation''',
rather than continuing to state it as a fact without testing it.
--
Ticket URL: <
https://code.djangoproject.com/ticket/37363#comment:6>