Commit Graph

5339 Commits

Author SHA1 Message Date
Meador Inge ad349a190e Issue #12881: ctypes: Fix segfault with large structure field names. 2011-10-03 21:34:04 -05:00
Charles-François Natali 564f89036f Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
Jarosch.
2011-09-29 19:43:01 +02:00
Meador Inge fe15003680 Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype.
Thanks to Suman Saha for finding the bug and providing a patch.
2011-09-27 20:35:28 -05:00
Mark Dickinson a96b0d119d Backport issue #12973 itertools fix from 3.x. 2011-09-24 09:01:16 +01:00
Victor Stinner 63c22fac72 Issue #7732: Fix a crash on importing a module if a directory has the same name
than a Python module (e.g. "__init__.py"): don't close the file twice.

PyFile_FromFile() does also close the file if PyString_FromString() failed. It
did already close the file on fill_file_fields() error (e.g. if the file is a
directory).
2011-09-23 19:37:03 +02:00
Victor Stinner 51b719814e Issue #12931: xmlrpclib now encodes Unicode URI to ISO-8859-1, instead of
failing with a UnicodeDecodeError.
2011-09-23 01:15:32 +02:00
Jesus Cea c23484b21f Close #13022: _multiprocessing.recvfd() doesn't check that file descriptor was actually received 2011-09-21 03:47:39 +02:00
Mark Dickinson 4ac5d2cda4 Backport issue #12973 list_repeat fix from 3.x. 2011-09-19 19:23:55 +01:00
Mark Dickinson dbbed04941 Issue #12973: Fix int.__pow__ overflow checks that invoked undefined behaviour, thereby producing incorrect results on Clang. 2011-09-19 16:38:08 +01:00
Jesus Cea d256ca12c1 Close #13007: whichdb should recognize gdbm 1.9 magic numbers 2011-09-19 16:57:18 +02:00
Amaury Forgeot d'Arc 439c25eb9e Issue #12483: ctypes: Fix a crash when the destruction of a callback
object triggers the garbage collector.
2011-09-12 20:12:09 +02:00
Éric Araujo dcdc3ef5fa Branch merge 2011-09-12 17:47:48 +02:00
Éric Araujo a13cd39533 Fix determination of Metadata version (#8933). Patch by Filip Gruszczyński. 2011-09-10 05:39:45 +02:00
Jesus Cea 6ebaca137f NEWS 2011-09-10 04:35:18 +02:00
Éric Araujo ab08da0a1c Branch merge 2011-09-05 17:45:48 +02:00
Lars Gustäbel 8babfdfd45 Issue #12841: Fix tarfile extraction of non-existent uids/gids.
tarfile unnecessarily checked the existence of numerical user and group ids on
extraction. If one of them did not exist the respective id of the current user
(i.e. root) was used for the file and ownership information was lost. (Patch
by Sebastien Luttringer)
2011-09-05 17:04:18 +02:00
Éric Araujo 0f2dbf3645 Warn instead of crashing because of invalid path in MANIFEST.in (#8286).
sdist used to crash with a full traceback dump instead of printing a
nice warning with the faulty line number.
2011-09-03 00:47:07 +02:00
Amaury Forgeot d'Arc cf316a171e Issue #12764: Fix a crash in ctypes when the name of a Structure field is not
a string.
2011-09-02 20:32:23 +02:00
Amaury Forgeot d'Arc 3d7f236329 Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to
some functions like file.write().
2011-08-30 21:04:35 +02:00
Éric Araujo 429b890561 Make bdist_* commands respect --skip-build passed to bdist (#10946) 2011-08-30 01:48:59 +02:00
Charles-François Natali fda7b379ac Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
greater than FD_SETSIZE.
2011-08-28 16:22:33 +02:00
Nadeem Vawda bbabbae114 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:23:57 +02:00
Charles-François Natali 2a34eb3104 Issue #12786: Set communication pipes used by subprocess.Popen CLOEXEC to avoid
them being inherited by other subprocesses.
2011-08-25 21:20:54 +02:00
Antoine Pitrou 77657e40fa Issue #4106: Fix occasional exceptions printed out by multiprocessing on interpreter shutdown.
This bug doesn't seem to exist on 3.2, where daemon threads are killed
before Py_Finalize() is entered.
2011-08-24 22:41:05 +02:00
Antoine Pitrou a1a8da8bf5 Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
Also added some tests.
2011-08-23 19:54:20 +02:00
Charles-François Natali cdaafe0f9e Issue #12821: Fix test_fcntl failures on OpenBSD 5. 2011-08-23 19:42:02 +02:00
Antoine Pitrou 808cec536a Issue #12213: Fix a buffering bug with interleaved reads and writes that
could appear on io.BufferedRandom streams.
2011-08-20 15:40:58 +02:00
Victor Stinner acacbaa788 Issue #12326: sys.platform is now always 'linux2' on Linux
Even if Python is compiled on Linux 3.
2011-08-20 14:02:38 +02:00
Éric Araujo e7329f47e7 Guard shutil._make_archive against a logger=None argument.
Backporting two lines from the 3.x tests was enough to trigger the bug.
I also took the opportunity of making the logging call lazy.
2011-08-19 03:07:39 +02:00
Charles-François Natali b02302c5cf Issue #12650: Fix a race condition where a subprocess.Popen could leak
resources (FD/zombie) when killed at the wrong time.
2011-08-18 17:18:28 +02:00
Barry Warsaw 39935f4ab8 NEWS entry. 2011-08-15 19:50:35 -04:00
Ezio Melotti 15d6b65ead #12266: Fix str.capitalize() to correctly uppercase/lowercase titlecased and cased non-letter characters. 2011-08-15 09:22:24 +03:00
Senthil Kumaran f432aeca7c Fix closes issue12683 - urljoin to work with relative join of svn scheme. 2011-08-03 18:31:59 +08:00
Éric Araujo 33af263d36 Fix incorrect mtime comparison in distutils (#11933).
This is a regression introduced in 9211a5d7d0b4, when uses of ST_MTIME
constants were changed to uses of st_mtime attributes.  As diagnosed in
the bug report, this change is not merely stylistic: st_mtime is a
float but ST_MTIME’s resolution is rounded to the seconds, so there was
a mismatch between the values seen by file_util and dep_util which
caused an sdist to be unnecessarily created a second time on an ext4
filesystem.

This patch has been tested by John S. Gruber, who reported the bug.
As this is a simple code revert, I think it’s okay to commit without a
unit test.
2011-08-02 03:16:12 +02:00
Éric Araujo 498da2c162 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:59:28 +02:00
Éric Araujo 560bf855d3 Fix regression with distutils MANIFEST handing (#11104, #8688).
The changed behavior of sdist in 2.7 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 (d29399100973 by Tarek and
f7639dcdffc3 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 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.  I also removed a stanza in the docs that
was forgotten in Tarek’s first changeset.

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 02:04:00 +02:00
Éric Araujo 9a528306b9 Make “pydoc somebuiltin.somemethod” work (#8887) 2011-07-29 17:34:35 +02:00
Raymond Hettinger 55e5e27b74 Issue 12514: Use try/finally to assure that timeit restores GC when done. 2011-07-28 23:56:38 -07:00
Jason R. Coombs fee7745ebb Fixes #10639: reindent.py should not convert newlines
Backport of changeset 070dc6e359fb, reindent.py now will use the newline detected in the original file and will report an error if mixed newlines are encountered.
2011-07-27 14:05:37 -04:00
Charles-François Natali 0cf7e25c28 - Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime. 2011-07-27 19:36:40 +02:00
Ross Lagerwall d8e3901478 Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
given as a low fd, it gets overwritten.
2011-07-27 18:54:53 +02:00
Ned Deily d8b1723965 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:16:08 -07:00
Ross Lagerwall 528c4adc0b Issue #12102: Document that buffered files must be flushed before being used
with mmap. Patch by Steffen Daode Nurpmeso.
2011-07-25 07:23:58 +02:00
Charles-François Natali 3de8c73d90 Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling. 2011-07-24 22:33:35 +02:00
Antoine Pitrou 4cfae027b3 Issue #1813: Fix codec lookup and setting/getting locales under Turkish locales. 2011-07-24 02:51:01 +02:00
Nadeem Vawda 0d2889f56c Fix typo in NEWS entry for dbf1e1a27427. 2011-07-23 16:13:01 +02:00
Nadeem Vawda b42c53e442 Issue #10883: Fix socket leaks in urllib.request.
* ftpwrapper now uses reference counting to ensure that the underlying socket
  is closed when the ftpwrapper object is no longer in use
* ftplib.FTP.ntransfercmd() now closes the socket if an error occurs

Initial patch by Victor Stinner.
2011-07-23 15:51:16 +02:00
Charles-François Natali 97781b0b64 Issue #12592: Make Python build on OpenBSD 5 (and future major releases). 2011-07-22 23:43:42 +02:00
Benjamin Peterson 6c18ff0808 news note 2011-07-22 10:41:44 -05:00
Charles-François Natali 4929eb911b Issue #12372: POSIX semaphores are broken on AIX: don't use them. 2011-07-21 19:41:04 +02:00