Re: [Python-Dev] PEP 433: second try

2013-01-29 Thread Larry Hastings
On 01/29/2013 09:00 AM, Victor Stinner wrote: Hi, Here is a new version of my PEP 433. [...] * ``os.get_cloexec(fd)`` * ``os.set_cloexec(fd, cloexec=True)`` * ``sys.getdefaultcloexec()`` * ``sys.setdefaultcloexec(cloexec=True)`` Passing no judgment on the PEP otherwise, just a single o

[Python-Dev] PEP 433: second try

2013-01-29 Thread Victor Stinner
Hi, Here is a new version of my PEP 433. The default value of the cloexec parameter is now configurable (cmdline option, env var, sys.setdefaultcloexec), it can be disabled using sys.setdefaultcloexec(False). HTML version: http://python.org/dev/peps/pep-0433/ Implementation: http://bugs.python.o

Re: [Python-Dev] PEP 433: Choose the default value of the new cloexec parameter

2013-01-29 Thread Nick Coghlan
On Tue, Jan 29, 2013 at 4:13 PM, Charles-François Natali wrote: > So I'm definitely -1 against any form of tunable value (be it a > sys.setdefaultcloexec(), an environment variable or command-line > flag), and still against changing the default value. I now think the conservative option is to ini

Re: [Python-Dev] PEP 433: Choose the default value of the new cloexec parameter

2013-01-29 Thread Antoine Pitrou
Le Tue, 29 Jan 2013 11:24:49 +0100, Ralf Schmitt a écrit : > Please just acknowledge that having a global configurable setting may > lead to problems. Ralf, I won't "acknowledge" anything just so that it makes you feel better. Your point has been made and has also been rebutted. Let's agree to di

Re: [Python-Dev] PEP 433: Choose the default value of the new cloexec parameter

2013-01-29 Thread Ralf Schmitt
Antoine Pitrou writes: > Le Tue, 29 Jan 2013 09:35:40 +0100, > Ralf Schmitt a écrit : >> >> I'd rather not have to check if some library messes with that global >> setting and work around it if it does! > > Then just don't try changing the flag. Problem solved. I was talking about some library

Re: [Python-Dev] PEP 433: Choose the default value of the new cloexec parameter

2013-01-29 Thread Antoine Pitrou
Le Tue, 29 Jan 2013 09:35:40 +0100, Ralf Schmitt a écrit : > Antoine Pitrou writes: > > > Yes, it's fine, because an application developer can often control > > (or at least study) the behaviour of all the code involved. > > I'd rather not have to check if some library messes with that global >

Re: [Python-Dev] PEP 433: Choose the default value of the new cloexec parameter

2013-01-29 Thread Ralf Schmitt
Antoine Pitrou writes: > Yes, it's fine, because an application developer can often control (or > at least study) the behaviour of all the code involved. I'd rather not have to check if some library messes with that global setting and work around it if it does! The fact that you can control and

Re: [Python-Dev] PEP 433: Choose the default value of the new cloexec parameter

2013-01-29 Thread Victor Stinner
> Library code should not be relying on globals settings that can change. Did you try my implementation of the PEP 433 on your project? Did you review my patch implementing the PEP 433? http://hg.python.org/features/pep-433 http://bugs.python.org/issue17036 I expected more change, whereas only ve