Andreas Vetter writes:

 > I have a venv installation (mailman postorius django-mailman3
 > hyperkitty mailman-web) with python 3.11 from the Linux
 > distribution. Since distribution EOL nears, I checked python
 > version in next distribution and it is python
 > 3.13.
 > 
 > So my guess is, after distro upgrade, this will stop working.
 > 
 > How should I upgrade?

I haven't done this, so take it with a grain of salt.

1.  Stop mailman and mailman-web.
2.  Upgrade the OS.
3.  Check that the RDBMS is still available, using the command line
    utility.  In Debian I seem to recall that PostgreSQL tries to
    automatically upgrade the database to the new version, you may not
    need to do anything further.
    - If not you may need to deal with the database upgrade if it is
      a major version upgrade.
4.  Check that the old venv is in fact broken (I think there's usually
    versioned symlinks rather than an actual copy of the python install,
    so it "should" break).  If it's not, you're done.
5.  You may be able to use "--upgrade":
    /usr/bin/python3.13 -m venv --upgrade
    However I seem to recall that --upgrade doesn't work across major
    upgrades.  If it does work, you're done.
6.  If that fails, create a new venv in the same directory that holds
    the existing venv.  (I typically name my venvs like ".v3.13".)
    * Reinstall mailman etc there:
    python -m venv --upgrade-deps              # ensure most recent pip etc
    python -m pip install mailman mailman-web  # or your list may be better
    * Update paths in external configuration to point to new venv:
    systemd (maybe /usr/local/lib/systemd/system/mailman*)
    cron (probably /etc/cron.d/mailman*)
    * Alternatively, you can delete the old venv and replace it with a
      symlink to the new one.  I don't think you can rename the new
      venv to the old one's name because I think there are absolute
      paths in the venv's internal configuration, but you could try,
      and switch back to the symlink method if it doesn't work.
7.  I suppose you will get upgrades of a number of packages.  Django
    or one of its dependencies may start issuing warnings about
    deprecated settings for authentication, and you may have issues
    with a missing nntp module (it was deprecated several versions ago
    and finally removed from Python 3.13, the fix is to install the
    nntp module from PyPI (it has "standard" or "stdlib" in the name).
    Both of these issues have been discussed recently on this list.

Note that I *have* used alternate Python installs via the symlink
method and switched back and forth.

Hope this helps.  Maybe there's a better way, but that's how I would
handle it.

-- 
GNU Mailman consultant (installation, migration, customization)
Sirius Open Source    https://www.siriusopensource.com/
Software systems consulting in Europe, North America, and Japan
_______________________________________________
Mailman-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/[email protected]/message/45N2JKFVPGW43AN3PBZLTNW7VQAKR42P/

This message sent to [email protected]

Reply via email to