On Wed, 27 Nov 2019 23:58:46 +0000 Sandro Tosi <mo...@paradis.debian.org> wrote: > Source: cfengine3 > Version: 3.12.1-2 > Severity: normal > Tags: sid bullseye > User: debian-pyt...@lists.debian.org > Usertags: py2removal
is the Recommends: python only because of: masterfiles/modules/packages/zypper:#!/usr/bin/python masterfiles/modules/packages/apt_get:# First try to run this script with python3, else run with python masterfiles/modules/packages/apt_get:command -v python3 >/dev/null 2>/dev/null \ masterfiles/modules/packages/apt_get: && exec python3 "$0" "$@" \ masterfiles/modules/packages/apt_get: || exec python "$0" "$@" masterfiles/modules/packages/yum:#!/usr/bin/python if so, apt_get already tries to use python3 if available, yum doesnt require any change to work with python3 (according to 2to3) and zypper only change is: ``` morph@zion:~/deb/tmp/cfengine3-3.12.1$ 2to3 masterfiles/modules/packages/zypper RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored masterfiles/modules/packages/zypper --- masterfiles/modules/packages/zypper (original) +++ masterfiles/modules/packages/zypper (refactored) @@ -46,7 +46,7 @@ from distutils.version import StrictVersion ZYPPER_SUPPORTS_OLDPACKAGE=False -package_zypper = rpm.TransactionSet().dbMatch('name', "zypper").next() +package_zypper = next(rpm.TransactionSet().dbMatch('name', "zypper")) if StrictVersion(package_zypper['version']) >= StrictVersion("1.6.169"): ZYPPER_SUPPORTS_OLDPACKAGE=True RefactoringTool: Files that need to be modified: RefactoringTool: masterfiles/modules/packages/zypper ``` Antonio, could you please take care of fixing these modules to use a python3 shebang (+ patch) and upload cfengine3 to unstable soon? I can NMU it if you prefer, let me know. Regards, Sandro