start using python2 instead of python in the code

Bug #763164 reported by Thomas Dziedzic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qBittorrent
Confirmed
Undecided
Christophe Dumez

Bug Description

I am the current maintainer of qbittorrent for archlinux. I would like to submit a request to start using python2 instead of just "python" in the code because archlinux has switched python to mean python3. Switching to python2 shouldn't affect anything on other distros afaik. These are the current patches I have to apply to get qbittorrent to use python2 on arch:

I attached the python->python2 patch
And also, another sed script which needs to fix all the shebangs:
  sed -i \
    -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
    -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
    $(find ./ -name '*.py')

If you have any questions, let me know, Thanks!

Revision history for this message
Thomas Dziedzic (gostrc) wrote :
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Hi,

I'm thinking this should be a distro-specific change for now. Most of the other distributions still use python 2.x as a default and unfortunately, not all of them have the python2 symlink (for example Ubuntu Natty). This change would also probably break things on Mac and Windows platforms.

In longer term, I will certainly simply port my scripts to python3 (when most distribution make the change due to the lack of backward compatibility).

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.