Commit Graph

5923 Commits

Author SHA1 Message Date
Gregory P. Smith 3b1f2c35f4 issue #1746656: Fix for OS X. configure and #include changes so that the socket
module compiles again on OS X with its more annoying #include requirements.
2011-05-15 12:18:23 -07:00
Nadeem Vawda d74b5936a1 Fix _socket compilation failures on non-Linux buildbots (cf. issue #1746656). 2011-05-15 13:16:22 +02:00
Victor Stinner aedb2823fd (Merge 3.2) Issue #12060: Use sig_atomic_t type and volatile keyword in the
signal module. Patch written by Charles-François Natali.
2011-05-15 10:27:49 +02:00
Victor Stinner 5ebfe6d9a9 (Merge 3.1) Issue #12060: Use sig_atomic_t type and volatile keyword in the
signal module. Patch written by Charles-François Natali.
2011-05-15 10:27:09 +02:00
Victor Stinner 2ec6b176bd Issue #12060: Use sig_atomic_t type and volatile keyword in the signal module.
Patch written by Charles-François Natali.
2011-05-15 10:21:59 +02:00
Gregory P. Smith 5ed2e779f1 Issue #1746656: Add if_nameindex, if_nametoindex, if_indextoname
methods to the socket module.
2011-05-15 00:26:45 -07:00
Nadeem Vawda ccb33bf002 Merge: #8650: Make zlib.[de]compressobj().[de]compress() 64-bit clean.
Raise an OverflowError if the input data is too large, instead of silently
truncating the input and returning an incorrect result.
2011-05-15 00:23:40 +02:00
Nadeem Vawda 565d659dcd Merge: #8650: Make zlib.[de]compressobj().[de]compress() 64-bit clean.
Raise an OverflowError if the input data is too large, instead of silently
truncating the input and returning an incorrect result.
2011-05-15 00:20:52 +02:00
Nadeem Vawda 0c3d96ae1d Issue #8650: Make zlib.[de]compressobj().[de]compress() 64-bit clean.
Raise an OverflowError if the input data is too large, instead of silently
truncating the input and returning an incorrect result.
2011-05-15 00:19:50 +02:00
Nadeem Vawda 905cca011b Merge fix for memory leaks in zlib.compress() and .decompress().
Also, make sure that test_zlib tests decompress() for overly-large inputs.
2011-05-14 23:18:07 +02:00
Nadeem Vawda 154bdf92fc Fix memory leaks in zlib.compress() and .decompress().
Also, make sure that test_zlib tests decompress() for overly-large inputs.
2011-05-14 23:07:36 +02:00
Nadeem Vawda 1b8a417d9f Issue #8650: Backport 64-bit safety fixes for compress() and decompress(). 2011-05-14 22:26:55 +02:00
Nadeem Vawda 9c405c470b Merge: #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail
attribute when called without a max_length argument.
2011-05-14 14:19:56 +02:00
Nadeem Vawda 5eef502de0 Merge: #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail
attribute when called without a max_length argument.
2011-05-14 14:15:47 +02:00
Nadeem Vawda 7619e88adb Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail
attribute when called without a max_length argument.
2011-05-14 14:05:20 +02:00
Antoine Pitrou b89b31a158 Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence
on a file opened in read+write mode (namely: reading, seeking a bit forward,
writing, then seeking before the previous write but still within buffered
data, and writing again).
2011-05-13 00:25:53 +02:00
Antoine Pitrou 00dd182b8e Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence
on a file opened in read+write mode (namely: reading, seeking a bit forward,
writing, then seeking before the previous write but still within buffered
data, and writing again).
2011-05-13 00:16:28 +02:00
Antoine Pitrou 7c40489180 Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence
on a file opened in read+write mode (namely: reading, seeking a bit forward,
writing, then seeking before the previous write but still within buffered
data, and writing again).
2011-05-13 00:13:33 +02:00
Antoine Pitrou 4e19e11958 Fix compile error under Windows 2011-05-12 02:07:00 +02:00
Antoine Pitrou 3486a98dcd Issue #9971: Write an optimized implementation of BufferedReader.readinto().
Patch by John O'Connor.
2011-05-12 01:57:53 +02:00
Victor Stinner 410dd7d357 Issue #12058: Minor edits to comments in faulthandler
Patch written by Éric Araujo.
2011-05-11 20:56:08 +02:00
Kurt B. Kaiser 9dd41fa970 Merge from 3.2 2011-05-11 14:18:13 -04:00
Kurt B. Kaiser bc3e13818b Merge from 3.1 2011-05-11 13:48:54 -04:00
Kurt B. Kaiser e147806da9 Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError.
With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused IDLE to
exit.  Converted to valid Unicode null in PythonCmd().
2011-05-11 12:24:17 -04:00
Ezio Melotti f8d6fd605d #12051: merge with 3.2. 2011-05-11 01:23:41 +03:00
Ezio Melotti f188bc5d46 #12051: merge with 3.1. 2011-05-11 01:10:27 +03:00
Ezio Melotti 136726537f #12051: Fix segfault in json.dumps() while encoding highly-nested objects using the C accelerations. 2011-05-11 01:02:56 +03:00
Antoine Pitrou 3cade9942e Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in
order to accept exactly one connection.  Patch by Daniel Evers.
2011-05-10 19:19:13 +02:00
Antoine Pitrou 1be815aac4 Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in
order to accept exactly one connection.  Patch by Daniel Evers.
2011-05-10 19:16:29 +02:00
Victor Stinner 388196ed72 Issue #12011: signal.signal() and signal.siginterrupt() raise an OSError,
instead of a RuntimeError: OSError has an errno attribute.
2011-05-10 17:13:00 +02:00
Victor Stinner 00bc6ccb78 faulthandler: improve_sigabrt() on Visual Studio
Use _set_abort_behavior() + abort() instead of raise(SIGABRT) which may write
an error message and/or open a popup asking to report the fault.
2011-05-10 01:30:03 +02:00
Victor Stinner 17ca323e7c (Merge 3.1) Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional
OpenSSL is now compiled with OPENSSL_NO_SSL2 defined (without the SSLv2
protocol) on Debian: fix the ssl module on Debian Testing and Debian Sid.

Optimize also ssl.get_protocol_name(): speed does matter!
2011-05-10 00:48:41 +02:00
Victor Stinner ee18b6f2fd Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional
OpenSSL is now compiled with OPENSSL_NO_SSL2 defined (without the SSLv2
protocol) on Debian: fix the ssl module on Debian Testing and Debian Sid.

Optimize also ssl.get_protocol_name(): speed does matter!
2011-05-10 00:38:00 +02:00
Antoine Pitrou 2341f9ba00 Remove dead code from _multiprocessing 2011-05-09 20:55:03 +02:00
Antoine Pitrou 87cf220972 Issue #11743: Rewrite multiprocessing connection classes in pure Python. 2011-05-09 17:04:27 +02:00
Victor Stinner 86e104a6ab Issue #8407: Use an explicit cast for FreeBSD
pthread_t is a pointer, not an integer, on FreeBSD. It should fix the following
gcc warning:

passing argument 1 of ‘pthread_kill’ makes pointer from integer without a cast
2011-05-09 14:45:38 +02:00
Victor Stinner e0c9a7533c faulthandler: make quiet a gcc 4.6 warning (z was unused) 2011-05-09 14:44:26 +02:00
Victor Stinner 8f9f8d612a Issue #11888: Use system log2() when available
I expect the system libc to use more accurate functions than Python. The GNU
libc uses for example FYL2X and FYL2XP1 hardware instructions on Intel FPU.
2011-05-09 12:45:41 +02:00
Gerhard Haering 936d518dc8 #10811: Fix recursive usage of cursors. Instead of crashing, raise a ProgrammingError now. 2011-05-09 12:24:09 +02:00
Mark Dickinson 83b8c0be93 Grammatical fix for a comment for log2, to avoid referring to an *algorithm* as monotonic. 2011-05-09 08:40:20 +01:00
Mark Dickinson 23442584f4 Fix cut-and-paste typo in comment: log10 -> log2. 2011-05-09 08:05:00 +01:00
Victor Stinner fa0e3d52d6 Issue #11888: Add log2 function to math module. Patch written by Mark
Dickinson.
2011-05-09 01:01:09 +02:00
Victor Stinner 3de49192aa Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional
OpenSSL is now compiled with OPENSSL_NO_SSL2 defined (without the SSLv2
protocol) on Debian: fix the ssl module on Debian Testing and Debian Sid.

Optimize also ssl.get_protocol_name(): speed does matter!
2011-05-09 00:42:58 +02:00
Victor Stinner d49b1f14de Issue #8407: The signal handler writes the signal number as a single byte
instead of a nul byte into the wakeup file descriptor. So it is possible to
wait more than one signal and know which signals were raised.
2011-05-08 02:03:15 +02:00
Victor Stinner b3e7219abf Issue #8407: Add pthread_kill(), sigpending() and sigwait() functions to the
signal module.
2011-05-08 01:46:11 +02:00
Ezio Melotti 9c18778695 #12017: merge with 3.2. 2011-05-07 18:29:14 +03:00
Ezio Melotti 06383ee090 #12017: merge with 3.1. 2011-05-07 18:15:34 +03:00
Ezio Melotti 362b95102f #12017: Fix segfault in json.loads() while decoding highly-nested objects using the C accelerations. 2011-05-07 17:58:09 +03:00
Victor Stinner 7bba62fd68 faulthandler: dump all threads by default
* Set the default value of all_threads arguments to True
 * Py_FatalError() dumps all threads, instead of only the current thread

Dump only the current thread is not reliable. In some cases, Python is unable
to retrieve the state of the current thread and so is unable to dump the
traceback. faulthandler keeps a reference to the interpreter and so is always
able to dump the traceback of all threads.
2011-05-07 12:43:00 +02:00
Victor Stinner c925617b54 faulthandler: save/restore errno in the two signal handlers 2011-05-07 12:20:11 +02:00