Re: #! /usr/bin/python{,3} -Es

2012-10-28 Thread Barry Warsaw
On Oct 27, 2012, at 06:53 PM, Jakub Wilk wrote: * Thomas Kluyver tho...@kluyver.me.uk, 2012-10-26, 11:03: Are there any situations where you might want to run a system script with modified Python environment variables? I can't think of any off the top of my head. Here's the list of environment

Re: #! /usr/bin/python{,3} -Es

2012-10-27 Thread Chow Loong Jin
On 26/10/2012 19:02, Thomas Kluyver wrote: On 26 October 2012 11:53, Chow Loong Jin hyper...@debian.org wrote: What is the definition of system script? Any script installed via dpkg, perhaps? I wouldn't have said so - I install plenty of Python scripts from packages, like /usr/bin/ipython,

Re: #! /usr/bin/python{,3} -Es

2012-10-27 Thread Jakub Wilk
* Thomas Kluyver tho...@kluyver.me.uk, 2012-10-26, 11:03: Are there any situations where you might want to run a system script with modified Python environment variables? I can't think of any off the top of my head. Here's the list of environment variables:

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Floris Bruynooghe
rewrite the shebang to /usr/bin/python[3] -ES that we know of, but is there any example of where such a shebang line would cause trouble that warrants not doing this by default? Regards, Floris -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Thomas Kluyver
On 26 October 2012 09:19, Floris Bruynooghe f...@devork.be wrote: Several people have said they don't think this is a good idea. But why not? There is a bad effect if you don't rewrite the shebang to /usr/bin/python[3] -ES that we know of, but is there any example of where such a shebang

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Jakub Wilk
* Thomas Kluyver tho...@kluyver.me.uk, 2012-10-26, 11:03: Are there any situations where you might want to run a system script with modified Python environment variables? I can't think of any off the top of my head. Here's the list of environment variables:

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Chow Loong Jin
On 26/10/2012 18:33, Jakub Wilk wrote: * Thomas Kluyver tho...@kluyver.me.uk, 2012-10-26, 11:03: Are there any situations where you might want to run a system script with modified Python environment variables? I can't think of any off the top of my head. Here's the list of environment

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Thomas Kluyver
On 26 October 2012 11:53, Chow Loong Jin hyper...@debian.org wrote: What is the definition of system script? Any script installed via dpkg, perhaps? I wouldn't have said so - I install plenty of Python scripts from packages, like /usr/bin/ipython, that I wouldn't call system scripts. I don't

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Paul Tagliamonte
On Fri, Oct 26, 2012 at 11:03:34AM +0100, Thomas Kluyver wrote: On 26 October 2012 09:19, Floris Bruynooghe f...@devork.be wrote: Several people have said they don't think this is a good idea. But why not? There is a bad effect if you don't rewrite the shebang to /usr/bin/python[3] -ES

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Thomas Kluyver
On 26 October 2012 14:20, Paul Tagliamonte paul...@debian.org wrote: django-admin if I'm using a virtualenv? Perhaps I'm missing the point? Will this just break all virtualenv support? To my mind, django-admin is not a system script. A system script would be something like the

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Floris Bruynooghe
effect if you don't rewrite the shebang to /usr/bin/python[3] -ES that we know of, but is there any example of where such a shebang line would cause trouble that warrants not doing this by default? Are there any situations where you might want to run a system script with modified Python

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Barry Warsaw
idea. But why not? There is a bad effect if you don't rewrite the shebang to /usr/bin/python[3] -ES that we know of, but is there any example of where such a shebang line would cause trouble that warrants not doing this by default? (Note it's a lower-case 's'. Upper-case 'S' does something

Re: #! /usr/bin/python{,3} -Es

2012-10-26 Thread Barry Warsaw
On Oct 26, 2012, at 12:33 PM, Jakub Wilk wrote: * Thomas Kluyver tho...@kluyver.me.uk, 2012-10-26, 11:03: Are there any situations where you might want to run a system script with modified Python environment variables? I can't think of any off the top of my head. Here's the list of environment

#! /usr/bin/python{,3} -Es

2012-10-25 Thread Barry Warsaw
I wanted to mention something that came up recently in Ubuntu, where lsb_release is a Python 3 script. This isn't specific to Python 3, since Python 2 scripts can also be affected. The Launchpad bug is symptomatic of the more general problem:

Re: #! /usr/bin/python{,3} -Es

2012-10-25 Thread Jakub Wilk
* Barry Warsaw ba...@python.org, 2012-10-25, 10:56: https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/938869 When you write system scripts like 'lsb_release' that use /usr/bin/python{,3} in the #! line, please remember to include -Es switches. This prevents the crash in question, where a

Re: #! /usr/bin/python{,3} -Es

2012-10-25 Thread Barry Warsaw
On Oct 25, 2012, at 07:05 PM, Jakub Wilk wrote: * Barry Warsaw ba...@python.org, 2012-10-25, 10:56: https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/938869 When you write system scripts like 'lsb_release' that use /usr/bin/python{,3} in the #! line, please remember to include -Es switches.

Re: #! /usr/bin/python{,3} -Es

2012-10-25 Thread Steve Langasek
On Thu, Oct 25, 2012 at 10:56:05AM -0400, Barry Warsaw wrote: This doesn't requires a mass freakout, but it might be useful for a mass bug filing (of non-urgent priority, I think). I don't have time before UDS-R to look into that, so I at least wanted to send this email to put it on the

Re: #! /usr/bin/python{,3} -Es

2012-10-25 Thread Barry Warsaw
On Oct 25, 2012, at 11:18 AM, Steve Langasek wrote: On Thu, Oct 25, 2012 at 10:56:05AM -0400, Barry Warsaw wrote: This doesn't requires a mass freakout, but it might be useful for a mass bug filing (of non-urgent priority, I think). I don't have time before UDS-R to look into that, so I at

Re: #! /usr/bin/python{,3} -Es

2012-10-25 Thread Piotr Ożarowski
[Steve Langasek, 2012-10-25] On Thu, Oct 25, 2012 at 10:56:05AM -0400, Barry Warsaw wrote: Using -E fixed the immediate bug, but I think it is generally useful to include -s also, so as to avoid any potential breakage of system scripts by things users may have added locally. If there's