Closed denisri closed 11 months ago
Due to the use of formatted string in commit 4a28615, like :
f'.*-[0-9]+\\.{ext}$'
Compatibility of casa_distro with python < 3.6 is broken. As a consequence, it forbids to run casa_distro on Ubuntu 16.04 (at least). Is this what we want ?
If I understand well, it will break code that allow user to manage container images. On the one hand I would like this code to be compatible with any system. On the other hand, we are now used to write code for Python >= 3.9 and we are not testing on 16.04 anymore, no ? Therefore, I would choose to try to be compatible if it is just small changes but to stop as soon as it become a little bit complex.
Sorry I was not aware I as using code incompatible with python 3.6. But, actually, I'm still not really aware; could you please describe the error ? f-strings did exist in 3.6, so it must be something else ?
Hello Denis, f-strings were introduced in python 3.6 https://peps.python.org/pep-0498 and Ubuntu 16.04 uses a python 3.5.2 that do not support f-strings :). As a result, following code is not supported :
import re
image='toto.png'
ext='png'
re.match(f'.*-[0-9]+\.{ext}$', image)
It results in the following error :
re.match(f'.*-[0-9]+\.{ext}$', image)
^
SyntaxError: invalid syntax
... but, I know, it's time to use a recent version of Ubuntu :)
Oh it was 3.5, I understand now. We can certainly avoid using f-strings here. I'll do some fixes.
Describe the bug BBI image updates have updated the images (
casa-dev-5.3-23.sif
for instance last night), but the configured environments still refer tocasa-dev-5.3-22
, which has been deleted. I thought environments were updated, and I also thought that an environment referring to "casa-dev-5.3
" would be enough to find the latest image, but both are wrong or broken.Environment:
casa-dev-5.3-22