Description of problem: msec is written in python 2 Migration to python 3 hoped. I propose a patch for that. Reproducible: Steps to Reproduce:
Created attachment 6881 [details] Adaptation to python 3 I tested the modifications in msecgui and with make and make install.
CC: (none) => makowski.mageia, marja11, neoclust, thierry.vignaud
Created attachment 6883 [details] convert to python3
Created attachment 6884 [details] adapt shebang
Created attachment 6885 [details] python3 fix
Created attachment 6886 [details] bump release
We definitively want to migrate to python3. For the record, here's the work I did one year ago (rebased on top of current master). I let you compare both approach. One difference is for the python3 fix. WDYT? What's better your fix or mine? We could use your patch as it was tested recently (though you could split the shebang part like I did in order to have smaller easier-to-reread-in-6-months commits. I would also split the "header =" as it's a manual fix. WDYT?
(In reply to Thierry Vignaud from comment #6) > We could use your patch as it was tested recently (though you could split > the shebang part like I did in order to have smaller > easier-to-reread-in-6-months commits. > I would also split the "header =" as it's a manual fix. > WDYT? agree with that
Ok, I will submit it in parts. Thierry, in your patch, the class ConfigFile is badly indented. I added also modifications in gettext.install suppressing unicode parameter. Thus, scripts in plugins are also concerned.
as I said, I'm fine with going your way :-)
Created attachment 6898 [details] 2to3-3.4 modifications
Created attachment 6899 [details] Adaption of shebang
Created attachment 6900 [details] Adapting gettext install command
Created attachment 6901 [details] the other modifications The last ones, for the moment.
Comment on attachment 6901 [details] the other modifications If we don't need Narg() anymore b/c everything is eventually UTF-8, just kill it. But we'd better check with other languages (see bug #13837)
Yes, I think also that it should be cleaned. If it works for all languages. I already tested pt_BR and fr. I would have some back advices before processing.
Too bad we introduced Narg() just a couple days before :-(
Created attachment 6913 [details] Syntax corrections I discover some syntax problems with string.replace, string.join and os.error in libsec.py
Attachment 6881 is obsolete: 0 => 1
Created attachment 6922 [details] Suppression of a decode instruction Another syntax error
Created attachment 6928 [details] Reverse the Narg function WHat a pitty, we should reverse this work/
commit 73a2738eba0625fa9befcaeed690e035b12ab91e Author: SARL ENR 68 <david@...> Date: Fri Aug 28 19:58:30 2015 +0200 Adaptation to python3 using 2to3-3.4 (mga#16524) - by papoteur: https://bugs.mageia.org/attachment.cgi?id=6898 --- Commit Link: http://gitweb.mageia.org/software/msec/commit/?id=73a2738eba0625fa9befcaeed690e035b12ab91e
commit d12860fd59555360c5bec904112af054da2e9f76 Author: SARL ENR 68 <david@...> Date: Fri Aug 28 20:03:09 2015 +0200 Adapt shebang (mga#16524) - by papoteur: https://bugs.mageia.org/attachment.cgi?id=6899 --- Commit Link: http://gitweb.mageia.org/software/msec/commit/?id=d12860fd59555360c5bec904112af054da2e9f76
commit 790687cc86370e6f672654b3ab76d5a1fad41bf1 Author: SARL ENR 68 <david@...> Date: Fri Aug 28 20:04:58 2015 +0200 Adjust gettext.install for python3 (mga#16524) - by papoteur: https://bugs.mageia.org/attachment.cgi?id=6900 --- Commit Link: http://gitweb.mageia.org/software/msec/commit/?id=790687cc86370e6f672654b3ab76d5a1fad41bf1
commit a3a185fdf46f25d4c8321b478427cc14987d62db Author: SARL ENR 68 <david@...> Date: Fri Aug 28 20:06:30 2015 +0200 Other modifications for pyhton adapting to Python3 (mga#16524) - by papoteur: https://bugs.mageia.org/attachment.cgi?id=6901 --- Commit Link: http://gitweb.mageia.org/software/msec/commit/?id=a3a185fdf46f25d4c8321b478427cc14987d62db
commit 0e0672380f7db341e3966906b9fa73d16b4f49a8 Author: SARL ENR 68 <david@...> Date: Fri Aug 28 20:08:12 2015 +0200 Syntax corrections for string replace, join and for os.error (mga#16524) - by papoteur: https://bugs.mageia.org/attachment.cgi?id=6913 --- Commit Link: http://gitweb.mageia.org/software/msec/commit/?id=0e0672380f7db341e3966906b9fa73d16b4f49a8
commit 3cca390baa91f14bb8f112587bf62388dbad66b8 Author: SARL ENR 68 <david@...> Date: Fri Aug 28 20:09:28 2015 +0200 Suppress a decode instruction (mga#16524) - by papoteur: https://bugs.mageia.org/attachment.cgi?id=6922 --- Commit Link: http://gitweb.mageia.org/software/msec/commit/?id=3cca390baa91f14bb8f112587bf62388dbad66b8
commit 71c7542f490e69f94b2a5277b40f4072a0fc7ad5 Author: SARL ENR 68 <david@...> Date: Fri Aug 28 20:10:47 2015 +0200 Reverse the Narg function, no more needed (mga#16524) - by papoteur: https://bugs.mageia.org/attachment.cgi?id=6928 --- Commit Link: http://gitweb.mageia.org/software/msec/commit/?id=71c7542f490e69f94b2a5277b40f4072a0fc7ad5
Closing
Status: NEW => RESOLVEDResolution: (none) => FIXED