code.djangoproject.com icon indicating copy to clipboard operation
code.djangoproject.com copied to clipboard

Upgrade to Python 3 and Django 3.2

Open bmispelon opened this issue 5 months ago • 0 comments

The lack of Python3 support in Trac has held us back from using a recent Python for a while now (and as a consequence we're also running an ancient version of Django).

Luckily the latest version of Trac (1.6) was released about 4 months ago and finally supports Python 3 so in theory nothing stops us from doing some fun upgrade work.

I've researched a bit the various version compatibilities between Trac, Python and Django (using the classifiers on pypi) and came up with the following upgrade path (for reference, we're currently running version 1.2 of Trac, 2.7 of Python and 1.11 of Django):

  • [x] Upgrade Trac to 1.4.4 [latest release to still support python 2.7]: Merged ✅ : #146
  • [x] Upgrade python 3.8 [highest supported version by Django 1.11 (sortof)], Trac 1.6 [latest version as of now]: Merged ✅ : #157
  • [x] Upgrade Django 1.11 -> 3.2 [current Django version used for djangoproject.com]: Merged ✅ #183
  • [ ] Upgrade to Python 3.10 [highest version supported by Django 3.2]

EDIT Feb 6th: I've modified the original plan in light of the fact that djangoproject.com currently runs Django 3.2. Any further upgrades should probably target both sites in parallel (since they share the auth_user database).


I've created this issue to track the work, as I expect this to take a while (and some of these steps might require several PRs).

Depending on the availability of others (fellows for review, ops team for deploy, ...) I'd like to suggest a weekly cadence where we take on one step in this list every week. That's a completely arbitrary number and I'm open to other suggestions of course.

I'm personally ready to commit a minimum of 4h per week in the upcoming 3 months to write the upgrade PR, test them locally, and propose fixes for any breakage/regressions that are likely to arise from such a major upgrade work (but hopefully there won't be too many 🤞🏻 )

What do you think of this plan?

bmispelon avatar Jan 18 '24 12:01 bmispelon