]>
granicus.if.org Git - python/log
Victor Stinner [Mon, 8 Jul 2013 20:28:27 +0000 (22:28 +0200)]
fix indentation
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.
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).
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).
Victor Stinner [Mon, 8 Jul 2013 20:20:44 +0000 (22:20 +0200)]
Issue #18408: Fix list.pop() to handle list_resize() failure (MemoryError).
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).
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
Victor Stinner [Mon, 8 Jul 2013 20:15:05 +0000 (22:15 +0200)]
gcmodule.c: strip trailing spaces
Ezio Melotti [Mon, 8 Jul 2013 15:53:32 +0000 (17:53 +0200)]
#18403: merge with 3.3.
Ezio Melotti [Mon, 8 Jul 2013 15:52:54 +0000 (17:52 +0200)]
#18403: fix an off-by-one typo noticed by Xue Fuqiao.
Ezio Melotti [Mon, 8 Jul 2013 15:49:59 +0000 (17:49 +0200)]
Merge str.center tests from 3.3.
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.
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.
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()
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
Victor Stinner [Sun, 7 Jul 2013 15:22:41 +0000 (17:22 +0200)]
Issue #18203: Replace malloc() with PyMem_Malloc() in _PySequence_BytesToCharpArray()
Victor Stinner [Sun, 7 Jul 2013 15:18:53 +0000 (17:18 +0200)]
Issue #18203: Replace malloc() with PyMem_Malloc() to allocate arena objects
Victor Stinner [Sun, 7 Jul 2013 15:17:59 +0000 (17:17 +0200)]
Issue #18203: Replace malloc() with PyMem_RawMalloc() to allocate thread locks
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)
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
Victor Stinner [Sun, 7 Jul 2013 14:50:27 +0000 (16:50 +0200)]
Issue #18227: Use PyMem_RawAlloc() in bz2, lzma and zlib modules
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()
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
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.
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()
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().
Raymond Hettinger [Sun, 7 Jul 2013 12:07:23 +0000 (02:07 -1000)]
Fix #ifdef
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.
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.
Ezio Melotti [Sun, 7 Jul 2013 11:16:05 +0000 (13:16 +0200)]
#17198: merge with 3.3.
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.
Florent Xicluna [Sun, 7 Jul 2013 10:46:28 +0000 (12:46 +0200)]
Merge #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.
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.
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.
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.
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.
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.
Raymond Hettinger [Sun, 7 Jul 2013 03:50:01 +0000 (17:50 -1000)]
merge
Raymond Hettinger [Sun, 7 Jul 2013 03:49:06 +0000 (17:49 -1000)]
Improve variable names in deque_count()
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.
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.
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
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.
Brett Cannon [Sat, 6 Jul 2013 22:05:02 +0000 (18:05 -0400)]
merge
Brett Cannon [Sat, 6 Jul 2013 22:04:41 +0000 (18:04 -0400)]
merge for issue #18351.
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.
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.
Raymond Hettinger [Sat, 6 Jul 2013 19:07:06 +0000 (09:07 -1000)]
Remove unnecessary branches from count() and reverse().
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.
Ezio Melotti [Sat, 6 Jul 2013 15:17:45 +0000 (17:17 +0200)]
#18380: merge with 3.3.
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.
Florent Xicluna [Sat, 6 Jul 2013 13:08:29 +0000 (15:08 +0200)]
test_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
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.
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.
Florent Xicluna [Sat, 6 Jul 2013 10:27:50 +0000 (12:27 +0200)]
Issue #18375: merge with 3.3
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.
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.
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.
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
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.
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.
Brett Cannon [Thu, 4 Jul 2013 22:16:15 +0000 (18:16 -0400)]
Issue #15767: Excise the remaining instances of ModuleNotFoundError
Brett Cannon [Thu, 4 Jul 2013 22:04:20 +0000 (18:04 -0400)]
Remove dead code in test_exceptions.
Brett Cannon [Thu, 4 Jul 2013 22:03:57 +0000 (18:03 -0400)]
Move test_import over to unittest.main().
Brett Cannon [Thu, 4 Jul 2013 21:51:50 +0000 (17:51 -0400)]
Issue #15767: back out
8a0ed9f63c6e , finishing the removal of
ModuleNotFoundError.
Brett Cannon [Thu, 4 Jul 2013 21:48:16 +0000 (17:48 -0400)]
Issue #15767: Revert
3a50025f1900 for ModuleNotFoundError
Brett Cannon [Thu, 4 Jul 2013 21:44:08 +0000 (17:44 -0400)]
Issue #15767: Back out
8d28d44f3a9a related to ModuleNotFoundError.
Brett Cannon [Thu, 4 Jul 2013 21:43:24 +0000 (17:43 -0400)]
Issue #18200: Back out usage of ModuleNotFoundError (
8d28d44f3a9a )
Antoine Pitrou [Thu, 4 Jul 2013 19:06:12 +0000 (21:06 +0200)]
Consolidate tests section.
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é.
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é.
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
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
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.
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.
Eric V. Smith [Tue, 2 Jul 2013 13:07:53 +0000 (09:07 -0400)]
#18312: merge from 3.3.
Eric V. Smith [Tue, 2 Jul 2013 13:06:54 +0000 (09:06 -0400)]
Closes #18312: 'make distclean' no longer deletes files in dot-directories.
Richard Oudkerk [Tue, 2 Jul 2013 12:38:58 +0000 (13:38 +0100)]
Issue #17261: Ensure multiprocessing's proxies use proper address.
Richard Oudkerk [Tue, 2 Jul 2013 12:37:43 +0000 (13:37 +0100)]
Issue #17261: Ensure multiprocessing's proxies use proper address.
Richard Oudkerk [Tue, 2 Jul 2013 12:01:31 +0000 (13:01 +0100)]
Issue #14206: Clarify docs for Queue.join_cancel_thread().
Richard Oudkerk [Tue, 2 Jul 2013 11:59:55 +0000 (12:59 +0100)]
Issue #14206: Clarify docs for Queue.join_cancel_thread().
Richard Oudkerk [Tue, 2 Jul 2013 11:41:00 +0000 (12:41 +0100)]
Issue #17273: Clarify that pool methods can only be used by parent process.
Richard Oudkerk [Tue, 2 Jul 2013 11:32:00 +0000 (12:32 +0100)]
Issue #17273: Clarify that pool methods can only be used by parent process.
Victor Stinner [Mon, 1 Jul 2013 22:17:14 +0000 (00:17 +0200)]
(Merge 3.3) Issue #18343: faulthandler.register() now keeps the previous signal
handler when the function is called twice, so faulthandler.unregister()
restores correctly the original signal handler.
Victor Stinner [Mon, 1 Jul 2013 22:14:56 +0000 (00:14 +0200)]
Issue #18343: faulthandler.register() now keeps the previous signal handler
when the function is called twice, so faulthandler.unregister() restores
correctly the original signal handler.
Christian Heimes [Mon, 1 Jul 2013 21:43:09 +0000 (23:43 +0200)]
Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the
tstate is first removed from TLS and then deallocated.
CID
1019639 (#1 of 1): Use after free (USE_AFTER_FREE)
use_after_free: Using freed pointer tstate.
Christian Heimes [Mon, 1 Jul 2013 21:42:28 +0000 (23:42 +0200)]
Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the
tstate is first removed from TLS and then deallocated.
CID
1019639 (#1 of 1): Use after free (USE_AFTER_FREE)
use_after_free: Using freed pointer tstate.
Christian Heimes [Mon, 1 Jul 2013 21:00:22 +0000 (23:00 +0200)]
Issue #18339: use with self.assertRaises() to make test case more readable
Christian Heimes [Mon, 1 Jul 2013 21:00:13 +0000 (23:00 +0200)]
Issue #18339: use with self.assertRaises() to make test case more readable
Richard Oudkerk [Mon, 1 Jul 2013 18:10:39 +0000 (19:10 +0100)]
Issue #17097: Merge.
Richard Oudkerk [Mon, 1 Jul 2013 17:59:26 +0000 (18:59 +0100)]
Issue #17097: Make multiprocessing ignore EINTR.
Łukasz Langa [Mon, 1 Jul 2013 14:03:17 +0000 (16:03 +0200)]
Merge with current default
Łukasz Langa [Mon, 1 Jul 2013 14:00:38 +0000 (16:00 +0200)]
Issue #18244: Adopt C3-based linearization in functools.singledispatch for improved ABC support
Christian Heimes [Mon, 1 Jul 2013 13:23:48 +0000 (15:23 +0200)]
Singular form just like the other error message.
Christian Heimes [Mon, 1 Jul 2013 13:23:39 +0000 (15:23 +0200)]
Singular form just like the other error message.
Christian Heimes [Mon, 1 Jul 2013 13:18:49 +0000 (15:18 +0200)]
Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a
segfault inside the _pickle C extension.
Christian Heimes [Mon, 1 Jul 2013 13:17:45 +0000 (15:17 +0200)]
Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a
segfault inside the _pickle C extension.
Christian Heimes [Mon, 1 Jul 2013 11:08:42 +0000 (13:08 +0200)]
Issue 18240: The HMAC module is no longer restricted to bytes and accepts
any bytes-like object, e.g. memoryview. Original patch by Jonas Borgström.