Bug 1737912 - asterisk depends on Python 2
Summary: asterisk depends on Python 2
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: asterisk
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jared Smith
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F31_PY2REMOVAL
TreeView+ depends on / blocked
 
Reported: 2019-08-06 11:31 UTC by Lumír Balhar
Modified: 2019-10-26 12:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Lumír Balhar 2019-08-06 11:31:30 UTC
Python 2.7 will reach end-of-life in January 2020, over 9 years after it was released. This falls within the Fedora 31 lifetime.
Packages that depend on Python 2 are being switched to Python 3 or removed from Fedora: https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal#Information_on_Remaining_Packages
Python 2 will be retired in Fedora 32: https://fedoraproject.org/wiki/Changes/RetirePython2

To help planning, we'd like to know the plans for asterisk's future. Specifically:


- What is the reason for the Python2 dependency? (Is it software written in Python, or does it just provide Python bindings, or use Python in the build system or test runner?) 

- What are the upstream/community plans/timelines regarding Python 3?

- What is the guidance for porting to Python 3? (Assuming that there is someone who generally knows how to port to Python 3, but doesn't know anything about the particular package, what are the next steps to take?)


This bug is filed semi-automatically, and might not have all the context specific to asterisk.
If you need anything from us, or something is unclear, please mention it here.

Thank you.

Comment 1 Jared Smith 2019-08-06 16:41:50 UTC
Asterisk uses Python 2 in its test suite.  The upstream community is contemplating moving the test suite to Python 3, but I doubt that would happen before January 2020.

Comment 2 Ben Cotton 2019-08-13 16:48:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 3 Lumír Balhar 2019-08-14 08:13:43 UTC
The current plan is to remove packages with dependency on Python 2 from Fedora 32 in the middle of November 2019. If you want to keep your package in Fedora after that date and you cannot port it to Python 3 yet, you need to request a FESCo exception for the package and all its Python 2 dependencies (even transitive) [1]. If you don't want to maintain it anymore, and nothing in Fedora uses it, you can retire it or just remove the Python 2 part from it (subpackage, module, bindings, etc.).

If you're considering filing the exception request, let us know. We can help (for example, we can help find all the dependencies).

[1] https://fedoraproject.org/wiki/Changes/RetirePython2#FESCo_exceptions

Comment 4 Harald Reindl 2019-10-26 12:45:40 UTC
but when it's only for the testsuite why is it pulled on machines with just this packages?

[root@asterisk:~]$ rpm -qa | grep asterisk
asterisk-sip-16.4.0-1.fc30.x86_64
asterisk-voicemail-plain-16.4.0-1.fc30.x86_64
asterisk-voicemail-16.4.0-1.fc30.x86_64
asterisk-16.4.0-1.fc30.x86_64
asterisk-iax2-16.4.0-1.fc30.x86_64

------------------

luckily we work with metapackages per machine pulling deps and so hacks like this one prevent it from get pulled

Provides: python(abi) = 2.7
Provides: /usr/bin/python2

------------------

the downside of such hacks is that it drives dnf crazy for whatever reason

[root@asterisk:~]$ dnf leaves
asterisk-16.4.0-1.fc30.x86_64
asterisk-iax2-16.4.0-1.fc30.x86_64
asterisk-sip-16.4.0-1.fc30.x86_64
asterisk-voicemail-16.4.0-1.fc30.x86_64
asterisk-voicemail-plain-16.4.0-1.fc30.x86_64
lounge-voip-30.1-1.fc30.20191022.rh.noarch

------------------

luckily another hack prevents mistakes while "lounge-voip" has Requires: for all asterisk packages and "dnf leaves" should never list something in /etc/dnf/protected.d/ to begin with

[root@asterisk:~]$ dnf remove asterisk-16.4.0-1.fc30.x86_64 asterisk-iax2-16.4.0-1.fc30.x86_64 asterisk-sip-16.4.0-1.fc30.x86_64 asterisk-voicemail-16.4.0-1.fc30.x86_64 asterisk-voicemail-plain-16.4.0-1.fc30.x86_64 lounge-voip-30.1-1.fc30.20191022.rh.noarch
Error:
 Problem: The operation would result in removing the following protected packages: asterisk, asterisk-iax2, asterisk-sip, asterisk-voicemail, asterisk-voicemail-plain, lounge-voip
(try to add '--skip-broken' to skip uninstallable packages)


Note You need to log in before you can comment on or make changes to this bug.