Bug 1738158

Summary: trace-cmd depends on Python 2
Product: [Fedora] Fedora Reporter: Lumír Balhar <lbalhar>
Component: trace-cmdAssignee: Zamir SUN <sztsian>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jonstanley, mhroncok, sztsian
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: trace-cmd-2.7-7.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-07 15:44:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1698500    

Description Lumír Balhar 2019-08-06 13:18:21 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 trace-cmd'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 trace-cmd.
If you need anything from us, or something is unclear, please mention it here.

Thank you.

Comment 1 Zamir SUN 2019-08-07 10:19:55 UTC
Hi Lumir,

Thanks for the info. I suppose you are checking against an old snapshot, isn't it?

The dependency was actually switched to python3 last week.
https://src.fedoraproject.org/rpms/trace-cmd/c/8b530dd0d5e078c721dbb1095ee8faa95dec6492?branch=master

If this bug aims at getting the reason for why this happens late, I would say that I did not figure out how to make swig work without python2-devel before, but now it works.

Comment 2 Lumír Balhar 2019-08-07 12:22:17 UTC
You are completely right. My source database for these bugs was slightly outdated. Everything looks good here.

Thank you!

Comment 3 Miro Hrončok 2019-08-07 12:31:30 UTC
In fact, trace-cmd 2.7-6 still requires Python 2:

$ repoquery --repo=rawhide --requires trace-cmd-python3
/usr/bin/python2
...

Comment 4 Lumír Balhar 2019-08-07 13:38:28 UTC
It might be caused by a hardcoded shebang in event-viewer.py:

$ grep -iIrn python2 trace-cmd-v2.7/
trace-cmd-v2.7/Makefile:639:		$(shell python2 -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')")
trace-cmd-v2.7/event-viewer.py:1:#!/usr/bin/env python2

Comment 5 Zamir SUN 2019-08-07 13:58:34 UTC
Facepalm.

Thanks. I'll take a look.

Comment 6 Zamir SUN 2019-08-07 15:44:19 UTC
Fixed with trace-cmd-2.7-7.fc31.

I temporary replace the shebang with python3, as I am already working on updating trace-cmd to a newer upstream version (currently blocked by some CFLAGS issue). I'll raise the hardcode issue to upstream when I resolved the build issue with the newer version.