Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPI | Victor Stinner | 2015-10-14 | 2 | -59/+75 |
| | | | | | | | * 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 | ||||
* | Fix compiler warnings (uninitialized variables), false alarms in fact | Victor Stinner | 2015-10-14 | 1 | -4/+2 |
| | |||||
* | _PyBytesWriter_Alloc(): only use 10 bytes of the small buffer in debug mode to | Victor Stinner | 2015-10-14 | 1 | -1/+13 |
| | | | | enhance code to detect buffer under- and overflow. | ||||
* | Issue #25401: Remove now unused hex_digit_to_int() function | Victor Stinner | 2015-10-14 | 1 | -16/+0 |
| | |||||
* | Optimize bytes.fromhex() and bytearray.fromhex() | Victor Stinner | 2015-10-14 | 7 | -95/+101 |
| | | | | | | | | | | | | 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 | ||||
* | Document latest optimizations using _PyBytesWriter | Victor Stinner | 2015-10-14 | 2 | -4/+17 |
| | |||||
* | Optimize bytearray % args | Victor Stinner | 2015-10-14 | 3 | -36/+33 |
| | | | | | | | | | | | | | | 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. | ||||
* | Add use_bytearray attribute to _PyBytesWriter | Victor Stinner | 2015-10-14 | 2 | -32/+73 |
| | | | | | Issue #25399: Add a new use_bytearray attribute to _PyBytesWriter to use a bytearray buffer, instead of using a bytes object. | ||||
* | Fix long_format_binary() | Victor Stinner | 2015-10-14 | 1 | -1/+1 |
| | | | | Issue #25399: Fix long_format_binary(), allocate bytes for the bytes writer. | ||||
* | Merge with 3.5 | Terry Jan Reedy | 2015-10-14 | 1 | -1/+1 |
|\ | |||||
| * | Merge with 3.4 | Terry Jan Reedy | 2015-10-14 | 1 | -1/+1 |
| |\ | |||||
| | * | Issue #24782: whitespace | Terry Jan Reedy | 2015-10-14 | 1 | -1/+1 |
| | | | |||||
* | | | Merge with 3.5 | Terry Jan Reedy | 2015-10-14 | 6 | -208/+154 |
|\ \ \ | |/ / | |||||
| * | | Merge with 3.4 | Terry Jan Reedy | 2015-10-14 | 6 | -208/+154 |
| |\ \ | | |/ | |||||
| | * | Issue #24782: Finish converting the Configure Extension dialog into a new | Terry Jan Reedy | 2015-10-14 | 6 | -208/+154 |
| | | | | | | | | | | | | tab in the IDLE Preferences dialog. Code patch by Mark Roseman. | ||||
* | | | Fix test_bytes on Windows | Victor Stinner | 2015-10-14 | 1 | -4/+7 |
| | | | | | | | | | | | | | | | On Windows, sprintf("%p", 0xabcdef) formats hexadecimal in uppercase and pad to 16 characters (on 64-bit system) with zeros. | ||||
* | | | Rewrite PyBytes_FromFormatV() using _PyBytesWriter API | Victor Stinner | 2015-10-13 | 2 | -183/+245 |
| | | | | | | | | | | | | | | | | | | | | | * 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 | ||||
* | | | Issue #24164: Document changes to __getnewargs__ and __getnewargs_ex__. | Serhiy Storchaka | 2015-10-13 | 1 | -6/+13 |
| | | | |||||
* | | | Issue #25382: pickletools.dis() now outputs implicit memo index for the | Serhiy Storchaka | 2015-10-13 | 2 | -0/+4 |
| | | | | | | | | | | | | MEMOIZE opcode. | ||||
* | | | Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in | Serhiy Storchaka | 2015-10-13 | 2 | -1/+4 |
|\ \ \ | |/ / | | | | | | | pickletools.opcodes. | ||||
| * | | Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in | Serhiy Storchaka | 2015-10-13 | 2 | -1/+4 |
| |\ \ | | |/ | | | | | | | pickletools.opcodes. | ||||
| | * | Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in | Serhiy Storchaka | 2015-10-13 | 2 | -1/+4 |
| | | | | | | | | | | | | pickletools.opcodes. | ||||
* | | | Issue #25384: Use _PyBytesWriter API in binascii | Victor Stinner | 2015-10-13 | 1 | -111/+83 |
| | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | | | Closes #25093: Merge with 3.5 | Zachary Ware | 2015-10-13 | 1 | -4/+4 |
|\ \ \ | |/ / | |||||
| * | | Issue #25093: Merge with 3.4 | Zachary Ware | 2015-10-13 | 1 | -4/+4 |
| |\ \ | | |/ | |||||
| | * | Issue #25093: Fix test_tcl's testloadWithUNC for paths with spaces | Zachary Ware | 2015-10-13 | 1 | -4/+4 |
| | | | | | | | | | | | | Patch by Serhiy Storchaka. | ||||
* | | | Merge 3.5 (sys.setrecursionlimit) | Victor Stinner | 2015-10-12 | 6 | -16/+102 |
|\ \ \ | |/ / | |||||
| * | | sys.setrecursionlimit() now raises RecursionError | Victor Stinner | 2015-10-12 | 6 | -13/+102 |
| | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | | | Merge 3.5 (test_eintr) | Victor Stinner | 2015-10-12 | 1 | -5/+5 |
|\ \ \ | |/ / | |||||
| * | | Issue #25277: Use a longer sleep in test_eintr to reduce the risk of race | Victor Stinner | 2015-10-12 | 1 | -5/+5 |
| | | | | | | | | | | | | condition in test_eintr. | ||||
* | | | Issue #25353: Optimize unicode escape and raw unicode escape encoders to use | Victor Stinner | 2015-10-12 | 2 | -64/+93 |
| | | | | | | | | | | | | the new _PyBytesWriter API. | ||||
* | | | Issue #24164: Fix test_pyclbr | Victor Stinner | 2015-10-12 | 1 | -1/+1 |
| | | | | | | | | | | | | Ignore pickle.partial symbol which comes from functools.partial. | ||||
* | | | Fix compilation error in _PyBytesWriter_WriteBytes() on Windows | Victor Stinner | 2015-10-12 | 1 | -1/+3 |
| | | | |||||
* | | | Writer APIs: use empty string singletons | Victor Stinner | 2015-10-12 | 2 | -18/+32 |
| | | | | | | | | | | | | | | | Modify _PyBytesWriter_Finish() and _PyUnicodeWriter_Finish() to return the empty bytes/Unicode string if the string is empty. | ||||
* | | | Relax _PyBytesWriter API | Victor Stinner | 2015-10-12 | 2 | -15/+14 |
| | | | | | | | | | | | | | | | | | | | | | Don't require _PyBytesWriter pointer to be a "char *". Same change for _PyBytesWriter_WriteBytes() parameter. For example, binascii uses "unsigned char*". | ||||
* | | | merge 3.5 | Benjamin Peterson | 2015-10-12 | 1 | -2/+2 |
|\ \ \ | |/ / | |||||
| * | | merge 3.4 | Benjamin Peterson | 2015-10-12 | 1 | -2/+2 |
| |\ \ | | |/ | |||||
| | * | actually link to the version attributes documentation | Benjamin Peterson | 2015-10-12 | 1 | -2/+2 |
| | | | |||||
* | | | Minor fixup. maxlen is already known. | Raymond Hettinger | 2015-10-12 | 1 | -2/+2 |
| | | | |||||
* | | | Refactor the deque trim logic to eliminate the two separate trim functions. | Raymond Hettinger | 2015-10-12 | 1 | -25/+14 |
| | | | |||||
* | | | Merge with 3.5 | Terry Jan Reedy | 2015-10-12 | 2 | -20/+33 |
|\ \ \ | |/ / | |||||
| * | | Merge with 3.4 | Terry Jan Reedy | 2015-10-12 | 2 | -20/+33 |
| |\ \ | | |/ | |||||
| | * | Issue #22726: Re-activate config dialog help button with some content about | Terry Jan Reedy | 2015-10-12 | 2 | -20/+33 |
| | | | | | | | | | | | | the other buttons and the new IDLE Dark theme. | ||||
* | | | Merge from 3.5 | Steve Dower | 2015-10-12 | 1 | -2/+2 |
|\ \ \ | |/ / | |||||
| * | | Keeps all-users launcher checkbox visible when the option cannot be changed. | Steve Dower | 2015-10-12 | 1 | -2/+2 |
| | | | |||||
* | | | Merge from 3.5 | Steve Dower | 2015-10-12 | 3 | -3/+16 |
|\ \ \ | |/ / | |||||
| * | | Only detects features from previous version when a bundle is found. | Steve Dower | 2015-10-12 | 3 | -3/+16 |
| | | | | | | | | | | | | | | | Otherwise, stray registry entries would cause issues. Also fixes an accelerator collision and improves UAC icons when upgrading. | ||||
* | | | Issue #25143: Improves installer error messages for unsupported platforms. | Steve Dower | 2015-10-11 | 5 | -1/+46 |
|\ \ \ | |/ / | |||||
| * | | Issue #25143: Improves installer error messages for unsupported platforms. | Steve Dower | 2015-10-11 | 5 | -1/+46 |
| | | | |||||
* | | | Issue #25163: Display correct directory in installer when using non-default ↵ | Steve Dower | 2015-10-11 | 4 | -24/+41 |
|\ \ \ | |/ / | | | | | | | settings. |