Commit graph

6355 commits

Author SHA1 Message Date
Antoine Pitrou
91ecea24f5 Issue #13772: In os.symlink() under Windows, do not try to guess the link
target's type (file or directory).  The detection was buggy and made the
call non-atomic (therefore prone to race conditions).
2012-01-24 09:05:18 +01:00
Antoine Pitrou
5311c1d7ab Issue #13772: In os.symlink() under Windows, do not try to guess the link
target's type (file or directory).  The detection was buggy and made the
call non-atomic (therefore prone to race conditions).
2012-01-24 08:59:28 +01:00
Benjamin Peterson
ce79852077 use the static identifier api for looking up special methods
I had to move the static identifier code from unicodeobject.h to object.h in
order for this to work.
2012-01-22 11:24:29 -05:00
Gregory P. Smith
08c1278ab8 Fix FreeBSD, NetBSD and OpenBSD behavior of the issue #8052 fix. 2012-01-21 21:06:22 -08:00
Gregory P. Smith
4842efcf97 Fix FreeBSD, NetBSD and OpenBSD behavior of the issue #8052 fix. 2012-01-21 21:01:24 -08:00
Gregory P. Smith
d45382db0b bugfix for *BSD platforms. (oops messed up #define) 2012-01-21 15:20:37 -08:00
Gregory P. Smith
61f0da8c02 bugfix for issue 8052 fixes on *BSD platforms. 2012-01-21 15:20:08 -08:00
Gregory P. Smith
e9b7cab1da Another issue #8052 bugfix (related to previous commit).
"oops" while rearranging the #defines.
2012-01-21 15:19:11 -08:00
Gregory P. Smith
e3f7848bc5 Bugfix for issue #8052 fix on *BSD variants.
Many lack readdir64, use readdir.  Only use readdir64 on solaris where
it is required to work around a solaris bug.
2012-01-21 15:16:17 -08:00
Gregory P. Smith
d635af5a61 Fixes issue #8052: The posix subprocess module's close_fds behavior was
suboptimal by closing all possible file descriptors rather than just
the open ones in the child process before exec().

It now closes only the open fds when it is possible to safely determine what
those are.
2012-01-21 14:39:29 -08:00
Gregory P. Smith
8facece99a Fixes issue #8052: The posix subprocess module's close_fds behavior was
suboptimal by closing all possible file descriptors rather than just
the open ones in the child process before exec().

It now closes only the open fds when it is possible to safely determine what
those are.
2012-01-21 14:01:08 -08:00
Gregory P. Smith
e961bd4934 Avoid the compiler warning about the unused return value. 2012-01-21 12:51:30 -08:00
Gregory P. Smith
12fdca59bb Avoid the compiler warning about the unused return value. 2012-01-21 12:31:25 -08:00
Antoine Pitrou
bb5b92d324 Merge refleak fixes from 3.2 2012-01-18 16:19:19 +01:00
Antoine Pitrou
fc1b6f0078 Fix the _io module leaking references when a sub-interpreter is created. 2012-01-18 16:13:56 +01:00
Ezio Melotti
e81ac8b56b #13665: merge with 3.2. 2012-01-18 05:43:21 +02:00
Ezio Melotti
acd5f7bceb #13665: s/string/bytes/ in error message. 2012-01-18 05:42:39 +02:00
Antoine Pitrou
e39ebe45c4 Merge 2012-01-18 02:05:38 +01:00
Victor Stinner
855889b4bf Issue #10278: fix a typo in the doc 2012-01-18 01:57:19 +01:00
Victor Stinner
b94b266cfc Close #10278: Add time.wallclock() function, monotonic clock. 2012-01-18 01:50:21 +01:00
Antoine Pitrou
2c085604b7 Fix error handling in timemodule.c 2012-01-18 01:41:44 +01:00
Antoine Pitrou
7422b22e5e Test running of code in a sub-interpreter
(prelude to issue #6531).
2012-01-18 00:22:06 +01:00
Antoine Pitrou
2f828f2c88 Test running of code in a sub-interpreter
(prelude to issue #6531).
2012-01-18 00:21:11 +01:00
Ronald Oussoren
2a7fe03528 Add missing sentinel to PyCursesWindow_getsets
The PyCursesWindow_getsets array was introduced without sentinel in c3581ca21a57.
2012-01-17 16:53:20 +01:00
Gregory P. Smith
5831bd2f3b Remove an unnecessary extra copy of the bytes hash function.
This copy also had a bug in it, it fails to incorporate the length
into the hash by using it as the loop variable so it'll always be -1
by the time it is XORed in.

As such: I'm doing this only in Python 3.3 and not backporting as it
would change the existing hash behavior of datetime objects.
2012-01-14 14:31:13 -08:00
Martin v. Löwis
50590f111b Use GetModuleHandleW to avoid *A functions where possible. 2012-01-14 17:54:09 +01:00
Charles-François Natali
d612de10e5 Issue #12760: Refer to the new 'x' open mode as "exclusive creation" mode. 2012-01-14 11:51:00 +01:00
Charles-François Natali
366999a011 Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
2012-01-02 15:47:29 +01:00
Ross Lagerwall
667d75d059 Don't redefine _GNU_SOURCE if it's already defined. 2011-12-22 09:45:53 +02:00
Ross Lagerwall
031bf95d32 Issue #11006: Don't issue low level warning in subprocess when pipe2() fails. 2011-12-22 09:07:30 +02:00
Victor Stinner
bd206e27a4 Handle correctly _Py_fopen() error: don't replace the exception 2011-12-18 21:04:17 +01:00
Victor Stinner
e83f899364 Issue #13530: Document os.lseek() result
Patch written by Jérémy Anger.
2011-12-17 23:15:09 +01:00
Victor Stinner
136ea49b39 Issue #10951: Fix a compiler warning in timemodule.c 2011-12-17 22:37:18 +01:00
Amaury Forgeot d'Arc
7e447c8224 Fix compilation warning on Windows 2011-12-17 10:23:14 +01:00
Antoine Pitrou
5136ac0ca2 Issue #13645: pyc files now contain the size of the corresponding source
code, to avoid timestamp collisions (especially on filesystems with a low
timestamp resolution) when checking for freshness of the bytecode.
2012-01-13 18:52:16 +01:00
Nick Coghlan
1f7ce62bd6 Implement PEP 380 - 'yield from' (closes #11682) 2012-01-13 21:43:40 +10:00
Victor Stinner
1134b0dbbd Fix _PyFaulthandler_Fini() so it can be called before _PyFaulthandler_Init() 2012-01-10 22:44:11 +01:00
Charles-François Natali
76961faaa0 Issue #13757: Change os.fdlistdir() so that it duplicates the passed file
descriptor (instead of closing it).
2012-01-10 20:25:09 +01:00
Charles-François Natali
dc3044c704 Issue #12760: Add a create mode to open(). Patch by David Townshend. 2012-01-09 22:40:02 +01:00
Charles-François Natali
f2840a8890 Backed out changeset 36f2e236c601: For some reason, rewinddir() doesn't work as
it should on OpenIndiana.
2012-01-08 20:30:47 +01:00
Charles-François Natali
38f425e475 Issue #13739: It's simpler and more direct to call rewinddir() at the
beginning.
2012-01-08 19:07:18 +01:00
Charles-François Natali
7546ad327d Issue #13739: In os.listdir(), rewind the directory stream (so that listdir()
can be called again on the same open file).
2012-01-08 18:34:06 +01:00
Charles-François Natali
42663334cd Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
2012-01-02 15:57:30 +01:00
Benjamin Peterson
83251c1ecd try to always use the old API 2011-12-27 16:01:21 -06:00
Benjamin Peterson
95c16629d3 fix for old kernels which don't have epoll_create1 2011-12-27 15:36:32 -06:00
Benjamin Peterson
2fb9ae9dfc add a flags parameter to select.epoll 2011-12-27 15:15:41 -06:00
Charles-François Natali
8b759655d0 Issue #8623: Fix some strict-aliasing warnings. Patch by David Watson. 2011-12-23 16:44:51 +01:00
Antoine Pitrou
0e576f1f50 Issue #13626: Add support for SSL Diffie-Hellman key exchange, through the
SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option.
2011-12-22 10:03:38 +01:00
Ross Lagerwall
0b77ac32b2 Merge with 3.2 for #11006. 2011-12-22 09:10:47 +02:00
Antoine Pitrou
501da61671 Fix ssl module compilation if ECDH support was disabled in the OpenSSL build.
(followup to issue #13627)
2011-12-21 09:27:41 +01:00