Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 521303

Summary: Fix instances of #!/usr/bin/env python in python-docs
Product: Red Hat Enterprise Linux 5 Reporter: Chris Williams <cww>
Component: python-docsAssignee: Roman Rakus <rrakus>
Status: CLOSED WONTFIX QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4CC: cww, dmalcolm, psplicha, rbiba, rvokal, tao, tsmetana
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-12 14:32:54 UTC Type: ---
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: 502912, 521940, 590060    

Description Chris Williams 2009-09-04 16:59:07 UTC
here's a project underway in Fedora 12 to finally resolve the issues
with Red Hat including #!/usr/bin/env python in our python executables:

https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython

There's also a Fedora bug opened on this, and comments in there state
that this is a big priority for RHEL6:

https://bugzilla.redhat.com/show_bug.cgi?id=518994

For RHEL5, we've been instructed by Product Management to open bugs on
a package-by-package basis to address the problem.

In this case, python-docs in RHEL5 has at least one instance of a
python script containing #!/usr/bin/env python"

Comment 1 Radek Bíba 2009-09-07 08:18:21 UTC
Not entirely true. python-docs is a documentation package full of HTML files. Although some documents do use #!/usr/bin/env python in examples of python code and there's also a few .txt files that contain python code, there's no python executable in this package that would call it. Should the documents & examples be fixed too?

Comment 2 Issue Tracker 2009-09-08 13:02:12 UTC
Event posted on 09-08-2009 09:02am EDT by kbaxley

For the sake of consistency, please go ahead and fix them, but this is not
a high priority item. 

There may be a case where a customer will use one of those examples as a
template or something like that and it could end up generating an unwanted
surprise.  


This event sent from IssueTracker by kbaxley 
 issue 339216

Comment 3 Radek Bíba 2009-09-08 13:14:30 UTC
Makes sense. Thanks for the clarification.

Comment 4 Roman Rakus 2009-09-23 11:14:52 UTC
This can be done fasttrack

Comment 5 Dave Malcolm 2009-10-30 21:09:12 UTC
(In reply to comment #2)
> Event posted on 09-08-2009 09:02am EDT by kbaxley
> 
> For the sake of consistency, please go ahead and fix them, but this is not
> a high priority item. 
> 
> There may be a case where a customer will use one of those examples as a
> template or something like that and it could end up generating an unwanted
> surprise.  

I was deliberately special-casing "system executables" when I wrote https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
since they're intended to be run with the system version of python.

Upstream's guidance on this is that python developers should use
  #!/usr/bin/env python
as the shebang:
  http://docs.python.org/tutorial/interpreter.html#executable-python-scripts
since this allows you to write scripts that work on a locally-built python environment by setting your PATH.

So for the case of RPM packaging, it's the right thing to do, but for other cases it might not be, and changing the documentation in the manner of comment #2 could be misleading.

Note that the /tutorial/interpreter.html page above is one of the files we ship within the python-docs package.  So perhaps we could update that with downstream-specific guidance?

Comment 19 Roman Rakus 2013-03-12 14:32:54 UTC
RHEL-5.10 (the next RHEL-5 minor release) is going to be the first production phase 2 [1] release of RHEL-5. Since phase 2 we'll be addressing only security and critical issues.

[1] https://access.redhat.com/support/policy/updates/errata/