Eli Bendersky
906b88fb2a
Issue #12380 : PyArg_ParseTuple now accepts a bytearray for the 'c' format.
...
As a side effect, this now allows the rjust, ljust and center methods of
bytes and bytearray to accept a bytearray argument.
Patch by Petri Lehtinen
2011-07-29 07:05:08 +03:00
Ross Lagerwall
114f0e499d
Issue #12607 : Merge with 3.2.
2011-07-27 07:39:27 +02:00
Ross Lagerwall
d98646e430
Issue #12607 : In subprocess, fix issue where if stdin, stdout or stderr is
...
given as a low fd, it gets overwritten.
2011-07-27 07:16:31 +02:00
Antoine Pitrou
d42c1d09e9
Issue #12591 : Allow io.TextIOWrapper to work with raw IO objects (without
...
a read1() method), and add a *write_through* parameter to
mandate unbuffered writes.
2011-07-23 21:50:21 +02:00
Antoine Pitrou
e96ec68101
Issue #12591 : Allow io.TextIOWrapper to work with raw IO objects (without
...
a read1() method), and add an undocumented *write_through* parameter to
mandate unbuffered writes.
2011-07-23 21:46:35 +02:00
Antoine Pitrou
d649480739
Issue #12551 : Provide a get_channel_binding() method on SSL sockets so as
...
to get channel binding data for the current SSL session (only the
"tls-unique" channel binding is implemented). This allows the
implementation of certain authentication mechanisms such as SCRAM-SHA-1-PLUS.
Patch by Jacek Konieczny.
2011-07-21 01:11:30 +02:00
Barry Warsaw
2ebada4233
- Issue #10309 : Define _GNU_SOURCE so that mremap() gets the proper
...
signature. Without this, architectures where sizeof void* != sizeof int are
broken. Patch given by Hallvard B Furuseth.
2011-07-19 19:23:56 -04:00
Barry Warsaw
d460a76e9e
- Issue #10309 : Define _GNU_SOURCE so that mremap() gets the proper
...
signature. Without this, architectures where sizeof void* != sizeof int are
broken. Patch given by Hallvard B Furuseth.
2011-07-19 18:28:30 -04:00
Antoine Pitrou
874d65afae
Issue #11321 : Fix a crash with multiple imports of the _pickle module when
...
embedding Python. Patch by Andreas Stührk.
2011-07-15 21:02:09 +02:00
Antoine Pitrou
8391cf4e1d
Issue #11321 : Fix a crash with multiple imports of the _pickle module when
...
embedding Python. Patch by Andreas Stührk.
2011-07-15 21:01:21 +02:00
Victor Stinner
a7878b77dc
Close #6755 : Add get_wch() method to curses.window class
...
Patch by Iñigo Serna.
2011-07-14 23:07:44 +02:00
Victor Stinner
a9a9dab042
Issue #12550 : Add chain optional argument to faulthandler.register()
...
Call the previous signal handler if chain is True.
2011-07-13 23:39:53 +02:00
Antoine Pitrou
90ce72dd06
Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a TextIOWrapper to a huge value, not TypeError.
2011-07-13 21:08:56 +02:00
Antoine Pitrou
cb4ae815b5
Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a TextIOWrapper to a huge value, not TypeError.
2011-07-13 21:07:49 +02:00
Antoine Pitrou
7128f95bd2
Issue #12440 : When testing whether some bits in SSLContext.options can be
...
reset, check the version of the OpenSSL headers Python was compiled against,
rather than the runtime version of the OpenSSL library.
2011-07-08 18:49:07 +02:00
Antoine Pitrou
b9ac25d1c3
Issue #12440 : When testing whether some bits in SSLContext.options can be
...
reset, check the version of the OpenSSL headers Python was compiled against,
rather than the runtime version of the OpenSSL library.
2011-07-08 18:47:06 +02:00
Victor Stinner
c655a726db
Issue #9611 , #9015 : FileIO.read() clamps the length to INT_MAX on Windows.
2011-07-05 11:31:49 +02:00
Victor Stinner
2cded9c3f3
Issue #12016 : Multibyte CJK decoders now resynchronize faster
...
They only ignore the first byte of an invalid byte sequence.
For example, b'\xff\n'.decode('gb2312', 'replace') gives '\ufffd\n' instead of
'\ufffd'.
2011-07-08 01:45:13 +02:00
Victor Stinner
081fe46ff9
Issue #9566 : cast unsigned int to Py_ssize_t in md5 and sha1 modules
...
Fix a compiler warning on Windows 64 bits.
2011-07-08 01:10:28 +02:00
Victor Stinner
7f53a5027d
Issue #12459 : time.sleep() now raises a ValueError if the sleep length is
...
negative, instead of an infinite sleep on Windows or raising an IOError on
Linux for example, to have the same behaviour on all platforms.
2011-07-05 22:00:25 +02:00
Victor Stinner
d9fc85db7f
(merge 3.2) Issue #9611 , #9015 : FileIO.read() clamps the length to INT_MAX on Windows.
2011-07-05 11:34:18 +02:00
Victor Stinner
99b9538636
Issue #9642 : Uniformize the tests on the availability of the mbcs codec
...
Add a new HAVE_MBCS define.
2011-07-04 14:23:54 +02:00
Victor Stinner
9122fdd8fa
Issue #9642 : Fix the definition of time.clock() on Windows
...
Don't unset and set againt the HAVE_CLOCK define, reorder the #if tests
instead. Fix also the definition of the timezone encoding.
2011-07-04 13:55:40 +02:00
Victor Stinner
48b1ce5519
Issue #12462 : time.sleep() now calls immediatly the (Python) signal handler if
...
it is interrupted by a signal, instead of having to wait until the next
instruction.
Patch reviewed by Antoine Pitrou.
2011-07-01 13:50:09 +02:00
Giampaolo Rodola'
210e7ca032
Issue #12442 : add shutil.disk_usage()
2011-07-01 13:55:36 +02:00
Victor Stinner
0aafa4f1e2
faulthandler: add missing include, pthread.h, for FreeBSD 6
2011-06-29 23:28:02 +02:00
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