]>
granicus.if.org Git - python/log
Victor Stinner [Wed, 14 Oct 2015 16:25:31 +0000 (18:25 +0200)]
Issue #25210: Change error message of do_richcompare()
Don't add parenthesis to type names. Add also quotes around the type names.
Before:
TypeError: unorderable types: int() < NoneType()
After:
TypeError: '<' not supported between instances of 'int' and 'NoneType'
Serhiy Storchaka [Wed, 14 Oct 2015 16:22:44 +0000 (19:22 +0300)]
Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
that caused segmentation fault or hang in iterating after moving several
items to the start of ordered dict.
Serhiy Storchaka [Wed, 14 Oct 2015 16:21:24 +0000 (19:21 +0300)]
Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
that caused segmentation fault or hang in iterating after moving several
items to the start of ordered dict.
Victor Stinner [Wed, 14 Oct 2015 13:28:59 +0000 (15:28 +0200)]
test_bytes: new try to fix test on '%p' formatter on Windows
Victor Stinner [Wed, 14 Oct 2015 13:20:07 +0000 (15:20 +0200)]
Refactor binascii.rledecode_hqx()
Rewrite the code to handle the output buffer.
Victor Stinner [Wed, 14 Oct 2015 13:02:35 +0000 (15:02 +0200)]
Issue #25384: Fix binascii.rledecode_hqx()
Fix usage of _PyBytesWriter API. Use the new _PyBytesWriter_Resize() function
instead of _PyBytesWriter_Prepare().
Victor Stinner [Wed, 14 Oct 2015 12:15:49 +0000 (14:15 +0200)]
Use _PyBytesWriter in _PyBytes_FromIterator()
Victor Stinner [Wed, 14 Oct 2015 11:56:47 +0000 (13:56 +0200)]
Add _PyBytesWriter_Resize() function
This function gives a control to the buffer size without using min_size.
Victor Stinner [Wed, 14 Oct 2015 11:50:40 +0000 (13:50 +0200)]
Factorize _PyBytes_FromList() and _PyBytes_FromTuple() code using a C macro
Victor Stinner [Wed, 14 Oct 2015 11:44:29 +0000 (13:44 +0200)]
Split PyBytes_FromObject() into subfunctions
Victor Stinner [Wed, 14 Oct 2015 11:32:13 +0000 (13:32 +0200)]
Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPI
* Don't overallocate by 400% when recode is needed: only overallocate on demand
using _PyBytesWriter.
* Use _PyLong_DigitValue to convert hexadecimal digit to int
* Create _PyBytes_DecodeEscapeRecode() subfunction
Victor Stinner [Wed, 14 Oct 2015 10:10:20 +0000 (12:10 +0200)]
Fix compiler warnings (uninitialized variables), false alarms in fact
Victor Stinner [Wed, 14 Oct 2015 10:02:39 +0000 (12:02 +0200)]
_PyBytesWriter_Alloc(): only use 10 bytes of the small buffer in debug mode to
enhance code to detect buffer under- and overflow.
Victor Stinner [Wed, 14 Oct 2015 09:59:46 +0000 (11:59 +0200)]
Issue #25401: Remove now unused hex_digit_to_int() function
Victor Stinner [Wed, 14 Oct 2015 09:25:33 +0000 (11:25 +0200)]
Optimize bytes.fromhex() and bytearray.fromhex()
Issue #25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now
between 2x and 3.5x faster. Changes:
* Use a fast-path working on a char* string for ASCII string
* Use a slow-path for non-ASCII string
* Replace slow hex_digit_to_int() function with a O(1) lookup in
_PyLong_DigitValue precomputed table
* Use _PyBytesWriter API to handle the buffer
* Add unit tests to check the error position in error messages
Victor Stinner [Wed, 14 Oct 2015 08:10:00 +0000 (10:10 +0200)]
Document latest optimizations using _PyBytesWriter
Victor Stinner [Wed, 14 Oct 2015 07:56:53 +0000 (09:56 +0200)]
Optimize bytearray % args
Issue #25399: Don't create temporary bytes objects: modify _PyBytes_Format() to
create work directly on bytearray objects.
* Rename _PyBytes_Format() to _PyBytes_FormatEx() just in case if something
outside CPython uses it
* _PyBytes_FormatEx() now uses (char*, Py_ssize_t) for the input string, so
bytearray_format() doesn't need tot create a temporary input bytes object
* Add use_bytearray parameter to _PyBytes_FormatEx() which is passed to
_PyBytesWriter, to create a bytearray buffer instead of a bytes buffer
Most formatting operations are now between 2.5 and 5 times faster.
Victor Stinner [Wed, 14 Oct 2015 07:41:48 +0000 (09:41 +0200)]
Add use_bytearray attribute to _PyBytesWriter
Issue #25399: Add a new use_bytearray attribute to _PyBytesWriter to use a
bytearray buffer, instead of using a bytes object.
Victor Stinner [Wed, 14 Oct 2015 07:47:23 +0000 (09:47 +0200)]
Fix long_format_binary()
Issue #25399: Fix long_format_binary(), allocate bytes for the bytes writer.
Terry Jan Reedy [Wed, 14 Oct 2015 02:09:34 +0000 (22:09 -0400)]
Merge with 3.5
Terry Jan Reedy [Wed, 14 Oct 2015 02:09:19 +0000 (22:09 -0400)]
Merge with 3.4
Terry Jan Reedy [Wed, 14 Oct 2015 02:09:06 +0000 (22:09 -0400)]
Issue #24782: whitespace
Terry Jan Reedy [Wed, 14 Oct 2015 02:04:22 +0000 (22:04 -0400)]
Merge with 3.5
Terry Jan Reedy [Wed, 14 Oct 2015 02:04:07 +0000 (22:04 -0400)]
Merge with 3.4
Terry Jan Reedy [Wed, 14 Oct 2015 02:03:51 +0000 (22:03 -0400)]
Issue #24782: Finish converting the Configure Extension dialog into a new
tab in the IDLE Preferences dialog. Code patch by Mark Roseman.
Victor Stinner [Wed, 14 Oct 2015 00:55:12 +0000 (02:55 +0200)]
Fix test_bytes on Windows
On Windows, sprintf("%p", 0xabcdef) formats hexadecimal in uppercase and pad to
16 characters (on 64-bit system) with zeros.
Victor Stinner [Tue, 13 Oct 2015 22:21:35 +0000 (00:21 +0200)]
Rewrite PyBytes_FromFormatV() using _PyBytesWriter API
* Add much more unit tests on PyBytes_FromFormatV()
* Remove the first loop to compute the length of the output string
* Use _PyBytesWriter to handle the bytes buffer, use overallocation
* Cleanup the code to make simpler and easier to review
Serhiy Storchaka [Tue, 13 Oct 2015 18:26:35 +0000 (21:26 +0300)]
Issue #24164: Document changes to __getnewargs__ and __getnewargs_ex__.
Serhiy Storchaka [Tue, 13 Oct 2015 18:20:14 +0000 (21:20 +0300)]
Issue #25382: pickletools.dis() now outputs implicit memo index for the
MEMOIZE opcode.
Serhiy Storchaka [Tue, 13 Oct 2015 18:14:01 +0000 (21:14 +0300)]
Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in
pickletools.opcodes.
Serhiy Storchaka [Tue, 13 Oct 2015 18:13:34 +0000 (21:13 +0300)]
Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in
pickletools.opcodes.
Serhiy Storchaka [Tue, 13 Oct 2015 18:12:32 +0000 (21:12 +0300)]
Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in
pickletools.opcodes.
Victor Stinner [Tue, 13 Oct 2015 08:51:47 +0000 (10:51 +0200)]
Issue #25384: Use _PyBytesWriter API in binascii
This API avoids a final call to _PyBytes_Resize() for output smaller than 512
bytes.
Small optimization: disable overallocation in binascii.rledecode_hqx() for the
last write.
Zachary Ware [Tue, 13 Oct 2015 04:31:44 +0000 (23:31 -0500)]
Closes #25093: Merge with 3.5
Zachary Ware [Tue, 13 Oct 2015 04:30:15 +0000 (23:30 -0500)]
Issue #25093: Merge with 3.4
Zachary Ware [Tue, 13 Oct 2015 04:27:58 +0000 (23:27 -0500)]
Issue #25093: Fix test_tcl's testloadWithUNC for paths with spaces
Patch by Serhiy Storchaka.
Victor Stinner [Mon, 12 Oct 2015 22:16:07 +0000 (00:16 +0200)]
Merge 3.5 (sys.setrecursionlimit)
Victor Stinner [Mon, 12 Oct 2015 22:11:21 +0000 (00:11 +0200)]
sys.setrecursionlimit() now raises RecursionError
Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
recursion limit is too low depending at the current recursion depth. Modify
also the "lower-water mark" formula to make it monotonic. This mark is used to
decide when the overflowed flag of the thread state is reset.
Victor Stinner [Mon, 12 Oct 2015 21:37:31 +0000 (23:37 +0200)]
Merge 3.5 (test_eintr)
Victor Stinner [Mon, 12 Oct 2015 21:37:02 +0000 (23:37 +0200)]
Issue #25277: Use a longer sleep in test_eintr to reduce the risk of race
condition in test_eintr.
Victor Stinner [Mon, 12 Oct 2015 20:36:57 +0000 (22:36 +0200)]
Issue #25353: Optimize unicode escape and raw unicode escape encoders to use
the new _PyBytesWriter API.
Victor Stinner [Mon, 12 Oct 2015 12:38:24 +0000 (14:38 +0200)]
Issue #24164: Fix test_pyclbr
Ignore pickle.partial symbol which comes from functools.partial.
Victor Stinner [Mon, 12 Oct 2015 11:57:47 +0000 (13:57 +0200)]
Fix compilation error in _PyBytesWriter_WriteBytes() on Windows
Victor Stinner [Mon, 12 Oct 2015 11:29:43 +0000 (13:29 +0200)]
Writer APIs: use empty string singletons
Modify _PyBytesWriter_Finish() and _PyUnicodeWriter_Finish() to return the
empty bytes/Unicode string if the string is empty.
Victor Stinner [Mon, 12 Oct 2015 11:12:54 +0000 (13:12 +0200)]
Relax _PyBytesWriter API
Don't require _PyBytesWriter pointer to be a "char *". Same change for
_PyBytesWriter_WriteBytes() parameter.
For example, binascii uses "unsigned char*".
Benjamin Peterson [Mon, 12 Oct 2015 06:03:47 +0000 (23:03 -0700)]
merge 3.5
Benjamin Peterson [Mon, 12 Oct 2015 06:03:41 +0000 (23:03 -0700)]
merge 3.4
Benjamin Peterson [Mon, 12 Oct 2015 06:03:22 +0000 (23:03 -0700)]
actually link to the version attributes documentation
Raymond Hettinger [Mon, 12 Oct 2015 05:52:54 +0000 (22:52 -0700)]
Minor fixup. maxlen is already known.
Raymond Hettinger [Mon, 12 Oct 2015 05:34:48 +0000 (22:34 -0700)]
Refactor the deque trim logic to eliminate the two separate trim functions.
Terry Jan Reedy [Mon, 12 Oct 2015 02:08:02 +0000 (22:08 -0400)]
Merge with 3.5
Terry Jan Reedy [Mon, 12 Oct 2015 02:07:48 +0000 (22:07 -0400)]
Merge with 3.4
Terry Jan Reedy [Mon, 12 Oct 2015 02:07:31 +0000 (22:07 -0400)]
Issue #22726: Re-activate config dialog help button with some content about
the other buttons and the new IDLE Dark theme.
Steve Dower [Mon, 12 Oct 2015 01:07:07 +0000 (18:07 -0700)]
Merge from 3.5
Steve Dower [Mon, 12 Oct 2015 01:06:55 +0000 (18:06 -0700)]
Keeps all-users launcher checkbox visible when the option cannot be changed.
Steve Dower [Mon, 12 Oct 2015 01:05:27 +0000 (18:05 -0700)]
Merge from 3.5
Steve Dower [Mon, 12 Oct 2015 01:05:11 +0000 (18:05 -0700)]
Only detects features from previous version when a bundle is found.
Otherwise, stray registry entries would cause issues.
Also fixes an accelerator collision and improves UAC icons when upgrading.
Steve Dower [Sun, 11 Oct 2015 23:40:52 +0000 (16:40 -0700)]
Issue #25143: Improves installer error messages for unsupported platforms.
Steve Dower [Sun, 11 Oct 2015 23:40:41 +0000 (16:40 -0700)]
Issue #25143: Improves installer error messages for unsupported platforms.
Steve Dower [Sun, 11 Oct 2015 22:37:36 +0000 (15:37 -0700)]
Issue #25163: Display correct directory in installer when using non-default settings.
Steve Dower [Sun, 11 Oct 2015 22:37:22 +0000 (15:37 -0700)]
Issue #25163: Display correct directory in installer when using non-default settings.
Steve Dower [Sun, 11 Oct 2015 22:16:21 +0000 (15:16 -0700)]
Issue #25361: Disables use of SSE2 instructions in Windows 32-bit build
Steve Dower [Sun, 11 Oct 2015 22:15:52 +0000 (15:15 -0700)]
Issue #25361: Disables use of SSE2 instructions in Windows 32-bit build
Raymond Hettinger [Sun, 11 Oct 2015 16:43:50 +0000 (09:43 -0700)]
Hoist the deque->maxlen lookup out of the inner-loop.
Serhiy Storchaka [Sun, 11 Oct 2015 14:52:09 +0000 (17:52 +0300)]
Issue #24164: Fixed test_descr: __getnewargs_ex__ now is supported in protocols 2 and 3.
Serhiy Storchaka [Sun, 11 Oct 2015 14:48:51 +0000 (17:48 +0300)]
No longer skip tests for classes with __getnewargs_ex__. The copy module
already supports reduce protocol 4 (issue #20289).
Serhiy Storchaka [Sun, 11 Oct 2015 14:48:28 +0000 (17:48 +0300)]
No longer skip tests for classes with __getnewargs_ex__. The copy module
already supports reduce protocol 4 (issue #20289).
Serhiy Storchaka [Sun, 11 Oct 2015 14:43:38 +0000 (17:43 +0300)]
Cleanup test_descr: remove C8 that is the same as C3.
Serhiy Storchaka [Sun, 11 Oct 2015 14:43:12 +0000 (17:43 +0300)]
Cleanup test_descr: remove C8 that is the same as C3.
Serhiy Storchaka [Sun, 11 Oct 2015 14:42:39 +0000 (17:42 +0300)]
Cleanup test_descr: remove C8 that is the same as C3.
Victor Stinner [Sun, 11 Oct 2015 09:01:02 +0000 (11:01 +0200)]
Issue #25357: Add an optional newline paramer to binascii.b2a_base64().
base64.b64encode() uses it to avoid a memory copy.
Victor Stinner [Sun, 11 Oct 2015 08:53:50 +0000 (10:53 +0200)]
Merge 3.5 (test_coroutines)
Victor Stinner [Sun, 11 Oct 2015 08:53:15 +0000 (10:53 +0200)]
Close #25367: Fix test_coroutines()
Fix usage of support.import_module('asyncio'): store the result in an 'asyncio'
variable.
Victor Stinner [Sun, 11 Oct 2015 08:40:27 +0000 (10:40 +0200)]
Null merge 3.5
Victor Stinner [Sun, 11 Oct 2015 08:39:56 +0000 (10:39 +0200)]
lose #25373: Fix regrtest --slow with interrupted test
Victor Stinner [Sun, 11 Oct 2015 08:37:25 +0000 (10:37 +0200)]
Close #25373: Fix regrtest --slow with interrupted test
* Fix accumulate_result(): don't use time on interrupted and failed test
* Add unit test for interrupted test
* Add unit test on --slow with interrupted test, with and without
multiprocessing
Victor Stinner [Sun, 11 Oct 2015 08:10:49 +0000 (10:10 +0200)]
Merge 3.5 (test_coroutines, issue #25367)
Victor Stinner [Sun, 11 Oct 2015 08:10:31 +0000 (10:10 +0200)]
Close #25367: Fix test_coroutines with no thread support
Skip test_asyncio_1() when the asyncio module cannot be imported because
CPython is compiled with no thread support.
Victor Stinner [Sun, 11 Oct 2015 08:04:26 +0000 (10:04 +0200)]
test_regrtest: catch stderr in test_nowindows()
Check also that the deprecation warning is emited.
Victor Stinner [Sun, 11 Oct 2015 08:03:28 +0000 (10:03 +0200)]
Close #25369: Fix test_regrtest without thread support
Victor Stinner [Sun, 11 Oct 2015 07:54:42 +0000 (09:54 +0200)]
Close #24784: Fix compilation without thread support
Add "#ifdef WITH_THREAD" around cals to:
* PyGILState_Check()
* _PyImport_AcquireLock()
* _PyImport_ReleaseLock()
Victor Stinner [Sun, 11 Oct 2015 07:54:42 +0000 (09:54 +0200)]
Close #24784: Fix compilation without thread support
Add "#ifdef WITH_THREAD" around cals to:
* PyGILState_Check()
* _PyImport_AcquireLock()
* _PyImport_ReleaseLock()
Victor Stinner [Sun, 11 Oct 2015 07:47:17 +0000 (09:47 +0200)]
Close #25368: Fix test_eintr when Python is compiled without thread support
Benjamin Peterson [Sun, 11 Oct 2015 06:24:53 +0000 (23:24 -0700)]
merge 3.5 (#25375)
Benjamin Peterson [Sun, 11 Oct 2015 06:24:39 +0000 (23:24 -0700)]
merge 3.4
Benjamin Peterson [Sun, 11 Oct 2015 06:23:55 +0000 (23:23 -0700)]
don't mention Python 2.2 (closes #25375)
Raymond Hettinger [Sun, 11 Oct 2015 03:56:02 +0000 (23:56 -0400)]
Minor tweak. Make the maxlen comparisons a little more clear and consistent.
Benjamin Peterson [Sun, 11 Oct 2015 02:36:51 +0000 (19:36 -0700)]
merge 3.5 (#25362)
Benjamin Peterson [Sun, 11 Oct 2015 02:36:40 +0000 (19:36 -0700)]
merge 3.4 (#25362)
Benjamin Peterson [Sun, 11 Oct 2015 02:34:46 +0000 (19:34 -0700)]
use the with statement for locking the internal condition (closes #25362)
Patch by Nir Soffer.
Benjamin Peterson [Sun, 11 Oct 2015 02:32:41 +0000 (19:32 -0700)]
merge 3.5 (#25371)
Benjamin Peterson [Sun, 11 Oct 2015 02:32:33 +0000 (19:32 -0700)]
merge 3.4 (#25371)
Benjamin Peterson [Sun, 11 Oct 2015 02:32:20 +0000 (19:32 -0700)]
add a missing comma (closes #25371)
Serhiy Storchaka [Sat, 10 Oct 2015 19:42:18 +0000 (22:42 +0300)]
Issue #24164: Objects that need calling ``__new__`` with keyword arguments,
can now be pickled using pickle protocols older than protocol version 4.
Serhiy Storchaka [Sat, 10 Oct 2015 17:27:52 +0000 (20:27 +0300)]
Null merge
Serhiy Storchaka [Sat, 10 Oct 2015 17:27:28 +0000 (20:27 +0300)]
Null merge
Serhiy Storchaka [Sat, 10 Oct 2015 17:26:16 +0000 (20:26 +0300)]
Correct Misc/NEWS.
Serhiy Storchaka [Sat, 10 Oct 2015 17:11:13 +0000 (20:11 +0300)]
Issue #25365: test_pickle now works in threads disabled builds.
Serhiy Storchaka [Sat, 10 Oct 2015 17:10:54 +0000 (20:10 +0300)]
Issue #25365: test_pickle now works in threads disabled builds.
Serhiy Storchaka [Sat, 10 Oct 2015 17:10:07 +0000 (20:10 +0300)]
Issue #25365: test_pickle now works in threads disabled builds.