Bug 521303 - Fix instances of #!/usr/bin/env python in python-docs
Fix instances of #!/usr/bin/env python in python-docs
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python-docs (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Roman Rakus
BaseOS QE
:
Depends On:
Blocks: 502912 590060 521940
  Show dependency treegraph
 
Reported: 2009-09-04 12:59 EDT by Chris Williams
Modified: 2014-01-12 19:09 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-12 10:32:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Chris Williams 2009-09-04 12:59:07 EDT
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 04:18:21 EDT
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 09:02:12 EDT
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 09:14:30 EDT
Makes sense. Thanks for the clarification.
Comment 4 Roman Rakus 2009-09-23 07:14:52 EDT
This can be done fasttrack
Comment 5 Dave Malcolm 2009-10-30 17:09:12 EDT
(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 10:32:54 EDT
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/

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