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

2013-01-25 Thread Charles-François Natali
Hello, I tried to list in the PEP 433 advantages and drawbacks of each option. If I recorded correctly opinions, the different options have the following supporters: a) cloexec=False by default b) cloexec=True by default: Charles-François Natali c) configurable default value: Antoine

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

2013-01-25 Thread Nick Coghlan
On Fri, Jan 25, 2013 at 6:56 PM, Charles-François Natali cf.nat...@gmail.com wrote: Hello, I tried to list in the PEP 433 advantages and drawbacks of each option. If I recorded correctly opinions, the different options have the following supporters: a) cloexec=False by default b)

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

2013-01-25 Thread Victor Stinner
2013/1/25 Charles-François Natali cf.nat...@gmail.com: You can actually count me in the cloexec=False camp, and against the idea of a configurable default value. Oh ok. Why cloexec shouldn't be set by default: - While it's really tempting to fix one of Unix historical worst decisions, I

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

2013-01-25 Thread Victor Stinner
I think the default behaviour needs to be configurable from the environment and the command line, but I don't believe it should be configurable from within the interpreter. sys.setdefaultcloexec() is convinient for unit test, but it may also be used by modules. A web framework may want to

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

2013-01-25 Thread Antoine Pitrou
Le Fri, 25 Jan 2013 12:28:10 +0100, Victor Stinner victor.stin...@gmail.com a écrit : I think the default behaviour needs to be configurable from the environment and the command line, but I don't believe it should be configurable from within the interpreter. sys.setdefaultcloexec() is

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

2013-01-25 Thread Nick Coghlan
On Fri, Jan 25, 2013 at 9:36 PM, Antoine Pitrou solip...@pitrou.net wrote: Le Fri, 25 Jan 2013 12:28:10 +0100, Victor Stinner victor.stin...@gmail.com a écrit : I think the default behaviour needs to be configurable from the environment and the command line, but I don't believe it should be

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

2013-01-25 Thread Nick Coghlan
On Fri, Jan 25, 2013 at 10:07 PM, Nick Coghlan ncogh...@gmail.com wrote: On Fri, Jan 25, 2013 at 9:36 PM, Antoine Pitrou solip...@pitrou.net wrote: Le Fri, 25 Jan 2013 12:28:10 +0100, Victor Stinner victor.stin...@gmail.com a écrit : Well, I don't know if sys.setdefaultcloexec() is a good idea

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

2013-01-25 Thread Victor Stinner
2013/1/25 Nick Coghlan ncogh...@gmail.com: I just realised I could be converted to a +0 if the runtime time switch could only be used to set the global default as cloexec=True and couldn't be used to switch it back again (for testing purposes, if you only want to switch it on temporarily, use

[Python-Dev] Summary of Python tracker Issues

2013-01-25 Thread Python tracker
ACTIVITY SUMMARY (2013-01-18 - 2013-01-25) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open3837 ( +8) closed 24971 (+29) total 28808 (+37) Open issues

Re: [Python-Dev] Implementation of the PEP 433

2013-01-25 Thread Victor Stinner
I created the following issue to track and review the implementation of the PEP 433: http://bugs.python.org/issue17036 Last changes: - don't hold the GIL to ensure atomicity of the close-on-exec flag - apply the default value of cloexec on all C functions - sys.setdefaultcloexec() don't have

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

2013-01-25 Thread Nick Coghlan
On Sat, Jan 26, 2013 at 12:54 AM, Victor Stinner victor.stin...@gmail.com wrote: But do we really want to enable close-on-exec in the future? Charles François has really good arguments against such choice :-) While many of Python's APIs are heavily inspired by POSIX, it still isn't POSIX. It