summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPIVictor Stinner2015-10-142-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 factVictor Stinner2015-10-141-4/+2
|
* _PyBytesWriter_Alloc(): only use 10 bytes of the small buffer in debug mode toVictor Stinner2015-10-141-1/+13
| | | | enhance code to detect buffer under- and overflow.
* Issue #25401: Remove now unused hex_digit_to_int() functionVictor Stinner2015-10-141-16/+0
|
* Optimize bytes.fromhex() and bytearray.fromhex()Victor Stinner2015-10-147-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 _PyBytesWriterVictor Stinner2015-10-142-4/+17
|
* Optimize bytearray % argsVictor Stinner2015-10-143-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 _PyBytesWriterVictor Stinner2015-10-142-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 Stinner2015-10-141-1/+1
| | | | Issue #25399: Fix long_format_binary(), allocate bytes for the bytes writer.
* Merge with 3.5Terry Jan Reedy2015-10-141-1/+1
|\
| * Merge with 3.4Terry Jan Reedy2015-10-141-1/+1
| |\
| | * Issue #24782: whitespaceTerry Jan Reedy2015-10-141-1/+1
| | |
* | | Merge with 3.5Terry Jan Reedy2015-10-146-208/+154
|\ \ \ | |/ /
| * | Merge with 3.4Terry Jan Reedy2015-10-146-208/+154
| |\ \ | | |/
| | * Issue #24782: Finish converting the Configure Extension dialog into a newTerry Jan Reedy2015-10-146-208/+154
| | | | | | | | | | | | tab in the IDLE Preferences dialog. Code patch by Mark Roseman.
* | | Fix test_bytes on WindowsVictor Stinner2015-10-141-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 APIVictor Stinner2015-10-132-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 Storchaka2015-10-131-6/+13
| | |
* | | Issue #25382: pickletools.dis() now outputs implicit memo index for theSerhiy Storchaka2015-10-132-0/+4
| | | | | | | | | | | | MEMOIZE opcode.
* | | Issue #25380: Fixed protocol for the STACK_GLOBAL opcode inSerhiy Storchaka2015-10-132-1/+4
|\ \ \ | |/ / | | | | | | pickletools.opcodes.
| * | Issue #25380: Fixed protocol for the STACK_GLOBAL opcode inSerhiy Storchaka2015-10-132-1/+4
| |\ \ | | |/ | | | | | | pickletools.opcodes.
| | * Issue #25380: Fixed protocol for the STACK_GLOBAL opcode inSerhiy Storchaka2015-10-132-1/+4
| | | | | | | | | | | | pickletools.opcodes.
* | | Issue #25384: Use _PyBytesWriter API in binasciiVictor Stinner2015-10-131-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.5Zachary Ware2015-10-131-4/+4
|\ \ \ | |/ /
| * | Issue #25093: Merge with 3.4Zachary Ware2015-10-131-4/+4
| |\ \ | | |/
| | * Issue #25093: Fix test_tcl's testloadWithUNC for paths with spacesZachary Ware2015-10-131-4/+4
| | | | | | | | | | | | Patch by Serhiy Storchaka.
* | | Merge 3.5 (sys.setrecursionlimit)Victor Stinner2015-10-126-16/+102
|\ \ \ | |/ /
| * | sys.setrecursionlimit() now raises RecursionErrorVictor Stinner2015-10-126-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 Stinner2015-10-121-5/+5
|\ \ \ | |/ /
| * | Issue #25277: Use a longer sleep in test_eintr to reduce the risk of raceVictor Stinner2015-10-121-5/+5
| | | | | | | | | | | | condition in test_eintr.
* | | Issue #25353: Optimize unicode escape and raw unicode escape encoders to useVictor Stinner2015-10-122-64/+93
| | | | | | | | | | | | the new _PyBytesWriter API.
* | | Issue #24164: Fix test_pyclbrVictor Stinner2015-10-121-1/+1
| | | | | | | | | | | | Ignore pickle.partial symbol which comes from functools.partial.
* | | Fix compilation error in _PyBytesWriter_WriteBytes() on WindowsVictor Stinner2015-10-121-1/+3
| | |
* | | Writer APIs: use empty string singletonsVictor Stinner2015-10-122-18/+32
| | | | | | | | | | | | | | | Modify _PyBytesWriter_Finish() and _PyUnicodeWriter_Finish() to return the empty bytes/Unicode string if the string is empty.
* | | Relax _PyBytesWriter APIVictor Stinner2015-10-122-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.5Benjamin Peterson2015-10-121-2/+2
|\ \ \ | |/ /
| * | merge 3.4Benjamin Peterson2015-10-121-2/+2
| |\ \ | | |/
| | * actually link to the version attributes documentationBenjamin Peterson2015-10-121-2/+2
| | |
* | | Minor fixup. maxlen is already known.Raymond Hettinger2015-10-121-2/+2
| | |
* | | Refactor the deque trim logic to eliminate the two separate trim functions.Raymond Hettinger2015-10-121-25/+14
| | |
* | | Merge with 3.5Terry Jan Reedy2015-10-122-20/+33
|\ \ \ | |/ /
| * | Merge with 3.4Terry Jan Reedy2015-10-122-20/+33
| |\ \ | | |/
| | * Issue #22726: Re-activate config dialog help button with some content aboutTerry Jan Reedy2015-10-122-20/+33
| | | | | | | | | | | | the other buttons and the new IDLE Dark theme.
* | | Merge from 3.5Steve Dower2015-10-121-2/+2
|\ \ \ | |/ /
| * | Keeps all-users launcher checkbox visible when the option cannot be changed.Steve Dower2015-10-121-2/+2
| | |
* | | Merge from 3.5Steve Dower2015-10-123-3/+16
|\ \ \ | |/ /
| * | Only detects features from previous version when a bundle is found.Steve Dower2015-10-123-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 Dower2015-10-115-1/+46
|\ \ \ | |/ /
| * | Issue #25143: Improves installer error messages for unsupported platforms.Steve Dower2015-10-115-1/+46
| | |
* | | Issue #25163: Display correct directory in installer when using non-default ↵Steve Dower2015-10-114-24/+41
|\ \ \ | |/ / | | | | | | settings.