Commit graph

6050 commits

Author SHA1 Message Date
Benjamin Peterson
dd6098b8a1 merge 3.2 2011-06-27 09:16:40 -05:00
Senthil Kumaran
7d80bd1909 Fix closes issue 11568 - update select.epoll.register docstring with mention of correct behavior. 2011-06-26 23:48:23 -07:00
Ross Lagerwall
bc808224b6 Issue #12303: Add sigwaitinfo() and sigtimedwait() to the signal module. 2011-06-25 12:13:40 +02:00
Ross Lagerwall
1db37f3248 Merge with 3.2 (Issue #12404). 2011-06-25 10:11:44 +02:00
Ross Lagerwall
dbfb9b89db Issue 12404: Remove C89 incompatible code from mmap module.
Patch by Akira Kitada.
2011-06-25 10:02:37 +02:00
Victor Stinner
7edb5dfcbc Issue #6697: _lsprof: normalizeUserObj() doesn't encode/decode (UTF-8) the
module name anymore, only work on unicode strings. Therefore it doesn't
truncate module names with embedded NUL characters, or fail if the module name
contains surrogate characters (UTF-8 encoder fails on a surrogate character).

Patch written by Alexander Belopolsky.
2011-06-20 14:59:53 +02:00
Victor Stinner
99563b1df8 calculate_path() decodes the PYTHONPATH environment variable from the locale
encoding using _Py_char2wchar() instead of mbstowcs() to store undecodable
bytes as surrogates characters (PEP 383) instead of ignoring silently
the PYTHONPATH variable.
2011-06-20 14:45:54 +02:00
Victor Stinner
6ee7a57b38 (Merge 3.2) posixmodule.c: fix function name in argument parsing
Fix os.fchown() and os.open()

Remove also trailing spaces and replace tabs by spaces.
2011-06-17 15:18:16 +02:00
Victor Stinner
26de69dff8 posixmodule.c: fix function name in argument parsing
Fix os.fchown() and os.open()

Remove also trailing spaces and replace tabs by spaces.
2011-06-17 15:15:38 +02:00
Brian Curtin
4ff1a414f8 Merge 3.2 - update to the fix for #12084 2011-06-14 10:06:41 -05:00
Brian Curtin
c8be84077b Correct completely broken os.stat behavior on Windows XP.
After 1a3e8db28d49, Windows XP could not os.stat at all due to raising
immediately when GetFinalPathNameByHandle wasn't available (pre-Vista).
The proper behavior in that situation is to just not attempt a traversal
rather than outright rejecting.

This change additionally handles a failed malloc by setting the error code
and returning false.

Patch by Hirokazu Yamamoto.
2011-06-14 09:52:50 -05:00
Brian Curtin
a87d586fd6 branch merge? 2011-06-13 16:10:32 -05:00
Brian Curtin
c9d6a501db branch merge 2011-06-13 16:03:01 -05:00
Brian Curtin
3e86c99f90 Merge from 3.2 for Issue #12084. 2011-06-13 16:00:35 -05:00
Brian Curtin
d25aef55c8 Fix #12084. os.stat on Windows wasn't working properly with relative symlinks.
Use of DeviceIoControl to obtain the symlink path via the reparse tag was
removed. The code now uses GetFinalPathNameByHandle in the case of a
symbolic link and works properly given the added test which creates a symbolic
link and calls os.stat on it from multiple locations.

Victor Stinner also noticed an issue with os.lstat following the os.stat
code path when being passed bytes. The posix_lstat function was adjusted to
properly hook up win32_lstat instead of the previous STAT macro (win32_stat).
2011-06-13 15:16:04 -05:00
Charles-François Natali
a529308348 Issue #12287: In ossaudiodev, check that the device isn't closed in several
methods.
2011-06-11 18:58:24 +02:00
Ross Lagerwall
b0ae53d8a0 Issue #9344: Add os.getgrouplist(). 2011-06-10 07:30:30 +02:00
Victor Stinner
10c30d6764 Issue #8407: signal.sigwait() releases the GIL
Initial patch by Charles-François Natali.
2011-06-10 01:39:53 +02:00
Brian Curtin
d9463b233c Merge 3.2 2011-06-09 09:46:21 -05:00
Brian Curtin
95d028fd18 Correction to 88e318166eaf - Issue #11583
Rather than wrapping the C _isdir function in a Python function,
just import the C _isdir function directly. Additionally, add in the
docstring which was left out.
2011-06-09 09:10:38 -05:00
Brian Curtin
9a82eaade3 Fix #11583. Changed os.path.isdir to use GetFileAttributes instead of os.stat.
By changing to the Windows GetFileAttributes API in nt._isdir we can figure
out if the path is a directory without opening the file via os.stat. This has
the minor benefit of speeding up os.path.isdir by at least 2x for regular
files and 10-15x improvements were seen on symbolic links (which opened the
file multiple times during os.stat). Since os.path.isdir is used in
several places on interpreter startup, we get a minor speedup in startup time.
2011-06-08 18:43:57 -05:00
Brian Curtin
9c669ccc77 Fix #11583. Changed os.path.isdir to use GetFileAttributes instead of os.stat.
By changing to the Windows GetFileAttributes API in nt._isdir we can figure
out if the path is a directory without opening the file via os.stat. This has
the minor benefit of speeding up os.path.isdir by at least 2x for regular
files and 10-15x improvements were seen on symbolic links (which opened the
file multiple times during os.stat). Since os.path.isdir is used in
several places on interpreter startup, we get a minor speedup in startup time.
2011-06-08 18:17:18 -05:00
Charles-François Natali
4dd453c6aa Issue #12021: Make mmap's read() method argument optional. Patch by Petri
Lehtinen.
2011-06-08 19:18:14 +02:00
Antoine Pitrou
dd69649660 Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed
children and raises BrokenProcessPool in such a situation.  Previously it
would reliably freeze/deadlock.
2011-06-08 17:21:55 +02:00
Brett Cannon
4a5e5de03f Revert a reversed comparison order introduced in r70695. 2011-06-07 20:09:32 -07:00
Brett Cannon
eb175c473d Remove a redundant assignment.
Found by LLVM/clang 2.9.
2011-06-06 20:24:11 -07:00
Brett Cannon
5fac8af22c Checking if an unsigned long is < 0 is pointless.
Found by LLVM/clang 2.9.
2011-06-06 20:22:56 -07:00
Brett Cannon
a0b1ff5844 Remove some extraneous parentheses and swap the comparison order to
prevent accidental assignment.

Silences a warning from LLVM/clang 2.9.
2011-06-06 20:20:36 -07:00
Charles-François Natali
368f34bb4b Issue #12196: Make os.pipe2() flags argument mandatory. 2011-06-06 19:49:47 +02:00
Benjamin Peterson
f0cdbad1b3 always clear parser error 2011-06-05 22:14:05 -05:00
Gregory P. Smith
d64b2bae9b merge heads. 2011-06-04 23:05:19 -07:00
Benjamin Peterson
f719957d7a only clear the parser error if it's set (closes #12264) 2011-06-04 22:06:42 -05:00
Victor Stinner
2bc6c2ec2f (Merge 3.2) Issue #12016: Reindent decoders of HK and JP codecs 2011-06-03 23:34:32 +02:00
Victor Stinner
5dfe3bb2d9 Issue #12016: Reindent decoders of HK and JP codecs 2011-06-03 23:34:09 +02:00
Éric Araujo
5397c797f4 Merge 3.2 2011-06-01 19:47:24 +02:00
Éric Araujo
affcf2967f Branch merge 2011-06-01 19:39:27 +02:00
Benjamin Peterson
fdb2d909a4 merge 3.1 2011-05-31 21:38:49 -05:00
Benjamin Peterson
52e61449e3 return NULL on error 2011-05-31 21:38:15 -05:00
Benjamin Peterson
f17101a307 merge 3.2 2011-05-31 21:31:59 -05:00
Benjamin Peterson
5c2b09e856 be extra careful with a borrowed reference when the GIL could be released (closes #8578) 2011-05-31 21:31:37 -05:00
Benjamin Peterson
8c6f88efa2 remove __version__s dependent on subversion keyword expansion (closes #12221) 2011-05-31 20:52:17 -05:00
Benjamin Peterson
9e3e1c6e4e merge 3.2 (#12221) 2011-05-31 19:07:45 -05:00
Benjamin Peterson
0aa71f7982 merge 3.1 (#12221) 2011-05-31 19:06:17 -05:00
Benjamin Peterson
a22c98de85 simply use the Python version for pyexpat.__version__ #12221 2011-05-31 18:59:49 -05:00
Victor Stinner
bc93a116eb Close #12229: Remove an unused argument of _bufferedreader_peek_unlocked(),
io.BufferedReader._peek_unlocked(). Patch written by John O'Connor.
2011-06-01 00:01:24 +02:00
Éric Araujo
9bcf8bfb24 Fix error message to use the Python name instead of the C name 2011-05-31 14:08:26 +02:00
Victor Stinner
e15dce3d18 Close #12171: IncrementalEncoder.reset() of CJK codecs (multibytecodec) calls
encreset() instead of decreset().
2011-05-30 22:56:00 +02:00
Charles-François Natali
daafdd5bea Issue #12196: Add pipe2() to the os module. 2011-05-29 20:07:40 +02:00
Victor Stinner
5572ba7e15 _posixsubprocess.c: don't redefine _GNU_SOURCE if it's already defined 2011-05-26 14:10:08 +02:00
Victor Stinner
77af172914 socket.sendto(): exit directly after setting the error
Dummy change to avoid a false positive with the Clang Static Analyzer.
2011-05-26 14:05:59 +02:00