Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 2 vs 3 #52

Open
eduble opened this issue Apr 1, 2021 · 13 comments
Open

Python 2 vs 3 #52

eduble opened this issue Apr 1, 2021 · 13 comments

Comments

@eduble
Copy link

eduble commented Apr 1, 2021

Hello,
I noticed the code does not work with python3 (there is at least one print statement to replace).
And the shebang is #!/usr/bin/env python which may target python3 nowadays (if not the default on the OS, it is often the case when calling python from a virtualenv).
Updating the shebang to #!/usr/bin/env python2 would perhaps be a first workaround.
Thanks for your work on this
Etienne

@lpouillo
Copy link
Owner

lpouillo commented Apr 1, 2021

Hi Etienne,

I am not working on g5k since 2015.
I'll try to see with members of the Technical Team if they plan to maintain the tool.

@mimbert @SimonDelamare : What do you think ? I guess it is time to migrate to python3 :)

@SimonDelamare
Copy link
Contributor

Matthieu s'est occupé du travail de portage il y a plusieurs années :)

Mais il peut rester des petits bugs (@eduble j'imagine que tu fais référence au soucis que tu as remonté sur la liste G5K ? j'essayerai de regarder prochainement si @mimbert n'est pas dispo)

@eduble
Copy link
Author

eduble commented Apr 2, 2021

@SimonDelamare

j'imagine que tu fais référence au soucis que tu as remonté sur la liste G5K ?

J'ai recontré 2 bugs :

  • l'un avec un usage direct de la librairie execo_g5k depuis un code python3 (celui remonté sur la liste G5K)
  • l'autre en appelant funk depuis un virtualenv avec python3 (celui décrit ici)

Le point commun entre les 2 est effectivement la gestion de python3.

@SimonDelamare
Copy link
Contributor

Ah oui en effet, j'ai confondu execo et funk. C'est effectivement possible que funk n'est jamais été porté en python3 (et perso je ne suis pas certain de trouver le temps de m'en occuper).

@lpouillo
Copy link
Owner

lpouillo commented Apr 2, 2021

De mon côté pas trop le temps non plus, mais @eduble si tu veux les droits sur le dépot, je t'ajoute comme membre.

@mimbert
Copy link
Collaborator

mimbert commented Apr 6, 2021 via email

@mimbert
Copy link
Collaborator

mimbert commented Apr 6, 2021

C'est fait, funk est compatible python3 et utilise python3 explicitement.
Il n'est plus compatible python2 en l'état, si c'est nécessaire qu'il reste compatible python2 je peux ajouter le code nécessaire, dites moi.

@lpouillo
Copy link
Owner

lpouillo commented Apr 6, 2021

Python2 c'est mort donc à mon avis c'est pas la peine.

@mimbert
Copy link
Collaborator

mimbert commented Apr 6, 2021

je me posais la question dans le cas d'une utilisation dans un vieil environnement (c'est pour la même raison que dans la dernière release execo j'ai continué de générer un .deb compatible avec debian jessie au cas où, même si c'est carrément antédiluvien)

@eduble
Copy link
Author

eduble commented Apr 6, 2021

Bonjour,
Merci pour le fix.
Effectivement moi non plus je n'ai pas besoin de python2. Mais il est peut-être plus prudent de demander si cela pose problème à quelqu'un sur la liste g5k.
@mimbert j'ai repéré un autre problème concernant execo et python3, donc à l'instant j'ai renvoyé un mail à ce sujet sur la liste g5k.

@mimbert
Copy link
Collaborator

mimbert commented Apr 7, 2021

du coup pour éviter tout problème j'ai rendu le code compatible python2 et python3 tout à l'heure.
j'ai également poussé tout ça dans les repos grid5000, ça va se mettre à jour automatiquement sur tous les sites (je sais pas quand)

@eduble
Copy link
Author

eduble commented Apr 8, 2021

OK merci.

@lpouillo
Copy link
Owner

lpouillo commented Apr 8, 2021

Merci @mimbert .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants