I've successfuly upgrade servers with mailman3 lists from FreeBSD 12.3 with python 3.7 to FreeBSD 13.1 with python 3.9
After doing the O.S. and all the python related apps upgraded I did the following steps:
(note that my mailman3 installation is system-wide, pip drived and apache24/uwsgi served. The user that owns mailman3 is "mailman3" and all the stuff lies in "/usr/local/mailman3")
-> su
-> cd /usr/local/mailman3
-> pip install --upgrade django-mailman3 mailman mailman-hyperkitty mailmanclient postorius django hyperkitty uwsgi mod-wsgi
-> mod_wsgi-express module-config (it returns the path for the apache24 httpd.conf adjustments. I edited it)
-> su -m mailman3 -c "python3 manage.py collectstatic"
-> su -m mailman3 -c "python3 manage.py migrate"
-> su -m mailman3 -c "python3 manage.py compress"
-> cd /usr/local/lib/python3.9/site-packages/ -> cd postorius -> django-admin compilemessages -> cd ../hyperkitty -> django-admin compilemessages -> cd ../django_mailman3 -> django-admin compilemessages
I had to edit again /usr/local/lib/python3.9/site-packages/mistune/scanner.py and add this two lines (this is a little bit annoying) from mistune.util import escape_html from mistune.util import escape_url
And that was all. Restarted the servers and all is going smoothly
All of this steps have been documented in this list by Mark & Stephen whom I'm very grateful.
P.S.:
As I did some upgrades ago, I didn't have to modify settings.py in the Hyperkitty area to add
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
But if you come from an old mailman/Hyperkitty version, you'll have to include in it.
And the it's same if you are using UWSGI, you have to include in your apache config:
WSGIPassAuthorization On
--
Mailman's content filtering has removed the following MIME parts from this message.
Content-Type: image/png Name: firma-GHP-emails.png
Replaced multipart/alternative part with first alternative.