Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1738158 - trace-cmd depends on Python 2
Summary: trace-cmd depends on Python 2
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: trace-cmd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zamir SUN
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F31_PY2REMOVAL
TreeView+ depends on / blocked
 
Reported: 2019-08-06 13:18 UTC by Lumír Balhar
Modified: 2019-08-07 15:44 UTC (History)
3 users (show)

Fixed In Version: trace-cmd-2.7-7.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-07 15:44:19 UTC
Type: Bug


Attachments (Terms of Use)

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.


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