On Mon, Mar 6, 2023 at 7:11 PM Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Odhiambo Washington writes:
Has MM3 been tested with Python3.11?
Not heavily.
Okay. So a novice is trying it out. On a volatile platform too - Debian12, and Postgresql15.
PEP 405 virtualenv detected: /opt/mailman/venv/
Have you recreated the venv from scratch, or did you try to upgrade it (or did you not upgrade it at all)?
I have created it from scratch. Only the files in /etc/mailman3/ are constantly being reused.
import math as _math
ModuleNotFoundError: No module named 'math'
This is not a version incompatibility in the sense that Python 3.11 does something different from earlier versions with the same code. This is Python 3.11 saying that your installation Python 3.11 is broken because it can't find stdlib modules that are bundled with it.
I install Python3.11 manually on Debian12 (maybe this is the issue!) VM using the script below: #!/bin/bash cd Python-3.11.2 ./configure --enable-optimizations make altinstall
Try "python3.11 -c 'import math; print(dir(math))" (with the venv deactivated). It should produce a list of about 60 attribute names.
wash@debian:~$ python3.11 -c 'import math; print(dir(math))' ['__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'cbrt', 'ceil', 'comb', 'copysign', 'cos', 'cosh', 'degrees', 'dist', 'e', 'erf', 'erfc', 'exp', 'exp2', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'inf', 'isclose', 'isfinite', 'isinf', 'isnan', 'isqrt', 'lcm', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'log2', 'modf', 'nan', 'nextafter', 'perm', 'pi', 'pow', 'prod', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'tau', 'trunc', 'ulp']
If that fails, your Python 3.11 itself is broken. If that succeeds, python3.11 is incompatible with the venv. My only guess is that the venv contains the math module from an earlier version of Python and 3.11 won't load it. (Note, "python -m math" is not expected to work, I forget why not.)
I will retry installing the venv by calling pip3.11 explicitly and see what happens. I believe that eliminates the change of conflicting Python versions, yes?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)