Commit Graph

4818 Commits

Author SHA1 Message Date
Ross Lagerwall 031bf95d32 Issue #11006: Don't issue low level warning in subprocess when pipe2() fails. 2011-12-22 09:07:30 +02:00
Michael Foord 3ba95f8bd9 Metaclasses with metaclasses with a __dict__ descriptor can no longer trigger code execution with inspect.getattr_static.
Closes issue 11829.
2011-12-22 01:13:37 +00:00
Antoine Pitrou 86a8a9ae98 Issue #1785: Fix inspect and pydoc with misbehaving descriptors.
Also fixes issue #13581: `help(type)` wouldn't display anything.
2011-12-21 09:57:40 +01:00
Victor Stinner d208416a40 Issue #13628: python-gdb.py is now able to retrieve more frames in the Python
traceback if Python is optimized.

 * delay the lookup of the size_t type, it is not available at startup
 * The second argument of the PyFrameObjectPtr constructor is optional, as
   done in other constructors
 * iter_builtins() and iter_globals() methods of PyFrameObjectPtr returns
   an empty tuple instead of None if Python is optimized
 * Fix py-bt and py-bt-full to handle correctly "optimized" frames
 * Frame.get_pyop() tries to get the frame pointer from PyEval_EvalCodeEx()
   if the pointer is optimized out in PyEval_EvalFrameEx()
