Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | closes bpo-34868: Improve error message with '_' is combined with an invalid ↵ | Benjamin Peterson | 2018-10-02 | 1 | -8/+9 |
| | | | | type specifier. (GH-9666) | ||||
* | bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) | Victor Stinner | 2018-01-15 | 1 | -11/+4 |
| | | | | | | | | * Add _Py_GetLocaleconvNumeric() function: decode decimal_point and thousands_sep fields of localeconv() from the LC_NUMERIC encoding, rather than decoding from the LC_CTYPE encoding. * Modify locale.localeconv() and "n" formatter of str.format() (for int, float and complex to use _Py_GetLocaleconvNumeric() internally. | ||||
* | bpo-31780: Fix incorrect error message for ',x', ',b', ',o' specs (#4002) | Dargor | 2017-10-15 | 1 | -2/+2 |
| | | | Patch by Pablo. | ||||
* | bpo-31338 (#3374) | Barry Warsaw | 2017-09-15 | 1 | -5/+2 |
| | | | | | | | * Add Py_UNREACHABLE() as an alias to abort(). * Use Py_UNREACHABLE() instead of assert(0) * Convert more unreachable code to use Py_UNREACHABLE() * Document Py_UNREACHABLE() and a few other macros. | ||||
* | bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. ↵ | Stefan Krah | 2017-08-21 | 1 | -0/+1 |
| | | | | (#3157) | ||||
* | merge 3.5 (#28119) | Benjamin Peterson | 2016-09-14 | 1 | -22/+14 |
|\ | |||||
| * | improve type-safe of and prevent double-frees in get_locale_info (#28119) | Benjamin Peterson | 2016-09-14 | 1 | -17/+9 |
| | | |||||
| * | Issue #27895: Spelling fixes (Contributed by Ville Skyttä). | Martin Panter | 2016-09-07 | 1 | -1/+1 |
| | | |||||
* | | make invalid_comma_and_underscore a real prototype | Benjamin Peterson | 2016-09-10 | 1 | -1/+1 |
| | | |||||
* | | Issue 27080: PEP 515: add '_' formatting option. | Eric V. Smith | 2016-09-10 | 1 | -21/+51 |
| | | |||||
* | | Issue #27895: Spelling fixes (Contributed by Ville Skyttä). | Raymond Hettinger | 2016-08-30 | 1 | -1/+1 |
| | | |||||
* | | Issue #27818: Speed up parsing width and precision in format() strings for | Serhiy Storchaka | 2016-08-29 | 1 | -9/+16 |
| | | | | | | | | numbers. Patch by Stefan Behnel. | ||||
* | | Merge typo fixes from 3.5 | Martin Panter | 2016-05-08 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Corrections for a/an in code comments and documentation | Martin Panter | 2016-05-08 | 1 | -2/+2 |
| | | |||||
* | | Issue #25923: Added the const qualifier to static constant arrays. | Serhiy Storchaka | 2015-12-25 | 1 | -1/+1 |
|/ | |||||
* | Close issue #8931: Make alternate formatting for 'c' raise an exception. ↵ | Eric V. Smith | 2014-04-16 | 1 | -0/+7 |
| | | | | Patch by Torsten Landschoff. | ||||
* | Issue #12546: Allow \x00 as a fill character for builtin type __format__ ↵ | Eric V. Smith | 2014-04-14 | 1 | -11/+8 |
| | | | | methods. | ||||
* | Add _PyUnicodeWriter_WriteASCIIString() function | Victor Stinner | 2013-11-19 | 1 | -9/+9 |
| | |||||
* | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -2/+1 |
|\ | | | | | | | error messages and comments. | ||||
| * | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -2/+1 |
| | | | | | | | | error messages and comments. | ||||
* | | Issue #9566: Fix a compiler warning on Windows x64 | Victor Stinner | 2013-06-24 | 1 | -4/+2 |
| | | |||||
* | | (Merge 3.3) Issue #18137: Detect integer overflow on precision in | Victor Stinner | 2013-06-23 | 1 | -2/+14 |
|\ \ | |/ | | | | | float.__format__() and complex.__format__(). | ||||
| * | Issue #18137: Detect integer overflow on precision in float.__format__() and | Victor Stinner | 2013-06-23 | 1 | -2/+14 |
| | | | | | | | | complex.__format__(). | ||||
* | | Fix a compilater warning on Windows 64-bit | Victor Stinner | 2013-05-16 | 1 | -1/+1 |
| | | |||||
* | | Fix a compiler warning: use unsigned int type instead of enum PyUnicode_Kind to | Victor Stinner | 2013-05-07 | 1 | -1/+1 |
| | | | | | | | | compare two Unicode kinds | ||||
* | | Close #16757: Avoid calling the expensive _PyUnicode_FindMaxChar() function | Victor Stinner | 2013-04-03 | 1 | -1/+5 |
| | | | | | | | | when possible | ||||
* | | Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵ | Antoine Pitrou | 2013-02-09 | 1 | -1/+1 |
|\ \ | |/ | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag), mpdecimal (needs to build without Python.h). | ||||
| * | Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵ | Antoine Pitrou | 2013-02-09 | 1 | -1/+1 |
| |\ | | | | | | | | | | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag), mpdecimal (needs to build without Python.h). | ||||
* | | | Issue #15609: Optimize str%args for integer argument | Victor Stinner | 2012-10-01 | 1 | -1/+2 |
|/ / | | | | | | | | | | | | | | | | | | | - Use _PyLong_FormatWriter() instead of formatlong() when possible, to avoid a temporary buffer - Enable the fast path when width is smaller or equals to the length, and when the precision is bigger or equals to the length - Add unit tests! - formatlong() uses PyUnicode_Resize() instead of _PyUnicode_FromASCII() to resize the output string | ||||
* | | After the jump in line 1051 unicode_tmp is NULL. Found by Coverity. | Stefan Krah | 2012-09-06 | 1 | -1/+1 |
| | | |||||
* | | Remove now unused IntOrLongToString type | Victor Stinner | 2012-08-09 | 1 | -3/+0 |
| | | |||||
* | | Comment out a dead increment. | Brett Cannon | 2012-06-25 | 1 | -1/+1 |
| | | | | | | | | Found by Clang's static analyzer. | ||||
* | | format_obj: make it static | doko@ubuntu.com | 2012-06-21 | 1 | -1/+1 |
| | | |||||
* | | Optimize _PyUnicode_FastCopyCharacters() when maxchar(from) > maxchar(to) | Victor Stinner | 2012-06-16 | 1 | -2/+4 |
| | | |||||
* | | Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args ↵ | Victor Stinner | 2012-05-29 | 1 | -194/+218 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and str.format(args) * Formatting string, int, float and complex use the _PyUnicodeWriter API. It avoids a temporary buffer in most cases. * Add _PyUnicodeWriter_WriteStr() to restore the PyAccu optimization: just keep a reference to the string if the output is only composed of one string * Disable overallocation when formatting the last argument of str%args and str.format(args) * Overallocation allocates at least 100 characters: add min_length attribute to the _PyUnicodeWriter structure * Add new private functions: _PyUnicode_FastCopyCharacters(), _PyUnicode_FastFill() and _PyUnicode_FromASCII() The speed up is around 20% in average. | ||||
* | | Close #14648: Compute correctly maxchar in str.format() for substrin | Victor Stinner | 2012-04-23 | 1 | -4/+2 |
| | | |||||
* | | inherit maxchar of field value where needed (closes #14648) | Benjamin Peterson | 2012-04-23 | 1 | -0/+3 |
| | | |||||
* | | Issue #13706: Fix format(float, "n") for locale with non-ASCII decimal point ↵ | Victor Stinner | 2012-02-24 | 1 | -9/+6 |
| | | | | | | | | (e.g. ps_aF) | ||||
* | | Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separator | Victor Stinner | 2012-02-23 | 1 | -53/+89 |
| | | | | | | | | | | | | | | | | | | | | | | * Decode thousands separator and decimal point using PyUnicode_DecodeLocale() (from the locale encoding), instead of decoding them implicitly from latin1 * Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used * Change _PyUnicode_InsertThousandsGrouping() API to return the maximum character if unicode is NULL * Replace MIN/MAX macros by Py_MIN/Py_MAX * stringlib/undef.h undefines STRINGLIB_IS_UNICODE * stringlib/localeutil.h only supports Unicode | ||||
* | | Issue #13706: Add assertions to detect bugs earlier | Victor Stinner | 2012-01-31 | 1 | -3/+9 |
| | | |||||
* | | Silence last compilation warning. | Amaury Forgeot d'Arc | 2012-01-23 | 1 | -1/+1 |
| | | |||||
* | | Fix compilation warnings (seen on win32 buildbot) | Amaury Forgeot d'Arc | 2012-01-23 | 1 | -4/+4 |
| | | |||||
* | | Issue #13706: Support non-ASCII fill characters | Victor Stinner | 2012-01-21 | 1 | -15/+19 |
| | | |||||
* | | Improve exception text. Closes issue 13811. | Eric V. Smith | 2012-01-20 | 1 | -2/+2 |
| | | |||||
* | | remove some usage of Py_UNICODE_TOUPPER/LOWER | Benjamin Peterson | 2012-01-12 | 1 | -11/+16 |
| | | |||||
* | | Add a new PyUnicode_Fill() function | Victor Stinner | 2012-01-03 | 1 | -15/+6 |
| | | | | | | | | | | It is faster than the unicode_fill() function which was implemented in formatter_unicode.c. | ||||
* | | Issue #9530: Fix undefined behaviour due to signed overflow in ↵ | Mark Dickinson | 2011-12-01 | 1 | -9/+7 |
| | | | | | | | | Python/formatter_unicode.c. | ||||
* | | Fix misuse of PyUnicode_GET_SIZE, use PyUnicode_GET_LENGTH instead | Victor Stinner | 2011-10-11 | 1 | -1/+1 |
| | | |||||
* | | Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE. | Martin v. Löwis | 2011-10-07 | 1 | -2/+2 |
| | | |||||
* | | Don't check for the maximum character when copying from unicodeobject.c | Victor Stinner | 2011-10-05 | 1 | -9/+7 |
| | | | | | | | | | | | | | | | | * Create copy_characters() function which doesn't check for the maximum character in release mode * _PyUnicode_CheckConsistency() is no more static to be able to use it in _PyUnicode_FormatAdvanced() (in formatter_unicode.c) * _PyUnicode_CheckConsistency() checks the string hash |