[Python-Dev] PEP 446 (make FD non inheritable) ready for a final review (original) (raw)
Victor Stinner victor.stinner at gmail.com
Thu Aug 22 23:32:11 CEST 2013
- Previous message: [Python-Dev] cpython: Cleanup test_builtin
- Next message: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I know that I wrote it more than once, but I consider that my PEP 446 is now ready for a final review:
http://www.python.org/dev/peps/pep-0446/
The implementation is also working, complete and ready for a review.
http://hg.python.org/features/pep-446 http://bugs.python.org/issue18571
I run regulary the test suite on my virtual machines: Windows 7 SP1, Linux 3.2, FreeBSD 9 and OpenIndiana (close to Solaris 11), but also sometimes on OpenBSD 5.2. I don't expect major bugs, but you may find minor issues, especially on old operating systems. I don't have access to older systems.
I collected the list of all threads related to the inheritance of file descriptors on python-dev since january 2013. I counted no more than 239 messages! Thank you all developers who contributed to these discussions and so helped me to write the PEP 433 and the PEP 446, especially Charles-François Natali and Richard Oudkerk!
I read again all these messages, and I cannot "go backward" to the PEP 433. There are too many good reasons against adding a global variable (sys.getdefaultcloexec()), and adding a new inheritable parameter without changing the inheritance to non-inheritable does not solve issues listed in the Rationale of the PEP 446.
At the beginning of the discussions, most developers already agreed that making file descriptors non-inheritable by default is the best choice. It took me some months to really understand all the consequences of changing the inheritance. I had also many technical issues because each operating system handles the inheritance of file descriptors differently, especially Windows vs UNIX. For atomic flags, there are differences even between minor versions of operating systems. For example, the O_CLOEXEC flag is only supported since Linux 2.6.23. We spend a lot of time to discuss each intermediate solution, but the conclusion is that no compromise can be found on an intermediate solution, only a radical change can solve the problem.
[Python-Dev] Add "e" (close and exec) mode to open() (13 messages) Tue Jan 8 2013 http://mail.python.org/pipermail/python-dev/2013-January/123494.html
[Python-Dev] Set close-on-exec flag by default in SocketServer (31) Wed Jan 9 2013 http://mail.python.org/pipermail/python-dev/2013-January/123552.html
[Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors (27) Sun Jan 13 2013 http://mail.python.org/pipermail/python-dev/2013-January/123609.html
[Python-Dev] Implementation of the PEP 433 (2) Fri Jan 25 2013 http://mail.python.org/pipermail/python-dev/2013-January/123684.html
[Python-Dev] PEP 433: Choose the default value of the new cloexec parameter (37) Fri Jan 25 2013 http://mail.python.org/pipermail/python-dev/2013-January/123685.html
[Python-Dev] PEP 433: second try (5) Tue Jan 29 2013 http://mail.python.org/pipermail/python-dev/2013-January/123763.html
[Python-Dev] Release or not release the GIL (11) Fri Feb 1 2013 http://mail.python.org/pipermail/python-dev/2013-February/123780.html
[Python-Dev] Status of the PEP 433? (2) Thu Feb 14 2013 http://mail.python.org/pipermail/python-dev/2013-February/124070.html
[Python-Dev] PEP 446: Add new parameters to configure the inherance of files and for non-blocking sockets (24) Thu Jul 4 2013 http://mail.python.org/pipermail/python-dev/2013-July/127168.html
[Python-Dev] Inherance of file descriptor and handles on Windows (PEP 446) (41) Wed Jul 24 2013 http://mail.python.org/pipermail/python-dev/2013-July/127509.html http://mail.python.org/pipermail/python-dev/2013-August/127791.html
[Python-Dev] PEP 446: Open issues/questions (29) Sun Jul 28 2013 http://mail.python.org/pipermail/python-dev/2013-July/127626.html http://mail.python.org/pipermail/python-dev/2013-August/127728.html
[Python-Dev] (New) PEP 446: Make newly created file descriptors non-inheritable (8) Tue Aug 6 2013 http://mail.python.org/pipermail/python-dev/2013-August/127805.html
[Python-Dev] PEP 446: issue with sockets (9) Wed Aug 21 2013 http://mail.python.org/pipermail/python-dev/2013-August/128045.html
Victor
- Previous message: [Python-Dev] cpython: Cleanup test_builtin
- Next message: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]