2011-12-19 13:42:24 +01:00
Michael Foord a51623b160 Fix inspect.getattr_static to work on modules (again).
Closes issue 11813.
2011-12-18 22:01:40 +00:00
Antoine Pitrou a74252633f Merge 2011-12-18 19:28:33 +01:00
Antoine Pitrou 2bc801c4ea Issue #7502: Fix equality comparison for DocTestCase instances.
Patch by Cédric Krier.
2011-12-18 19:27:45 +01:00
Charles-François Natali 6d5f9e73d9 Issue #11870: threading: Properly reinitialize threads internal locks and
condition variables to avoid deadlocks in child processes.
2011-12-18 18:35:09 +01:00
Charles-François Natali cf53ae2171 Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
2011-12-18 16:05:07 +01:00
Antoine Pitrou c345ce1a69 Issue #10350: Read and save errno before calling a function which might overwrite it.
Original patch by Hallvard B Furuseth.
2011-12-16 12:28:32 +01:00
Antoine Pitrou 2e872082f6 Fix the fix for issue #12149: it was incorrect, although it had the side
effect of appearing to resolve the issue.  Thanks to Mark Shannon for
noticing.
2011-12-15 14:15:31 +01:00
Meador Inge b7288a74f2 Issue #13591: Moving the NEWS line to the right release. 2011-12-14 22:37:48 -06:00
Meador Inge 416f12ddb3 Issue #13591: import_module potentially imports a module twice. 2011-12-14 22:23:46 -06:00
Ned Deily 061c0289af Issue #4625: add NEWS entry. 2011-12-14 15:06:50 -08:00
Alexandre Vassalotti 3bfc65a25b Issue #13505: Make pickling of bytes object compatible with Python 2.
Initial patch by sbt.
2011-12-13 13:08:09 -05:00
Victor Stinner 720f34a3e8 Issue #5905: time.strftime() is now using the locale encoding, instead of
UTF-8, if the wcsftime() function is not available.
2011-12-09 20:19:24 +01:00
Ned Deily 2f0ad742b5 Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
(Patch by Tal Einat)
2011-12-07 01:08:35 -08:00
Lars Gustäbel ed1ac587df Correctly detect bzip2 compressed streams with blocksizes other than 900k. 2011-12-06 12:56:38 +01:00
Barry Warsaw 9f57135465 - Issue #11147: Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER. (Fix
given by Campbell Barton).
2011-12-05 16:45:02 -05:00
Meador Inge 777bebb0ef Issue #13513: IOBase docs incorrectly link to the readline module 2011-12-03 12:29:54 -06:00
Petri Lehtinen 9aa20affb6 Issue #13439: Fix many errors in turtle docstrings. 2011-12-02 21:24:14 +02:00
Éric Araujo a74f8ef419 Fix inspect.getmodule to use a copy of sys.modules for iteration (#13487).
This fixes a regression compared to 2.x, where sys.modules.items()
returns a copy, as indicated by a comment in the source.  Diagnosis and
patch by Erik Tollerud.
2011-11-29 16:58:53 +01:00
Antoine Pitrou 11942a58a1 Issue #7111: Python can now be run without a stdin, stdout or stderr stream.
It was already the case with Python 2.  However, the corresponding
sys module entries are now set to None (instead of an unusable file object).
2011-11-28 19:08:36 +01:00
Meador Inge 22b9b37915 Issue #12618: py_compile cannot create files in current directory
Initial patch by Sjoerd de Vries.
2011-11-28 09:27:32 -06:00
Antoine Pitrou d7c8fbf89e Issue #13444: When stdout has been closed explicitly, we should not attempt to flush it at shutdown and print an error.
This also adds a test for issue #5319, whose resolution introduced the issue.
2011-11-26 21:59:36 +01:00
Antoine Pitrou 4558bad7d6 Issue #12856: Ensure child processes do not inherit the parent's random seed for filename generation in the tempfile module.
Patch by Brian Harring.
2011-11-25 21:28:15 +01:00
Antoine Pitrou 116d6b98bf Issue #13458: Fix a memory leak in the ssl module when decoding a certificate with a subjectAltName.
Patch by Robert Xiao.
2011-11-23 01:39:19 +01:00
Victor Stinner 896f4714f4 Merge branch 3.2 2011-11-22 22:22:26 +01:00
Victor Stinner 60b385e813 Issue #13415: os.unsetenv() doesn't ignore errors anymore. 2011-11-22 22:01:28 +01:00
Amaury Forgeot d'Arc 58e8761da6 Issue #13436: Fix a bogus error message when an AST object was passed
an invalid integer value.
2011-11-22 21:51:55 +01:00
Antoine Pitrou 58fcf9f801 Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
raised when the wrapped raw file is non-blocking and the write would block.
Previous code assumed that the raw write() would raise BlockingIOError, but
RawIOBase.write() is defined to returned None when the call would block.
Patch by sbt.
2011-11-21 20:16:44 +01:00
Petri Lehtinen 8d40f16a60 Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER
This allows compiling extension modules with -Wswitch-enum on gcc.
Initial patch by Floris Bruynooghe.
2011-11-19 22:03:10 +02:00
Ezio Melotti 15cb489234 #13358: HTMLParser now calls handle_data only once for each CDATA. 2011-11-18 18:01:49 +02:00
Ezio Melotti 8008f2aba0 #4147: minidom's toprettyxml no longer adds whitespace around a text node when it is the only child of an element. Initial patch by Dan Kenigsberg. 2011-11-18 17:34:26 +02:00
Antoine Pitrou 5418ee0b9a Issue #13333: The UTF-7 decoder now accepts lone surrogates
(the encoder already accepts them).
2011-11-15 01:42:21 +01:00
Ezio Melotti c2fe57762b #1745761, #755670, #13357, #12629, #1200313: improve attribute handling in HTMLParser. 2011-11-14 18:53:33 +02:00
Antoine Pitrou 3714c1ebfd Add NEWS entry for #13193 2011-11-12 01:22:11 +01:00
Brian Curtin 675f6b87cd Fix #13384. Remove __future__ import in 3.x code. 2011-11-11 09:37:25 -06:00
Antoine Pitrou a365113679 Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely
when called with a timeout.  Patch by Arnaud Ysmal.
2011-11-10 00:37:09 +01:00
Jesus Cea bc91b46951 Partial patch for issue #11812: Take care of test_telnetlib.py 2011-11-08 16:24:43 +01:00
Jesus Cea c241df814f Solved a potential deadlock in test_telnetlib.py. Related to issue #11812 2011-11-08 16:20:46 +01:00
Nick Coghlan c29248f232 Issue #13237: Forward port subprocess module updates and explicitly document UTF-8 encoding assumption when universal_newlines=True 2011-11-08 20:49:23 +10:00
Petri Lehtinen ebfaabd663 Revert "Accept None as start and stop parameters for list.index() and tuple.index()"
Issue #13340.
2011-11-06 21:02:39 +02:00
Petri Lehtinen fd6b582a71 curses.tparm() is expecting a byte string, not curses.tigetstr()
Issue #10570
2011-11-06 09:24:19 +02:00
Antoine Pitrou 0d776b1ce8 Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode
error handler in interactive mode (when calling into PyOS_Readline()).
2011-11-06 00:34:26 +01:00
Petri Lehtinen c2f0a46111 Accept None as start and stop parameters for list.index() and tuple.index()
Closes #13340.
2011-11-05 23:24:31 +02:00
Petri Lehtinen bc74ee039c Remove __pycache__ directories correctly on OpenBSD
The find utility of OpenBSD doesn't support the "-exec cmd {} +"
action. Change it to use "-depth -exec cmd {} ;" instead.

Also, remove __pycache__ before *.py[co], as most bytecode files are
in __pycache__ directories. Only those generated by Python 2 under
Doc/tools are not.

Closes #13326.
2011-11-05 21:17:08 +02:00
Petri Lehtinen 395ca72380 Issue #3067: Enhance the documentation and docstring of locale.setlocale() 2011-11-05 10:21:16 +02:00
Petri Lehtinen 8c482ee955 Fix Maildir initialization so that maildir contents are read correctly.
Closes #13254.
2011-11-05 09:44:59 +02:00
Amaury Forgeot d'Arc 97c1bef6a4 Issue #13343: Fix a SystemError when a lambda expression uses a global
variable in the default value of a keyword-only argument:
(lambda *, arg=GLOBAL_NAME: None)
2011-11-04 22:17:45 +01:00
Petri Lehtinen 3c85fe07f4 Issue #3067: Fix the error raised by locale.setlocale() 2011-11-04 22:21:07 +02:00
Florent Xicluna 12b66b5217 Closes #13140: Fix the daemon_threads attribute of ThreadingMixIn. 2011-11-04 10:16:28 +01:00
Ross Lagerwall dcfde5aac9 Issue #13339: Fix compile error in posixmodule.c due to missing semicolon.
Thanks to Robert Xiao.
2011-11-04 07:09:14 +02:00
Victor Stinner b3bc7e764d Issue #10570: curses.putp() is now expecting a byte string, instead of a
Unicode string.

This is an incompatible change, but putp() is used to emit terminfo commands,
which are bytes strings, not Unicode strings.
2011-11-03 20:35:40 +01:00
Victor Stinner 2662133a05 Issue #10570: curses.tigetstr() is now expecting a byte string, instead of a
Unicode string.

This is an incompatible change, but the previous behaviour was completly wrong.
2011-11-02 23:45:29 +01:00
Florent Xicluna 91d5193b3a Closes #2892: preserve iterparse events in case of SyntaxError. 2011-11-01 23:31:09 +01:00
Ezio Melotti 7de56f6a04 #670664: Fix HTMLParser to correctly handle the content of ``<script>...</script>`` and ``<style>...</style>``. 2011-11-01 14:12:22 +02:00
Ned Deily 316f573d9c Issue #13304: Skip test case if user site-packages disabled (-s or
PYTHONNOUSERSITE).  (Patch by Carl Meyer)
2011-10-31 16:16:35 -07:00
Senthil Kumaran ce260142c6 Fix issue 10817 - Fix urlretrieve function to raise ContentTooShortError
even when reporthook is None. Patch by Jyrki Pulliainen.
2011-11-01 01:35:17 +08:00
Ned Deily 7aff451728 Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart.
(Patch by Roger Serwy)
2011-10-30 20:01:35 -07:00
Florent Xicluna 9783b44bcf Merge heads 2011-10-30 20:26:28 +01:00
Florent Xicluna 93dfee1dfc Issue #13293: Better error message when trying to marshal bytes using xmlrpc.client. 2011-10-30 20:22:25 +01:00
Florent Xicluna 3fa29f7cd7 Closes #13291: NameError in xmlrpc package. 2011-10-30 20:18:50 +01:00
Petri Lehtinen cd06a14df7 Add Misc/NEWS entry for issue #10519 2011-10-30 21:11:09 +02:00
Antoine Pitrou 8db076cf8a Issue #10363: Deallocate global locks in Py_Finalize(). 2011-10-30 19:13:55 +01:00
Barry Warsaw 46ae0efce1 - Issue #13218: Fix test_ssl failures on Debian/Ubuntu. 2011-10-28 16:52:17 -04:00
Florent Xicluna 5d1155c08e Closes #13258: Use callable() built-in in the standard library. 2011-10-28 14:45:05 +02:00
Ezio Melotti f50ffa94ab #13273: fix a bug that prevented HTMLParser to properly detect some tags when strict=False. 2011-10-28 13:21:09 +03:00
Petri Lehtinen 64c1c07201 merge heads 2011-10-24 21:24:58 +03:00
Petri Lehtinen a94200e6ce Issue #13018: Fix reference leaks in error paths in dictobject.c.
Patch by Suman Saha.
2011-10-24 21:12:58 +03:00
Charles-François Natali f8859e1808 Issue #10332: multiprocessing: fix a race condition when a Pool is closed
before all tasks have completed.
2011-10-24 18:45:29 +02:00
Florent Xicluna c45fb25fba Issue #13255: wrong docstrings in array module. 2011-10-24 13:14:55 +02:00
Florent Xicluna 023611f34e Issue 13141: Demonstrate recommended style for socketserver examples. 2011-10-23 22:40:37 +02:00
Nick Coghlan de31b191e5 Issue 1294232: Fix errors in metaclass calculation affecting some cases of metaclass inheritance. Patch by Daniel Urban. 2011-10-23 22:04:16 +10:00
Florent Xicluna 711f87ca7d Issue #9168: now smtpd is able to bind privileged port. 2011-10-20 23:03:43 +02:00
Senthil Kumaran fdd4575d19 News entry for Issue12529 and Issue12604 2011-10-21 00:29:47 +08:00
Senthil Kumaran 29fa9d4d68 3.2 - Fix closes Issue6090 - Raise a ValueError, instead of failing with unrelated
exceptions, when a document with timestamp earlier than 1980 is provided to
zipfile. Patch contributed by  Petri Lehtinen.
2011-10-20 01:46:00 +08:00
Łukasz Langa a5a9a9c369 Fixes #10860: Handle empty port after port delimiter in httplib 2011-10-18 21:17:39 +02:00
Antoine Pitrou 551ba20e8e Issue #13188: When called without an explicit traceback argument,
generator.throw() now gets the traceback from the passed exception's
`__traceback__` attribute.  Patch by Petri Lehtinen.
2011-10-18 16:40:50 +02:00
Ezio Melotti 6bfecd1271 #12448: smtplib now flushes stdout while running ``python -m smtplib``
in order to display the prompt correctly.  Patch by Petri Lehtinen.
2011-10-18 13:20:07 +03:00
Nadeem Vawda bcb86c5246 Issue #13194: zlib.compressobj().copy() and zlib.decompressobj().copy() are now available on Windows. 2011-10-17 19:34:22 +02:00
Mark Hammond 6c58b28f2f Issue #7833: Ext. modules built using distutils on Windows no longer get a manifest 2011-10-17 11:05:57 +11:00
Raymond Hettinger 4b779b3785 Issue 13177: Make tracebacks more readable by avoiding chained exceptions in the lru_cache. 2011-10-15 23:50:42 -07:00
Lars Gustäbel ac3d137a30 Issue #13158: Fix decoding and encoding of base-256 number fields in tarfile.
The nti() function that converts a number field from a tar header to a number
failed to decode GNU tar specific base-256 fields. I also added support for
decoding and encoding negative base-256 number fields.
2011-10-14 12:46:40 +02:00
Victor Stinner 82ac9bcdb3 Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding,
instead of the locale encoding.
2011-10-14 03:03:35 +02:00
Victor Stinner c1f32ca0ad Issue #10653: On Windows, use strftime() instead of wcsftime() because
wcsftime() doesn't format time zone correctly.
2011-10-14 02:36:13 +02:00
Nadeem Vawda d41a98bdd9 Issue #13159: Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one.
Also fix the bz2 module, whose classes used the same algorithm.
2011-10-13 13:34:16 +02:00
Éric Araujo a5bc34fa00 Branch merge 2011-10-09 07:32:35 +02:00
Éric Araujo 8af607b4c8 As it turns out, this bug was already in the tracker: #11171 2011-10-09 06:32:38 +02:00
Éric Araujo fea2d04bb9 Fix distutils.sysconfig.get_makefile_filename when prefix != exec-prefix 2011-10-08 01:56:52 +02:00
Éric Araujo 47a4521ece Fix distutils byte-compilation to comply with PEP 3147 (#11254).
Patch by Jeff Ramnani.  Tested with -B, -O and -OO.
2011-10-08 00:34:13 +02:00
Barry Warsaw c6cfd4aa88 Branch merge. 2011-10-07 14:45:25 -04:00
Barry Warsaw 78f89d8c38 - Issue #11250: Back port fix from 3.3 branch, so that 2to3 can handle files
with line feeds.  This was ported from the sandbox to the 3.3 branch, but
  didn't make it into 3.2.

- Re-enable lib2to3's test_parser.py tests, though with an expected failure
  (see issue 13125).
2011-10-07 14:44:49 -04:00
Antoine Pitrou 586bfe4500 Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
as "The pipe is being closed") is now mapped to POSIX errno EPIPE
(previously EINVAL).
2011-10-07 16:16:31 +02:00
Ned Deily 7b847a46bc Issue #7367: add NEWS item. 2011-10-06 14:31:14 -07:00
Antoine Pitrou eeb7eea1f9 Issue #12911: Fix memory consumption when calculating the repr() of huge tuples or lists.
This introduces a small private API for this common pattern.
The issue has been discovered thanks to Martin's huge-mem buildbot.
2011-10-06 18:57:27 +02:00
Charles-François Natali 42c28cdd1d Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle
would be finalized after the reference to its underlying BufferedRWPair's
writer got cleared by the GC.
2011-10-05 19:53:43 +02:00
Antoine Pitrou 1665d2c75f Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
Reported and diagnosed by Thomas Kluyver.
2011-10-04 13:35:28 +02:00
Antoine Pitrou 1e44fecc52 Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation
if the underlying raw stream is unseekable, even if the seek could be
satisfied using the internal buffer.  Patch by John O'Connor.
2011-10-04 12:26:20 +02:00
Antoine Pitrou ffd41d9f10 Issue #7689: Allow pickling of dynamically created classes when their
metaclass is registered with copyreg.  Patch by Nicolas M. Thiéry and
Craig Citro.
2011-10-04 09:23:04 +02:00