Ticket #3936 (closed enhancement: fixed)
Drop python2 support
Reported by: | vascom | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.8.24 |
Component: | mc-vfs | Version: | master |
Keywords: | python2, python3, vfs, extfs | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
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.
Change History
comment:1 in reply to: ↑ description Changed 6 years ago by andrew_b
comment:2 follow-up: ↓ 3 Changed 6 years ago by vascom
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?
comment:3 in reply to: ↑ 2 Changed 6 years ago by andrew_b
I don't know. Personally I don't use these plugins.
comment:4 Changed 6 years ago by vascom
Then need test plugins with python3 and rewrite or remove them.
comment:6 Changed 5 years ago by gryf
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.
comment:7 Changed 5 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Milestone changed from Future Releases to 4.8.24
comment:8 Changed 5 years ago by andrew_b
- Branch state changed from no branch to on review
Branch: 3936_uc1541
changeset:dc46dc0009d6eb6af612e22f95a108b954b10f7b
comment:9 Changed 5 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset set to committed-master
- Resolution set to fixed
- Branch state changed from on review to merged
Merged to master: [f788bd02acfde88cac648941f328717ff2828f40].
comment:10 Changed 5 years ago by andrew_b
- Status changed from testing to closed
uc1541 updated.
Discussion about s3 welcome to #3904.
Replying to vascom:
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