Ticket #3936 (closed enhancement: fixed)

Opened 14 months ago

Last modified 2 months ago

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 14 months ago by andrew_b

Replying to vascom:

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

#! @PYTHON@

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

#! /usr/bin/python

comment:2 follow-up: ↓ 3 Changed 14 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 14 months ago by andrew_b (previous) (diff)

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

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

comment:4 Changed 14 months ago by vascom

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

comment:5 Changed 7 months ago by vascom

Hi.

Any progress?

comment:6 Changed 2 months 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 2 months 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 2 months ago by andrew_b

  • Branch state changed from no branch to on review

comment:9 Changed 2 months 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

comment:10 Changed 2 months ago by andrew_b

  • Status changed from testing to closed

uc1541 updated.

Discussion about s3 welcome to #3904.

Note: See TracTickets for help on using tickets.