]> granicus.if.org Git - python/log
python
12 years agoIssue #18426: Fix NULL pointer dereference in C extension import when
Christian Heimes [Thu, 11 Jul 2013 09:23:34 +0000 (11:23 +0200)]
Issue #18426: Fix NULL pointer dereference in C extension import when
PyModule_GetDef() returns an error.

12 years agoIssue #18426: Fix NULL pointer dereference in C extension import when
Christian Heimes [Thu, 11 Jul 2013 09:22:21 +0000 (11:22 +0200)]
Issue #18426: Fix NULL pointer dereference in C extension import when
PyModule_GetDef() returns an error.

12 years ago#18116: getpass no longer always falls back to stdin.
R David Murray [Wed, 10 Jul 2013 21:02:24 +0000 (17:02 -0400)]
#18116: getpass no longer always falls back to stdin.

Also fixes a resource warning that occurred when the fallback is taken.

Patch by Serhiy Storchaka.

(We couldn't figure out how to write tests for this.)

12 years agoMerge: #18424: PEP8ify the tense of the sum docstring.
R David Murray [Wed, 10 Jul 2013 20:22:59 +0000 (16:22 -0400)]
Merge: #18424: PEP8ify the tense of the sum docstring.

12 years ago#18424: PEP8ify the tense of the sum docstring.
R David Murray [Wed, 10 Jul 2013 20:22:14 +0000 (16:22 -0400)]
#18424: PEP8ify the tense of the sum docstring.

12 years agoMerge: #18399: fix comment typo.
R David Murray [Wed, 10 Jul 2013 15:57:39 +0000 (11:57 -0400)]
Merge: #18399: fix comment typo.

12 years ago#18399: fix comment typo.
R David Murray [Wed, 10 Jul 2013 14:57:39 +0000 (10:57 -0400)]
#18399: fix comment typo.

Patch by Andrew Rowe.

12 years agoIssue #18408: Fix call_exc_trace(): if the traceback is NULL, use None when
Victor Stinner [Wed, 10 Jul 2013 11:57:55 +0000 (13:57 +0200)]
Issue #18408: Fix call_exc_trace(): if the traceback is NULL, use None when
building the tuple (type, value, traceback) passed to the callback.

PyTuple_Pack() does crash if an argument is NULL.

12 years agoIssue #18308: don't take the scope ID into account when comparing IPv6
Charles-François Natali [Tue, 9 Jul 2013 17:16:32 +0000 (19:16 +0200)]
Issue #18308: don't take the scope ID into account when comparing IPv6
addresses.

12 years agoIssue #18308: don't take the scope ID into account when comparing IPv6
Charles-François Natali [Tue, 9 Jul 2013 17:15:43 +0000 (19:15 +0200)]
Issue #18308: don't take the scope ID into account when comparing IPv6
addresses.

12 years agouse $(LN) makefile variable instead of ln
Christian Heimes [Tue, 9 Jul 2013 12:30:22 +0000 (14:30 +0200)]
use $(LN) makefile variable instead of ln

12 years agouse $(LN) makefile variable instead of ln
Christian Heimes [Tue, 9 Jul 2013 12:30:04 +0000 (14:30 +0200)]
use $(LN) makefile variable instead of ln

12 years agoAdd a spacing saving heuristic to deque's extend methods
Raymond Hettinger [Tue, 9 Jul 2013 07:13:21 +0000 (00:13 -0700)]
Add a spacing saving heuristic to deque's extend methods

12 years agoIssue #18408: Fix select.select() to handle PyList_New() failure (MemoryError)
Victor Stinner [Mon, 8 Jul 2013 22:49:03 +0000 (00:49 +0200)]
Issue #18408: Fix select.select() to handle PyList_New() failure (MemoryError)
in set2list()

12 years agoIssue #18408: Fix _PyMem_DebugRealloc()
Victor Stinner [Mon, 8 Jul 2013 22:44:43 +0000 (00:44 +0200)]
Issue #18408: Fix _PyMem_DebugRealloc()

Don't mark old extra memory dead before calling realloc(). realloc() can fail
and realloc() must not touch the original buffer on failure.

So mark old extra memory dead only on success if the new buffer did not move
(has the same address).

12 years agoIssue #18408: _PyUnicodeWriter_Finish() now clears its buffer attribute in all
Victor Stinner [Mon, 8 Jul 2013 22:37:24 +0000 (00:37 +0200)]
Issue #18408: _PyUnicodeWriter_Finish() now clears its buffer attribute in all
cases, so _PyUnicodeWriter_Dealloc() can be called after finish.

12 years agoIssue #18408: Fix usage of _PyBytes_Resize()
Victor Stinner [Mon, 8 Jul 2013 22:35:22 +0000 (00:35 +0200)]
Issue #18408: Fix usage of _PyBytes_Resize()

_PyBytes_Resize(&v, new_size) sets v to NULL on error, so v cannot be used
anymore. Replace "Py_DECREF(v); v = NULL;" with "Py_CLEAR(v);".

12 years agoIssue #18408: Fix PyCode_Optimize(): raise a MemoryError on memory allocation
Victor Stinner [Mon, 8 Jul 2013 22:32:04 +0000 (00:32 +0200)]
Issue #18408: Fix PyCode_Optimize(): raise a MemoryError on memory allocation
failure.

12 years agoIssue #18408: Fix zlib.compressobj() to handle PyThread_allocate_lock() failure
Victor Stinner [Mon, 8 Jul 2013 22:29:03 +0000 (00:29 +0200)]
Issue #18408: Fix zlib.compressobj() to handle PyThread_allocate_lock() failure
(MemoryError).

12 years agoIssue #18408: Fix ConvParam() of the ctypes module to handle paramfunc failure
Victor Stinner [Mon, 8 Jul 2013 22:27:12 +0000 (00:27 +0200)]
Issue #18408: Fix ConvParam() of the ctypes module to handle paramfunc failure
(MemoryError).

12 years agoAvoid spurious non-fatal install errors for OS X frameworks:
Ned Deily [Mon, 8 Jul 2013 21:33:03 +0000 (14:33 -0700)]
Avoid spurious non-fatal install errors for OS X frameworks:
for a framework install, the python shared library is installed in
the frameworkinstallstructure target, not in altbininstall.

12 years agoIssue #18408: Fix _PyUnicodeWriter_Finish(): clear writer->buffer,
Victor Stinner [Mon, 8 Jul 2013 20:29:55 +0000 (22:29 +0200)]
Issue #18408: Fix _PyUnicodeWriter_Finish(): clear writer->buffer,
so _PyUnicodeWriter_Dealloc() can be called on the writer after finish.

12 years agofix indentation
Victor Stinner [Mon, 8 Jul 2013 20:28:27 +0000 (22:28 +0200)]
fix indentation

12 years agoIssue #18408: Fix call_function() of ceval.c to handle PyTuple_New() failure
Victor Stinner [Mon, 8 Jul 2013 20:27:42 +0000 (22:27 +0200)]
Issue #18408: Fix call_function() of ceval.c to handle PyTuple_New() failure
(in load_args()), ex: MemoryError.

12 years agoIssue #18408: Fix PyType_Ready() and type.__bases__ setter to handle
Victor Stinner [Mon, 8 Jul 2013 20:25:48 +0000 (22:25 +0200)]
Issue #18408: Fix PyType_Ready() and type.__bases__ setter to handle
PyWeakref_NewRef() failure (ex: MemoryError).

12 years agoIssue #18408: Fix marshal reader for Unicode strings: handle
Victor Stinner [Mon, 8 Jul 2013 20:23:32 +0000 (22:23 +0200)]
Issue #18408: Fix marshal reader for Unicode strings: handle
PyUnicode_DecodeUTF8() failure (ex: MemoryError).

12 years agoIssue #18408: Fix list.pop() to handle list_resize() failure (MemoryError).
Victor Stinner [Mon, 8 Jul 2013 20:20:44 +0000 (22:20 +0200)]
Issue #18408: Fix list.pop() to handle list_resize() failure (MemoryError).

12 years agoIssue #18408: Fix PyDict_New() to handle correctly new_keys_object() failure
Victor Stinner [Mon, 8 Jul 2013 20:19:20 +0000 (22:19 +0200)]
Issue #18408: Fix PyDict_New() to handle correctly new_keys_object() failure
(MemoryError).

12 years agoIssue #18408: PyObject_GC_NewVar() now raises SystemError exception if nitems
Victor Stinner [Mon, 8 Jul 2013 20:17:52 +0000 (22:17 +0200)]
Issue #18408: PyObject_GC_NewVar() now raises SystemError exception if nitems
is negative

12 years agogcmodule.c: strip trailing spaces
Victor Stinner [Mon, 8 Jul 2013 20:15:05 +0000 (22:15 +0200)]
gcmodule.c: strip trailing spaces

12 years ago#18403: merge with 3.3.
Ezio Melotti [Mon, 8 Jul 2013 15:53:32 +0000 (17:53 +0200)]
#18403: merge with 3.3.

12 years ago#18403: fix an off-by-one typo noticed by Xue Fuqiao.
Ezio Melotti [Mon, 8 Jul 2013 15:52:54 +0000 (17:52 +0200)]
#18403: fix an off-by-one typo noticed by Xue Fuqiao.

12 years agoMerge str.center tests from 3.3.
Ezio Melotti [Mon, 8 Jul 2013 15:49:59 +0000 (17:49 +0200)]
Merge str.center tests from 3.3.

12 years agoAdd a couple of tests for str.center with non-ASCII chars.
Ezio Melotti [Mon, 8 Jul 2013 15:48:29 +0000 (17:48 +0200)]
Add a couple of tests for str.center with non-ASCII chars.

12 years agoIssue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup()
Victor Stinner [Sun, 7 Jul 2013 21:30:24 +0000 (23:30 +0200)]
Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup()

Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the
GIL is held or not.

12 years agoIssue #18203: Fix _Py_DecodeUTF8_surrogateescape(), use PyMem_RawMalloc() as _Py_char...
Victor Stinner [Sun, 7 Jul 2013 20:57:45 +0000 (22:57 +0200)]
Issue #18203: Fix _Py_DecodeUTF8_surrogateescape(), use PyMem_RawMalloc() as _Py_char2wchar()

12 years agoIssue #18227: pyexpat now uses a static XML_Memory_Handling_Suite. cElementTree uses...
Christian Heimes [Sun, 7 Jul 2013 15:35:11 +0000 (17:35 +0200)]
Issue #18227: pyexpat now uses a static XML_Memory_Handling_Suite. cElementTree uses the same approach since at least Python 2.6

12 years agoIssue #18203: Replace malloc() with PyMem_Malloc() in _PySequence_BytesToCharpArray()
Victor Stinner [Sun, 7 Jul 2013 15:22:41 +0000 (17:22 +0200)]
Issue #18203:  Replace malloc() with PyMem_Malloc() in _PySequence_BytesToCharpArray()

12 years agoIssue #18203: Replace malloc() with PyMem_Malloc() to allocate arena objects
Victor Stinner [Sun, 7 Jul 2013 15:18:53 +0000 (17:18 +0200)]
Issue #18203: Replace malloc() with PyMem_Malloc() to allocate arena objects

12 years agoIssue #18203: Replace malloc() with PyMem_RawMalloc() to allocate thread locks
Victor Stinner [Sun, 7 Jul 2013 15:17:59 +0000 (17:17 +0200)]
Issue #18203: Replace malloc() with PyMem_RawMalloc() to allocate thread locks

12 years agoIssue #18227: "Free" function of bz2, lzma and zlib modules has no return value ...
Victor Stinner [Sun, 7 Jul 2013 15:10:34 +0000 (17:10 +0200)]
Issue #18227: "Free" function of bz2, lzma and zlib modules has no return value (void)

12 years agoIssue #18203: Replace malloc() with PyMem_Malloc() in _ssl for the password
Victor Stinner [Sun, 7 Jul 2013 15:07:52 +0000 (17:07 +0200)]
Issue #18203: Replace malloc() with PyMem_Malloc() in _ssl for the password

12 years agoIssue #18227: Use PyMem_RawAlloc() in bz2, lzma and zlib modules
Victor Stinner [Sun, 7 Jul 2013 14:50:27 +0000 (16:50 +0200)]
Issue #18227: Use PyMem_RawAlloc() in bz2, lzma and zlib modules

12 years agoIssue #18203: Fix decode_ascii_surrogateescape(), use PyMem_RawMalloc() as _Py_char2w...
Victor Stinner [Sun, 7 Jul 2013 14:35:54 +0000 (16:35 +0200)]
Issue #18203: Fix decode_ascii_surrogateescape(), use PyMem_RawMalloc() as _Py_char2wchar()

12 years agoFix a compiler warning in posix_sendfile() on FreeBSD:
Victor Stinner [Sun, 7 Jul 2013 14:32:36 +0000 (16:32 +0200)]
Fix a compiler warning in posix_sendfile() on FreeBSD:

Modules/posixmodule.c: In function 'posix_sendfile':
Modules/posixmodule.c:7700: warning: ISO C90 forbids mixed declarations and code

12 years agoIssue #18203: Replace malloc() with PyMem_Malloc() in Python modules
Victor Stinner [Sun, 7 Jul 2013 14:21:41 +0000 (16:21 +0200)]
Issue #18203: Replace malloc() with PyMem_Malloc() in Python modules

Replace malloc() with PyMem_Malloc() when the GIL is held, or with
PyMem_RawMalloc() otherwise.

12 years agoIssue #18203: Replace malloc() with PyMem_RawMalloc() at Python initialization
Victor Stinner [Sun, 7 Jul 2013 14:25:15 +0000 (16:25 +0200)]
Issue #18203: Replace malloc() with PyMem_RawMalloc() at Python initialization

* Replace malloc() with PyMem_RawMalloc()
* Replace PyMem_Malloc() with PyMem_RawMalloc() where the GIL is not held.
* _Py_char2wchar() now returns a buffer allocated by PyMem_RawMalloc(), instead
  of PyMem_Malloc()

12 years agoIssue #18203: Fix Py_Finalize(): destroy the GIL after the last call to
Victor Stinner [Sun, 7 Jul 2013 13:50:49 +0000 (15:50 +0200)]
Issue #18203: Fix Py_Finalize(): destroy the GIL after the last call to
PyMem_Malloc() or PyObject_Malloc().

For example, PyCFunction_Fini() calls PyObject_GC_Del() which calls
PyObject_FREE().

12 years agoFix #ifdef
Raymond Hettinger [Sun, 7 Jul 2013 12:07:23 +0000 (02:07 -1000)]
Fix #ifdef

12 years agoUse macros for marking and checking endpoints in the doubly-linked list of blocks.
Raymond Hettinger [Sun, 7 Jul 2013 11:43:42 +0000 (01:43 -1000)]
Use macros for marking and checking endpoints in the doubly-linked list of blocks.

* Add comment explaining the endpoint checks
* Only do the checks in a debug build
* Simplify newblock() to only require a length argument
  and leave the link updates to the calling code.
* Also add comment for the freelisting logic.

12 years ago#18106: refactor tests to use subtests and proper assert methods. Patch by Vajrasky...
Ezio Melotti [Sun, 7 Jul 2013 11:37:20 +0000 (13:37 +0200)]
#18106: refactor tests to use subtests and proper assert methods.  Patch by Vajrasky Kok.

12 years ago#17198: merge with 3.3.
Ezio Melotti [Sun, 7 Jul 2013 11:16:05 +0000 (13:16 +0200)]
#17198: merge with 3.3.

12 years ago#17198: Fix a NameError in the dbm module. Patch by Valentina Mukhamedzhanova.
Ezio Melotti [Sun, 7 Jul 2013 11:15:08 +0000 (13:15 +0200)]
#17198: Fix a NameError in the dbm module.  Patch by Valentina Mukhamedzhanova.

12 years agoMerge #18013: Fix cgi.FieldStorage to parse the W3C sample form.
Florent Xicluna [Sun, 7 Jul 2013 10:46:28 +0000 (12:46 +0200)]
Merge #18013: Fix cgi.FieldStorage to parse the W3C sample form.

12 years agoIssue #18013: Fix cgi.FieldStorage to parse the W3C sample form.
Florent Xicluna [Sun, 7 Jul 2013 10:44:28 +0000 (12:44 +0200)]
Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form.

12 years ago#18020: improve html.escape speed by an order of magnitude. Patch by Matt Bryant.
Ezio Melotti [Sun, 7 Jul 2013 09:11:24 +0000 (11:11 +0200)]
#18020: improve html.escape speed by an order of magnitude.  Patch by Matt Bryant.

12 years ago(3.3->default) Issue #18377: Code cleanup in Python Launcher
Ronald Oussoren [Sun, 7 Jul 2013 07:54:08 +0000 (09:54 +0200)]
(3.3->default) Issue #18377: Code cleanup in Python Launcher

This changeset fixes a number of compiler warnings in the Python Launcher
binary for OSX. It also cleans up whitespace usage in those sources.

12 years agoIssue #18377: Code cleanup in Python Launcher
Ronald Oussoren [Sun, 7 Jul 2013 07:53:08 +0000 (09:53 +0200)]
Issue #18377: Code cleanup in Python Launcher

This changeset fixes a number of compiler warnings in the Python Launcher
binary for OSX. It also cleans up whitespace usage in those sources.

12 years ago(3.3->default) Cleanup of documentation change from #17860
Ronald Oussoren [Sun, 7 Jul 2013 07:28:01 +0000 (09:28 +0200)]
(3.3->default) Cleanup of documentation change from #17860

Reformulated the textual change, and applied it to the docstring as well.

12 years agoCleanup of documentation change from #17860
Ronald Oussoren [Sun, 7 Jul 2013 07:26:45 +0000 (09:26 +0200)]
Cleanup of documentation change from #17860

Reformulated the textual change, and applied it to the docstring as well.

12 years agomerge
Raymond Hettinger [Sun, 7 Jul 2013 03:50:01 +0000 (17:50 -1000)]
merge

12 years agoImprove variable names in deque_count()
Raymond Hettinger [Sun, 7 Jul 2013 03:49:06 +0000 (17:49 -1000)]
Improve variable names in deque_count()

12 years agoIssue #3329: Fix _PyObject_ArenaVirtualFree()
Victor Stinner [Sun, 7 Jul 2013 01:06:16 +0000 (03:06 +0200)]
Issue #3329: Fix _PyObject_ArenaVirtualFree()

According to VirtualFree() documentation, the size must be zero if the "free
type" is MEM_RELEASE.

12 years agoIssue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix
Victor Stinner [Sun, 7 Jul 2013 00:49:07 +0000 (02:49 +0200)]
Issue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix
a stack overflow in the marshal module (fix a crash in test_marshal).
Patch written by Jeremy Kloth.

12 years agoIssue #3329: Implement the PEP 445
Victor Stinner [Sun, 7 Jul 2013 00:05:46 +0000 (02:05 +0200)]
Issue #3329: Implement the PEP 445

Add new enum:

* PyMemAllocatorDomain

Add new structures:

* PyMemAllocator
* PyObjectArenaAllocator

Add new functions:

* PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree()
* PyMem_GetAllocator(), PyMem_SetAllocator()
* PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator()
* PyMem_SetupDebugHooks()

Changes:

* PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead
  of calling PyObject_Malloc()/PyObject_Realloc() in debug mode.
* PyObject_Malloc()/PyObject_Realloc() now falls back to
  PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes.
* Redesign debug checks on memory block allocators as hooks, instead of using C
  macros

12 years agoApply the PyObject_VAR_HEAD and Py_SIZE macros
Raymond Hettinger [Sat, 6 Jul 2013 23:01:13 +0000 (13:01 -1000)]
Apply the PyObject_VAR_HEAD and Py_SIZE macros
to be consistent with practices in other modules.

12 years agomerge
Brett Cannon [Sat, 6 Jul 2013 22:05:02 +0000 (18:05 -0400)]
merge

12 years agomerge for issue #18351.
Brett Cannon [Sat, 6 Jul 2013 22:04:41 +0000 (18:04 -0400)]
merge for issue #18351.

12 years agoRefactor deque_traverse().
Raymond Hettinger [Sat, 6 Jul 2013 21:58:09 +0000 (11:58 -1000)]
Refactor deque_traverse().

Hoist conditional expression out of the loop.
Use rightblock as the guard instead of checking for NULL.

12 years agoIssue #18351: Fix various issues with
Brett Cannon [Sat, 6 Jul 2013 21:56:43 +0000 (17:56 -0400)]
Issue #18351: Fix various issues with
importlib._bootstrap._get_sourcefile().

Thanks to its only use by the C API, it was never properly tested
until now.

Thanks to Neal Norwitz for discovering the bug and Madison May for the patch.

12 years agoRemove unnecessary branches from count() and reverse().
Raymond Hettinger [Sat, 6 Jul 2013 19:07:06 +0000 (09:07 -1000)]
Remove unnecessary branches from count() and reverse().

12 years agoIssue #18364: Stop using the ImportError._not_found hack.
Brett Cannon [Sat, 6 Jul 2013 18:48:18 +0000 (14:48 -0400)]
Issue #18364: Stop using the ImportError._not_found hack.

The private attribute was leaking out of importlib and led to at least
one person noticing it. Switch to another hack which won't leak
outside of importlib and is nearly as robust.

12 years ago#18380: merge with 3.3.
Ezio Melotti [Sat, 6 Jul 2013 15:17:45 +0000 (17:17 +0200)]
#18380: merge with 3.3.

12 years ago#18380: pass regex flags to the right argument. Patch by Valentina Mukhamedzhanova.
Ezio Melotti [Sat, 6 Jul 2013 15:16:04 +0000 (17:16 +0200)]
#18380: pass regex flags to the right argument.  Patch by Valentina Mukhamedzhanova.

12 years agotest_ftplib: silence a BytesWarning when checking TypeError
Florent Xicluna [Sat, 6 Jul 2013 13:08:29 +0000 (15:08 +0200)]
test_ftplib: silence a BytesWarning when checking TypeError

12 years agotest_ftplib: silence a BytesWarning when checking TypeError
Florent Xicluna [Sat, 6 Jul 2013 13:08:21 +0000 (15:08 +0200)]
test_ftplib: silence a BytesWarning when checking TypeError

12 years ago(3.3->default) Issue #12990: The "Python Launcher" on OSX could not launch python...
Ronald Oussoren [Sat, 6 Jul 2013 11:25:44 +0000 (13:25 +0200)]
(3.3->default) Issue #12990: The "Python Launcher" on OSX could not launch python scripts that have paths that include wide characters.

12 years agoIssue #12990: The "Python Launcher" on OSX could not launch python scripts that have...
Ronald Oussoren [Sat, 6 Jul 2013 11:20:57 +0000 (13:20 +0200)]
Issue #12990: The "Python Launcher" on OSX could not launch python scripts that have paths that include wide characters.

12 years agoIssue #18375: merge with 3.3
Florent Xicluna [Sat, 6 Jul 2013 10:27:50 +0000 (12:27 +0200)]
Issue #18375: merge with 3.3

12 years agoIssue #18375: Assume --randomize when --randseed is used for running the testsuite.
Florent Xicluna [Sat, 6 Jul 2013 10:25:52 +0000 (12:25 +0200)]
Issue #18375: Assume --randomize when --randseed is used for running the testsuite.

12 years ago(3.3->default) Issue #17860: explicitly mention that std* streams are opened in binar...
Ronald Oussoren [Sat, 6 Jul 2013 08:25:04 +0000 (10:25 +0200)]
(3.3->default) Issue #17860: explicitly mention that std* streams are opened in binary mode by default.

The documentation does mention that the streams are opened in text mode
when univeral_newlines is true, but not that that they are opened in
binary mode when that argument is false and that seems to confuse at
least some users.

12 years agoIssue #17860: explicitly mention that std* streams are opened in binary mode by default.
Ronald Oussoren [Sat, 6 Jul 2013 08:23:59 +0000 (10:23 +0200)]
Issue #17860: explicitly mention that std* streams are opened in binary mode by default.

The documentation does mention that the streams are opened in text mode
when univeral_newlines is true, but not that that they are opened in
binary mode when that argument is false and that seems to confuse at
least some users.

12 years agoSpeed-up deque indexing by changing the deque block length to a power of two.
Raymond Hettinger [Sat, 6 Jul 2013 04:05:29 +0000 (18:05 -1000)]
Speed-up deque indexing by changing the deque block length to a power of two.

The division and modulo calculation in deque_item() can be compiled
to fast bitwise operations when the BLOCKLEN is a power of two.

Timing before:

 ~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0627 usec per loop

Timing after:

~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0581 usec per loop

12 years agoIssue #18347: ElementTree's html serializer now preserves the case of closing tags.
Christian Heimes [Thu, 4 Jul 2013 23:40:52 +0000 (01:40 +0200)]
Issue #18347: ElementTree's html serializer now preserves the case of closing tags.

12 years agoIssue #18347: ElementTree's html serializer now preserves the case of closing tags.
Christian Heimes [Thu, 4 Jul 2013 23:39:49 +0000 (01:39 +0200)]
Issue #18347: ElementTree's html serializer now preserves the case of closing tags.

12 years agoIssue #15767: Excise the remaining instances of ModuleNotFoundError
Brett Cannon [Thu, 4 Jul 2013 22:16:15 +0000 (18:16 -0400)]
Issue #15767: Excise the remaining instances of ModuleNotFoundError

12 years agoRemove dead code in test_exceptions.
Brett Cannon [Thu, 4 Jul 2013 22:04:20 +0000 (18:04 -0400)]
Remove dead code in test_exceptions.

12 years agoMove test_import over to unittest.main().
Brett Cannon [Thu, 4 Jul 2013 22:03:57 +0000 (18:03 -0400)]
Move test_import over to unittest.main().

12 years agoIssue #15767: back out 8a0ed9f63c6e, finishing the removal of
Brett Cannon [Thu, 4 Jul 2013 21:51:50 +0000 (17:51 -0400)]
Issue #15767: back out 8a0ed9f63c6e, finishing the removal of
ModuleNotFoundError.

12 years agoIssue #15767: Revert 3a50025f1900 for ModuleNotFoundError
Brett Cannon [Thu, 4 Jul 2013 21:48:16 +0000 (17:48 -0400)]
Issue #15767: Revert 3a50025f1900 for ModuleNotFoundError

12 years agoIssue #15767: Back out 8d28d44f3a9a related to ModuleNotFoundError.
Brett Cannon [Thu, 4 Jul 2013 21:44:08 +0000 (17:44 -0400)]
Issue #15767: Back out 8d28d44f3a9a related to ModuleNotFoundError.

12 years agoIssue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)
Brett Cannon [Thu, 4 Jul 2013 21:43:24 +0000 (17:43 -0400)]
Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)

