Ticket #3936 (new enhancement)

Opened 12 months ago

Last modified 6 days ago

Drop python2 support

Reported by: vascom Owned by:
Priority: major Milestone: Future Releases
Component: mc-vfs Version: master
Keywords: python2, python3, vfs, extfs Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:


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


Please fix it so MC not require python2 anymore.

Change History

comment:1 in reply to: ↑ description Changed 12 months ago by andrew_b

Replying to vascom:

MC contain two file with python2 shebang:


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

comment:2 follow-up: ↓ 3 Changed 12 months 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?

Last edited 12 months ago by andrew_b (previous) (diff)

comment:3 in reply to: ↑ 2 Changed 12 months ago by andrew_b

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

comment:4 Changed 12 months ago by vascom

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

comment:5 Changed 5 months ago by vascom


Any progress?

comment:6 Changed 6 days 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.

Note: See TracTickets for help on using tickets.