Description of problem: mc is the only package still requiring python2 and thus openssl10 on my F29 VM. Please switch to python3 at least in F30+. Version-Release number of selected component (if applicable): mc-1:4.8.21-2.fc29.x86_64 How reproducible: Always Steps to Reproduce: 1. rpm -qR mc |grep python Actual results: /usr/bin/python2 Expected results: /usr/bin/python3 Additional info: This will help implement: https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
mc python code is abut s3 bucket vfs. I have ability to use AWS now. If someone will submit the patch I can quickly add it to mc package.
Did you had chance to port s3 vfs backends script to python 3.x?
Looks like not only s3+, but also uc1541 is pyton2 script only. s3+ can be ported to python3 using 2to3 script. It can start, but I have no AWS account to test. uc1541 is more complicated. Uses ArgumentParser().func, which is not implmented in python3 arg parser. It is possible to disable argparse module and then uc1541 switches to simple no_parse mode. Not sure, how much functionality is disabled after this change. May be it would be good to move these plugins and may be others, which requires external programs to a different optional subpackage.
Looks like uc1541 python3 support is already available upstream: https://bitbucket.org/gryf/uc1541/src/master/ and as I already wrote, s3+ can be ported using: 2to3 -w s3+ There is a ticket open in mc upstream for python3 porting too: http://midnight-commander.org/ticket/3936
I have no possibility to test s3 support. Please let me know does it work after update using 2to3.
Meybe sombody on mc upstream can test s3+. Is there anybody, who can update upstream bug to inform about 2to3 testing?
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31.
The s3+ and uc1541 needs porting to python3. This is what happens when I run it with python3 shebang in mc-4.8.23: $ ./s3+ File "./s3+", line 199 raise res[0],res[1],res[2] ^ SyntaxError: invalid syntax $ ./uc1541 Traceback (most recent call last): File "./uc1541", line 556, in <module> sys.exit(PARSE_FUNC()) File "./uc1541", line 514, in parse_args return args.func(args) AttributeError: 'Namespace' object has no attribute 'func'
*** Bug 1738081 has been marked as a duplicate of this bug. ***
Feel free to send the patch. I'm not using AWS.
Any news here? One possible solution might be to remove these plugins from mc of move them to optional subpackage and request a fesco exception for it. Porting of S3 plugin should be simple because it's only ~500 LOC but we need to find somebody who will be able to test it.
I'm not using AWS so feel free to send patch.
Would you mind to send an email to devel@ mailing list? I am sure that we can find somebody there who would be able to test it.
What is your plan?
Feel free to upload the patch for python3 for s3 vfs extension. I'm not using AWS.
Created attachment 1617222 [details] Python3 patch for s3+ generated by 2to3 Looks like we are still moving in circle. Adding a patch for s3+. This patch has not been testing, but I think, the only way how to test it is to add it to Fedora's mc. May be nobody is using this and it's not needed anymore. This patch is simple, generated by python's 2to3, so it should work.
Hi Jan, thanks for this! Do you mind looking at uc1541 script as well? Ideally if you do a PR in upstream so that all distros could have it -> https://midnight-commander.org/ Thanks, Jindrich
Hello Jindrich (In reply to Jindrich Novy from comment #18) > thanks for this! Do you mind looking at uc1541 script as well? Please, look at my comment #4. There was anything required already written in may 2019. Looks like there is a still maintained python3 version of uc1541 at bitbucket. > Ideally if > you do a PR in upstream so that all distros could have it -> > https://midnight-commander.org/ Sorry, no time now to do this. I think you are a mc developer, so please do it instead of me. It's very easy to generate this patch, just use a part of base devel python3 skript named "2to3". Everyone with python3 installed should have it. [ondrejj@work ~]$ rpm -qf /usr/bin/2to3 python3-devel-3.7.4-1.fc30.x86_64 MC developers should also contact gryf to include latest patches for uc1541 in upstream. Not sure, why this is maintained separately. May be it will be better to currently only test my s3+ patch in Fedora and leave mc developers to include them just after some testing. MC without python3 patches is useless for Fedora 32 due to end of life of python2, so it doesn't matter, if this patch works. If don't, then this extension support should be removed.
Will try to have look on those patches in next few hours. Proabably will try to push modified mc to rawhide just after this. Thx
4.8.23-3 which is ported to python3 has been pushed to builder. Closing.