12 years agoConsolidate tests section.
Antoine Pitrou [Thu, 4 Jul 2013 19:06:12 +0000 (21:06 +0200)]
Consolidate tests section.

12 years agoIssue #11185: Fix test_wait4 under AIX. Patch by Sébastien Sablé.
Antoine Pitrou [Thu, 4 Jul 2013 19:05:30 +0000 (21:05 +0200)]
Issue #11185: Fix test_wait4 under AIX.  Patch by Sébastien Sablé.

12 years agoIssue #11185: Fix test_wait4 under AIX. Patch by Sébastien Sablé.
Antoine Pitrou [Thu, 4 Jul 2013 19:03:10 +0000 (21:03 +0200)]
Issue #11185: Fix test_wait4 under AIX.  Patch by Sébastien Sablé.

12 years ago(Merge 3.3) test_time.test_monotonic(): use a longer sleep to try to make the test...
Victor Stinner [Wed, 3 Jul 2013 21:07:59 +0000 (23:07 +0200)]
(Merge 3.3) test_time.test_monotonic(): use a longer sleep to try to make the test more reliable

12 years agotest_time.test_monotonic(): use a longer sleep to try to make the test more reliable
Victor Stinner [Wed, 3 Jul 2013 21:07:37 +0000 (23:07 +0200)]
test_time.test_monotonic(): use a longer sleep to try to make the test more reliable

12 years ago(Merge 3.3) test_faulthandler: skip test_read_null() on AIX
Victor Stinner [Wed, 3 Jul 2013 20:35:39 +0000 (22:35 +0200)]
(Merge 3.3) test_faulthandler: skip test_read_null() on AIX

AIX maps the first page of memory at address zero as valid, read-only.  Reading
NULL is not a fault on AIX. This is utilized by IBM compiler optimizations.
One speculatively can indirect through a pointer which may be null without
first testing if null and defer the test before using the value.

12 years agotest_faulthandler: skip test_read_null() on AIX
Victor Stinner [Wed, 3 Jul 2013 20:29:42 +0000 (22:29 +0200)]
test_faulthandler: skip test_read_null() on AIX

AIX maps the first page of memory at address zero as valid, read-only.  Reading
NULL is not a fault on AIX. This is utilized by IBM compiler optimizations.
One speculatively can indirect through a pointer which may be null without
first testing if null and defer the test before using the value.

12 years ago#18312: merge from 3.3.
Eric V. Smith [Tue, 2 Jul 2013 13:07:53 +0000 (09:07 -0400)]
#18312: merge from 3.3.