Bug 521303 - Fix instances of #!/usr/bin/env python in python-docs
Summary: Fix instances of #!/usr/bin/env python in python-docs
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python-docs
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Roman Rakus
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks: 502912 521940 590060
TreeView+ depends on / blocked
 
Reported: 2009-09-04 16:59 UTC by Chris Williams
Modified: 2014-01-13 00:09 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-12 14:32:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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/


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