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

Drop python2 support #3936

Closed
mc-butler opened this issue Sep 18, 2018 · 10 comments
Closed

Drop python2 support #3936

mc-butler opened this issue Sep 18, 2018 · 10 comments
Assignees
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3936
Reporter vascom (@Vascom)
Keywords python2, python3, vfs, extfs

Python 2 EOL in 2020 and most of the Linux distributions started to drop python2 support already.
MC contain two file with python2 shebang:

/usr/libexec/mc/extfs.d/s3+
/usr/libexec/mc/extfs.d/uc1541

Please fix it so MC not require python2 anymore.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 18, 2018 at 12:41 UTC

Replying to vascom (#3936):

MC contain two file with python2 shebang:

/usr/libexec/mc/extfs.d/s3+
/usr/libexec/mc/extfs.d/uc1541

That's not true. There is no any python2 dependency in the mc.

In the source tree, shebang in those files is


The substitution of @python@ is done in configure state.
In my system I have

#! /usr/bin/python

@mc-butler
Copy link
Author

Changed by vascom (@Vascom) on Sep 18, 2018 at 13:01 UTC (comment 2)

As I see it set in configure.ac by

AC_PATH_PROG([PYTHON], [python], [/usr/bin/python])

So if I change it to python3 path the above two vfs plugins will normal work?

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 18, 2018 at 13:08 UTC (comment 2.3)

I don't know. Personally I don't use these plugins.

@mc-butler
Copy link
Author

Changed by vascom (@Vascom) on Sep 18, 2018 at 13:12 UTC (comment 4)

Then need test plugins with python3 and rewrite or remove them.

@mc-butler
Copy link
Author

Changed by vascom (@Vascom) on Apr 26, 2019 at 11:35 UTC (comment 5)

Hi.

Any progress?

@mc-butler
Copy link
Author

Changed by gryf (gryf_esm@….pl) on Sep 15, 2019 at 7:54 UTC (comment 6)

As for uc1541, it supports both - python2 and python3, although I recommend to update it to the latest version (available on https://github.com/gryf/uc1541), since there are couple of tweaks and fixes.

I'd also recommend to use python in shebang, probably this form is best:

#!/usr/bin/env python

so that, default python interpreter defined in a system will be used. Some systems allows to set default interpreter to be python3 and /usr/bin/python is a link to the chosen interpreter.

According to https://legacy.python.org/dev/peps/pep-0394/ python interpreter can be used for both - python2 and python3 compatible scripts, and uc1541 currently is compatible with both versions.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 21, 2019 at 16:47 UTC (comment 7)

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.24

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 21, 2019 at 16:53 UTC (comment 8)

  • Branch state changed from no branch to on review

Branch: 3936_uc1541
[dc46dc0]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 21, 2019 at 16:54 UTC (comment 9)

  • Status changed from accepted to testing
  • Branch state changed from on review to merged
  • Votes set to committed-master
  • Resolution set to fixed

Merged to master: [f788bd0].

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 21, 2019 at 16:59 UTC (comment 10)

  • Status changed from testing to closed

uc1541 updated.

Discussion about s3 welcome to #3904.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress
Development

No branches or pull requests

2 participants