Closed tpitkanen closed 1 year ago
I tried out Python 3.10 and the newest libraries last week. Here are my findings.
I configured updates by editing the Pipfile like so:
matplotlib = "*"
PyQt5 = "*"
python_version = "3.10"
After updating, remember to pin the versions again (for stability I guess?) and commit the new Pipfile.lock.
GUIReporter doesn't support float
s anymore. Fix (widgets/gui_utils.py):
def __update_func(value):
# Callback function that will be connected to the signal
if progress_bar is not None:
+ value = int(value)
progress_bar.setValue(value)
Unsupported version of NavigationToolbar2QT. Fix (widgets/matplotlib/base.py):
-from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT
+from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT
MCERD doesn't start at all. Trying to run an element simulation throws an error code (that I can't remember right now, but the exact number seems to vary anyway). At least some of the other C programs work (get_espe at least, can't remember which others).
MCERD is the only part of Potku that uses rx
(in mcerd.py and nsgaii.py), so I would look into that. The culprit may be elsewhere, so check the input data too.
"tof_list|erd_depth pipeline returned an error code ..."
used to be problematic. It may act up again.
Unit tests may reveal more issues, but I didn't have time to run them.
This is now quite important in my opinion, e.g. installing Python 3.6.15 or older versions via pyenv apparently does not work in latest versions of macOS, at least not without applying some patches.
Closing outdated issue, Python has been upgraded to 3.10.
Potku has been developed for Python 3.6, while Python 3.10 will be released on 2021-10-04. Potku's Python version should be updated at some point to get new Python features, such as:
from __future__ import annotations
, Python 3.10 by default)__slots__
in classes that inherit fromABC
(unknown version)Updating the Python version will require some code changes: at least on Python 3.8, some unit tests related to MCERD fail. Libraries (NumPy, Matplotlib etc.) should be updated too.
Also, the latest available Windows installer version of Python 3.6 is 3.6.8, while the newest release is 3.6.14.