Commit Graph

5201 Commits

Author SHA1 Message Date
Charles-François Natali ac7e9e058d Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
greater than FD_SETSIZE.
2011-08-28 18:10:27 +02:00
Charles-François Natali aa26b27503 Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
greater than FD_SETSIZE.
2011-08-28 17:51:43 +02:00
Nadeem Vawda 44c6ef50af Merge: #12839: Fix crash in zlib module due to version mismatch.
If the version of zlib used to compile the zlib module is incompatible
with the one that is actually linked in, then calls into zlib will fail.
This can leave attributes of the z_stream uninitialized, so we must take
care to avoid segfaulting by trying to use an invalid pointer.

Fix by Richard M. Tew.
2011-08-28 11:29:35 +02:00
Nadeem Vawda 524148ad7a Issue #12839: Fix crash in zlib module due to version mismatch.
If the version of zlib used to compile the zlib module is incompatible
with the one that is actually linked in, then calls into zlib will fail.
This can leave attributes of the z_stream uninitialized, so we must take
care to avoid segfaulting by trying to use an invalid pointer.

Fix by Richard M. Tew.
2011-08-28 11:26:46 +02:00
Nick Coghlan 2093730454 Fix #9923: mailcap now uses the OS path separator for the MAILCAP envvar. Not backported, since it could break cases where people worked around the old POSIX-specific behaviour on non-POSIX platforms. 2011-08-28 00:17:31 +10:00
Nick Coghlan 513886aabb Fix #12835: prevent use of the unencrypted sendmsg/recvmsg APIs on SSL wrapped sockets (Patch by David Watson) 2011-08-28 00:00:27 +10:00
Georg Brandl b0993bc78d Bump to 3.2.2. 2011-09-03 11:17:55 +02:00
Éric Araujo d5a9811dbe Make bdist_* commands respect --skip-build passed to bdist (#10946) 2011-08-29 21:48:39 +02:00
Antoine Pitrou 4fd1e6a3ba Issue #12803: SSLContext.load_cert_chain() now accepts a password argument
to be used if the private key is encrypted.  Patch by Adam Simpkins.
2011-08-25 14:39:44 +02:00
Charles-François Natali e78cbecaf1 Issue #12656: Add tests for IPv6 and Unix sockets to test_asyncore. 2011-08-24 23:24:05 +02:00
Antoine Pitrou 7a084105a0 Merge 2011-08-23 19:49:13 +02:00
Antoine Pitrou 162fee109b Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
Also added some tests.
2011-08-23 19:48:34 +02:00
Charles-François Natali 6cea35a8e3 Issue #12821: Fix test_fcntl failures on OpenBSD 5. 2011-08-23 19:46:46 +02:00
Antoine Pitrou bcb39d4846 Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
Also added some tests.
2011-08-23 19:46:22 +02:00
Sandro Tosi d902a14dd0 #12191: add shutil.chown() to change user and/or group owner of a given path also specifying their names. 2011-08-22 23:28:27 +02:00
Ezio Melotti 6f2a683a0c #9200: merge with 3.2. 2011-08-22 20:31:11 +03:00
Ezio Melotti 8c9375bb59 #10542: Add 4 macros to work with surrogates: Py_UNICODE_IS_SURROGATE, Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE, Py_UNICODE_JOIN_SURROGATES. 2011-08-22 20:03:25 +03:00
Ezio Melotti 93e7afc5d9 #9200: The str.is* methods now work with strings that contain non-BMP characters even in narrow Unicode builds. 2011-08-22 14:08:38 +03:00
Nick Coghlan 5c7f5c6c62 Credit patch authors in NEWS for #6560 2011-08-22 16:27:46 +10:00
Nick Coghlan c4a287114e Fix #12811 by closing files promptly in tabnanny.check. Patch by Anthony Briggs. 2011-08-22 16:19:19 +10:00
Nick Coghlan 029ba2b8cd Add unit tests for the mailcap module. Patch by Gregory Nofi (closes #6484) 2011-08-22 16:05:44 +10:00
Nick Coghlan 96fe56abec Add support for the send/recvmsg API to the socket module. Patch by David Watson and Heiko Wundram. (Closes #6560) 2011-08-22 11:55:57 +10:00
Victor Stinner ff3d9399fc Close #12326: sys.platform is now always 'linux' on Linux
On Linux, sys.platform doesn't contain the major version anymore. It is now
always 'linux', instead of 'linux2' or 'linux3' depending on the Linux version
used to build Python.
2011-08-20 23:39:26 +02:00
Antoine Pitrou e8bb1a0229 Issue #12213: Fix a buffering bug with interleaved reads and writes that
could appear on BufferedRandom streams.
2011-08-20 14:52:04 +02:00
Antoine Pitrou e05565ec5a Issue #12213: Fix a buffering bug with interleaved reads and writes that
could appear on BufferedRandom streams.
2011-08-20 14:39:23 +02:00
Antoine Pitrou 8fd544ffa9 Issue #12791: Break reference cycles early when a generator exits with an exception. 2011-08-20 14:18:25 +02:00
Antoine Pitrou a370fcf3b2 Issue #12791: Break reference cycles early when a generator exits with an exception. 2011-08-20 14:15:03 +02:00
Victor Stinner 0c17d0d96e Issue #12326: sys.platform is now always 'linux2' on Linux
Even if Python is compiled on Linux 3.
2011-08-20 14:01:05 +02:00
Benjamin Peterson 4058211e8d accept bytes for the AST 'string' type
This is a temporary kludge and all is well in 3.3.
2011-08-31 22:13:03 -04:00
Georg Brandl 89b7af1e53 Fix-up NEWS merge. 2011-09-03 09:08:49 +02:00
Amaury Forgeot d'Arc 4cfb42dd2d Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to
some functions like file.write().
2011-08-30 21:40:20 +02:00
Nadeem Vawda 97d67924e3 Issue #12839: Fix crash in zlib module due to version mismatch.
If the version of zlib used to compile the zlib module is incompatible
with the one that is actually linked in, then calls into zlib will fail.
This can leave attributes of the z_stream uninitialized, so we must take
care to avoid segfaulting by trying to use an invalid pointer.

Fix by Richard M. Tew.
2011-08-28 11:26:46 +02:00
Victor Stinner 4cf6604b82 Issue #12326: sys.platform is now always 'linux2' on Linux
Even if Python is compiled on Linux 3.
2011-08-20 14:01:05 +02:00
Antoine Pitrou df7fc9dda7 Issue #12778: Reduce memory consumption when JSON-encoding a large container of many small objects. 2011-08-19 18:03:14 +02:00
Charles-François Natali 558639f0c9 Issue #12650: Fix a race condition where a subprocess.Popen could leak
resources (FD/zombie) when killed at the wrong time.
2011-08-18 19:11:29 +02:00
Charles-François Natali 134a8baed9 Issue #12650: Fix a race condition where a subprocess.Popen could leak
resources (FD/zombie) when killed at the wrong time.
2011-08-18 18:49:39 +02:00
Benjamin Peterson c77239613b change word 2011-08-17 12:05:13 -05:00
Benjamin Peterson 01fc6cd056 make __doc__ mutable on heaptypes (closes #12773) 2011-08-17 12:03:47 -05:00
Benjamin Peterson c4085c8470 complain when a class variable shadows a name in __slots__ (closes #12766) 2011-08-16 18:53:26 -05:00
Ezio Melotti 269e3ee3db #12266: merge with 3.2. 2011-08-15 09:26:28 +03:00
Ezio Melotti ee8d998ecf #12266: Fix str.capitalize() to correctly uppercase/lowercase titlecased and cased non-letter characters. 2011-08-15 09:09:57 +03:00
Georg Brandl 666ed0b84d Post-release steps. 2011-08-13 20:19:09 +02:00
Antoine Pitrou 3c7e928098 Issue #12744: Fix inefficient representation of integers
between 2**31 and 2**63 on systems with a 64-bit C "long".
2011-08-13 20:15:19 +02:00
Nadeem Vawda 1c38546e49 Issue #12646: Add an 'eof' attribute to zlib.Decompress.
This will make it easier to detect truncated input streams.

Also, make zlib's error messages more consistent.
2011-08-13 15:22:40 +02:00
Georg Brandl d88e5af061 Merge with cpython. 2011-08-13 11:54:33 +02:00
Georg Brandl 74b6abf61f Merge with 3.2. 2011-08-13 11:48:40 +02:00
Georg Brandl 3abb372c81 Fix #11513: wrong exception handling for the case that GzipFile itself raises an IOError. 2011-08-13 11:48:12 +02:00
Georg Brandl b3f0ce4d1e Bump version to 3.2.2rc1. 2011-08-13 11:34:58 +02:00
Benjamin Peterson f8e7543df9 merge 3.2 (#12732) 2011-08-12 22:18:19 -05:00
Benjamin Peterson f413b80806 in narrow builds, make sure to test codepoints as identifier characters (closes #12732)
This fixes the use of Unicode identifiers outside the BMP in narrow builds.
2011-08-12 22:17:18 -05:00
Antoine Pitrou fdf4a27422 Issue #12687: Fix a possible buffering bug when unpickling text mode (protocol 0, mostly) pickles. 2011-08-11 21:15:53 +02:00
Antoine Pitrou f6c7a8595e Issue #12687: Fix a possible buffering bug when unpickling text mode (protocol 0, mostly) pickles. 2011-08-11 21:04:02 +02:00
Brian Curtin c29966f392 merge 2011-08-10 20:34:20 -05:00
Brian Curtin 0275fc191c News item for #12724 2011-08-10 20:32:10 -05:00
Senthil Kumaran 5b0a4d22c5 merge from 3.2 2011-08-11 09:25:45 +08:00
Senthil Kumaran 9dc4cad979 News item for Issue10087. 2011-08-11 09:24:37 +08:00
Benjamin Peterson e451ec393f merge heads 2011-08-09 16:16:33 -05:00
Benjamin Peterson 832bfe2ebd add a AST validator (closes #12575) 2011-08-09 16:15:04 -05:00
Raymond Hettinger fcb393c018 Add support for unary plus and unary minus to collections.Counter() 2011-08-09 13:00:40 -07:00
Ned Deily 2ef905d449 Issue #12540: Prevent zombie IDLE processes on Windows due to changes
in os.kill().  Original patch by Eli Bendersky.
2011-08-04 23:38:19 -07:00
Senthil Kumaran 8a984b58b7 merge from 3.2 - Fix closes issue12683 - urljoin to work with relative join of svn scheme. 2011-08-03 18:44:10 +08:00
Senthil Kumaran 2a157d2a3d Fix closes issue12683 - urljoin to work with relative join of svn scheme. 2011-08-03 18:37:22 +08:00
Ned Deily e5cad23a92 Issue #12540: Prevent zombie IDLE processes on Windows due to changes
in os.kill().  Original patch by Eli Bendersky.
2011-08-02 18:47:13 -07:00
Benjamin Peterson 28da7b8bea move news note to correct section 2011-08-02 17:45:00 -05:00
Benjamin Peterson 94b580d423 expose sched.h functions (closes #12655) 2011-08-02 17:30:04 -05:00
Benjamin Peterson 4e4d5d2a73 NEWS note for bbeda42ea6a8 2011-08-02 17:29:30 -05:00
Nadeem Vawda 3c01d16ed9 Issue #11651: Move options for running tests into a Python script.
This will be particularly useful to Windows users.

run_tests.py originally written by Brett Cannon.
2011-08-01 23:48:26 +02:00
Éric Araujo b85b966de6 Stop trying to write into the stdlib during packaging tests (#12331).
This prevents tests from failing when run from a Python installed in a
read-only directory.  The code is a bit uglier; shutil.copytree calls
copystat on directories behind our back, so I had to add an os.walk
with os.chmod (*and* os.path.join!) calls.  shutil, I am disappoint.

This changeset is dedicated to the hundreds of neurons that were lost
while I was debugging this on an otherwise fine afternoon.
2011-07-31 20:47:47 +02:00
Éric Araujo ad548b8534 Merge fixes for #9860, #11104/#8688 and #12331 from 3.2 2011-07-31 18:33:00 +02:00
Éric Araujo 548c054fb7 Stop trying to write into the stdlib during lib2to3 tests (#12331).
This prevents tests from failing when run from a Python installed in a
read-only directory.
2011-07-31 17:58:46 +02:00
Éric Araujo ab7c1b3f11 Fix regression with distutils MANIFEST handing (#11104, #8688).
The changed behavior of sdist in 3.1 broke packaging for projects that
wanted to use a manually-maintained MANIFEST file (instead of having a
MANIFEST.in template and letting distutils generate the MANIFEST).

The fixes that were committed for #8688 (76643c286b9f by Tarek and
d54da9248ed9 by me) did not fix all issues exposed in the bug report,
and also added one problem: the MANIFEST file format gained comments,
but the read_manifest method was not updated to handle (i.e. ignore)
them.  This changeset should fix everything; the tests have been
expanded and I successfully tested the 2.7 version with Mercurial, which
suffered from this regression.

I have grouped the versionchanged directives for these bugs in one place
and added micro version numbers to help users know the quirks of the
exact version they’re using.

Initial report, thorough diagnosis and patch by John Dennis, further
work on the patch by Stephen Thorne, and a few edits and additions by
me.
2011-07-31 04:06:12 +02:00
Senthil Kumaran 193cd2fb26 merge heads. 2011-07-30 10:57:28 +08:00
Senthil Kumaran 3d23fd6493 Fix closes Issue11281 - smtplib.STMP gets source_address parameter, which adds the ability to bind to specific source address on a machine with multiple interfaces. Patch by Paulo Scardine. 2011-07-30 10:56:50 +08:00
Benjamin Peterson 18d7d7a217 also make NotImplementedType callable 2011-07-29 18:27:44 -05:00
Benjamin Peterson d83be998fc merge heads 2011-07-29 18:20:35 -05:00
Benjamin Peterson c4607aeedd make the types of None and Ellipsis callable 2011-07-29 18:19:43 -05:00
Antoine Pitrou f83e4acbae Issue #12626: In regrtest, allow to filter tests using a glob filter
with the `-m` (or `--match`) option.  This works with all test cases
using the unittest module.  This is useful with long test suites
such as test_io or test_subprocess.
2011-07-29 23:57:10 +02:00
Antoine Pitrou b9c73e8cf0 Issue #12626: In regrtest, allow to filter tests using a glob filter
with the `-m` (or `--match`) option.  This works with all test cases
using the unittest module.  This is useful with long test suites
such as test_io or test_subprocess.
2011-07-29 23:53:38 +02:00
Benjamin Peterson ce071ca4e7 bytes should be verboten in sum() (fixes #12654) 2011-07-29 14:23:47 -05:00
Charles-François Natali e12c0b1767 Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow symlinks:
fix it. Patch by Petri Lehtinen.
2011-07-29 19:00:38 +02:00
Charles-François Natali def35435ee Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow symlinks:
fix it. Patch by Petri Lehtinen.
2011-07-29 18:59:24 +02:00
Éric Araujo c473f8ceac Merge fix for #8887 from 3.2 2011-07-29 17:38:23 +02:00
Éric Araujo e64e51bfa7 Make “pydoc somebuiltin.somemethod” work (#8887) 2011-07-29 17:03:55 +02:00
Éric Araujo 0bbacc621c Branch merge 2011-07-29 14:30:03 +02:00
Éric Araujo 158d7696f3 Branch merge 2011-07-29 14:24:08 +02:00
Raymond Hettinger abe9dc3f30 Issue 12514: Use try/finally to assure that timeit restores GC when done. 2011-07-29 00:08:19 -07:00
Raymond Hettinger 3a081f526d Issue 12514: Use try/finally to assure that timeit restores GC when done. 2011-07-29 00:02:04 -07:00
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
Éric Araujo aa95ccd02a Change one line I missed in 7527f3f9829 2011-07-29 03:28:40 +02:00
Éric Araujo cf534817ad Branch merge 2011-07-28 23:08:11 +02:00
Raymond Hettinger 66d2be8986 Issue 12647: Add __bool__() method to the None object. 2011-07-28 09:55:13 -07:00
Éric Araujo 0cdd4454f3 Remove indirection in threading (issue #10968).
The public names (Thread, Condition, etc.) used to be factory functions
returning instances of hidden classes (_Thread, _Condition, etc.),
because (if Guido recalls correctly) this code pre-dates the ability to
subclass extension types.

It is now possible to inherit from Thread and other classes, without
having to import the private underscored names like multiprocessing did.

A doc update will follow: a patch is under discussion on the issue.
2011-07-28 00:28:28 +02:00
Charles-François Natali 7a2f0c7802 Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime. 2011-07-27 19:42:05 +02:00
Charles-François Natali 27c4e88552 Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime. 2011-07-27 19:40:02 +02:00
Éric Araujo 9bce311ea4 Add shlex.quote function, to escape filenames and command lines (#9723).
This function used to live as pipes.quote, where it was undocumented but
used anyway.  (An alias still exists for backward compatibility.)  The
tests have been moved as is, but the code of the function was changed to
use a regex instead of a loop with string comparisons (at Ian Bicking’s
suggestion).  I’m terrible at regexes, so any feedback is welcome.
2011-07-27 18:29:31 +02: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
Ned Deily 12aa1aea67 Issue #12590: IDLE editor window now always displays the first line
when opening a long file.  With Tk 8.5, the first line was hidden.
2011-07-26 18:19:09 -07:00
Ned Deily f25e3d5278 Issue #12590: IDLE editor window now always displays the first line
when opening a long file.  With Tk 8.5, the first line was hidden.
2011-07-26 18:17:33 -07:00
Senthil Kumaran 7496fef8ff merge from 3.2 - Fix closes Issue12576 - fix urlopen behavior on sites which do not send (or obsfuscates) Connection: Close header. 2011-07-27 08:06:44 +08:00