summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
...
| * Version bump for Python 3.5.1rc1.v3.5.1rc1Larry Hastings2015-11-221-4/+4
| |
| * Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node whenVictor Stinner2015-11-061-2/+3
| | | | | | | | compiling AST from Python objects.
* | Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failureMartin Panter2015-11-301-0/+1
| |
* | Issue #25558: Use compile-time asserts.Serhiy Storchaka2015-11-071-0/+4
| |
* | Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node whenVictor Stinner2015-11-061-2/+3
| | | | | | | | compiling AST from Python objects.
* | Issue 25483: Add an opcode to make f-string formatting more robust.Eric V. Smith2015-11-032-0/+9
| |
* | Issue #25523: Merge a-to-an corrections from 3.5.Serhiy Storchaka2015-11-021-2/+2
|\ \ | |/
| * Issue #25523: Merge a-to-an corrections from 3.4.Serhiy Storchaka2015-11-021-2/+2
| |\
| | * Issue #25523: Further a-to-an corrections.Serhiy Storchaka2015-11-021-2/+2
| | |
* | | Issue #25523: Merge a-to-an corrections from 3.5Martin Panter2015-11-022-3/+3
|\ \ \ | |/ /
| * | Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5Martin Panter2015-11-022-3/+3
| |\ \ | | |/
| | * Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-022-3/+3
| | | | | | | | | | | | | | | | | | This changes the main documentation, doc strings, source code comments, and a couple error messages in the test suite. In some cases the word was removed or edited some other way to fix the grammar.
* | | Add _PyBytesWriter_Resize() functionVictor Stinner2015-10-141-1/+18
| | | | | | | | | | | | This function gives a control to the buffer size without using min_size.
* | | Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPIVictor Stinner2015-10-141-1/+2
| | | | | | | | | | | | | | | | | | | | | * 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
* | | Optimize bytes.fromhex() and bytearray.fromhex()Victor Stinner2015-10-142-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Optimize bytearray % argsVictor Stinner2015-10-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-141-4/+8
| | | | | | | | | | | | | | | Issue #25399: Add a new use_bytearray attribute to _PyBytesWriter to use a bytearray buffer, instead of using a bytes object.
* | | Merge 3.5 (sys.setrecursionlimit)Victor Stinner2015-10-121-3/+9
|\ \ \ | |/ /
| * | sys.setrecursionlimit() now raises RecursionErrorVictor Stinner2015-10-121-3/+9
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Relax _PyBytesWriter APIVictor Stinner2015-10-121-7/+7
| | | | | | | | | | | | | | | | | | | | | Don't require _PyBytesWriter pointer to be a "char *". Same change for _PyBytesWriter_WriteBytes() parameter. For example, binascii uses "unsigned char*".
* | | Issue #25349: Optimize bytes % intVictor Stinner2015-10-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Optimize bytes.__mod__(args) for integere formats: %d (%i, %u), %o, %x and %X. _PyBytesWriter is now used to format directly the integer into the writer buffer, instead of using a temporary bytes object. Formatting is between 30% and 50% faster on a microbenchmark.
* | | Add _PyBytesWriter_WriteBytes() to factorize the codeVictor Stinner2015-10-091-0/+7
| | |
* | | _PyBytesWriter: rename size attribute to min_sizeVictor Stinner2015-10-091-2/+3
| | |
* | | Issue #25318: cleanup code _PyBytesWriterVictor Stinner2015-10-091-2/+2
| | | | | | | | | | | | | | | | | | Rename "stack buffer" to "small buffer". Add also an assertion in _PyBytesWriter_GetPos().
* | | Issue #25318: Move _PyBytesWriter to bytesobject.cVictor Stinner2015-10-081-0/+52
| | | | | | | | | | | | Declare also the private API in bytesobject.h.
* | | Issue #25318: Add _PyBytesWriter APIVictor Stinner2015-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new private API to optimize Unicode encoders. It uses a small buffer allocated on the stack and supports overallocation. Use _PyBytesWriter API for UCS1 (ASCII and Latin1) and UTF-8 encoders. Enable overallocation for the UTF-8 encoder with error handlers. unicode_encode_ucs1(): initialize collend to collstart+1 to not check the current character twice, we already know that it is not ASCII.
* | | Issue #24483: C implementation of functools.lru_cache() now calculates key'sSerhiy Storchaka2015-10-021-0/+4
|\ \ \ | |/ / | | | | | | hash only once.
| * | Issue #24483: C implementation of functools.lru_cache() now calculates key'sSerhiy Storchaka2015-10-021-0/+4
| | | | | | | | | | | | hash only once.
* | | Issue #24870: Add _PyUnicodeWriter_PrepareKind() macroVictor Stinner2015-09-211-0/+17
| | | | | | | | | | | | Add a macro which ensures that the writer has at least the requested kind.
* | | Issue #24965: Implement PEP 498 "Literal String Interpolation". ↵Eric V. Smith2015-09-191-3/+20
| | | | | | | | | | | | Documentation is still needed, I'll open an issue for that.
* | | Merge 3.5Victor Stinner2015-09-182-16/+7
|\ \ \ | |/ /
| * | Issue #25150: Hide the private _Py_atomic_xxx symbols from the publicVictor Stinner2015-09-182-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Python.h header to fix a compilation error with OpenMP. PyThreadState_GET() becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies. It is important that the _PyThreadState_Current variable is always accessed with the same implementation of pyatomic.h. Use the PyThreadState_Get() function so extension modules will all reuse the same implementation.
| * | Issue #25155: Add _PyTime_AsTimevalTime_t() functionVictor Stinner2015-09-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the tv_sec field of the timeval structure has the type C long, whereas it has the type C time_t on all other platforms. A C long has a size of 32 bits (signed inter, 1 bit for the sign, 31 bits for the value) which is not enough to store an Epoch timestamp after the year 2038. Add the _PyTime_AsTimevalTime_t() function written for datetime.datetime.now(): convert a _PyTime_t timestamp to a (secs, us) tuple where secs type is time_t. It allows to support dates after the year 2038 on Windows. Enhance also _PyTime_AsTimeval_impl() to detect overflow on the number of seconds when rounding the number of microseconds.
| * | Merge release engineering work from Python 3.5.0.Larry Hastings2015-09-131-3/+3
| |\ \
| | * | Post-release updates for Python 3.5.0.Larry Hastings2015-09-131-1/+1
| | | |
| | * | Version bump for Python 3.5.0 final.Larry Hastings2015-09-121-3/+3
| | | |
| * | | Merge Python 3.5.0rc4 back to hg.python.org.Larry Hastings2015-09-091-2/+2
| |\ \ \ | | |/ /
| | * | Post-release update for Python 3.5.0rc4.Larry Hastings2015-09-091-1/+1
| | | |
| | * | Version bump for Python 3.5.0rc4.v3.5.0rc4Larry Hastings2015-09-091-2/+2
| | | |
| * | | Merge heads.Larry Hastings2015-09-071-1/+2
| |\ \ \ | | |/ / | |/| |
| * | | Version bump for Python 3.5.0rc3.v3.5.0rc3Larry Hastings2015-09-071-2/+2
| | | |
* | | | Issue #25155: Add _PyTime_AsTimevalTime_t() functionVictor Stinner2015-09-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the tv_sec field of the timeval structure has the type C long, whereas it has the type C time_t on all other platforms. A C long has a size of 32 bits (signed inter, 1 bit for the sign, 31 bits for the value) which is not enough to store an Epoch timestamp after the year 2038. Add the _PyTime_AsTimevalTime_t() function written for datetime.datetime.now(): convert a _PyTime_t timestamp to a (secs, us) tuple where secs type is time_t. It allows to support dates after the year 2038 on Windows. Enhance also _PyTime_AsTimeval_impl() to detect overflow on the number of seconds when rounding the number of microseconds.
* | | | Make _PyTime_RoundHalfEven() private againVictor Stinner2015-09-091-5/+0
| | | |
* | | | Issue #23517: fromtimestamp() and utcfromtimestamp() methods ofVictor Stinner2015-09-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | datetime.datetime now round microseconds to nearest with ties going to nearest even integer (ROUND_HALF_EVEN), as round(float), instead of rounding towards -Infinity (ROUND_FLOOR). pytime API: replace _PyTime_ROUND_HALF_UP with _PyTime_ROUND_HALF_EVEN. Fix also _PyTime_Divide() for negative numbers. _PyTime_AsTimeval_impl() now reuses _PyTime_Divide() instead of reimplementing rounding modes.
* | | | Issue #23517: datetime.timedelta constructor now rounds microseconds to nearestVictor Stinner2015-09-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | with ties going away from zero (ROUND_HALF_UP), as Python 2 and Python older than 3.3, instead of rounding to nearest with ties going to nearest even integer (ROUND_HALF_EVEN).
* | | | Issue #23517: Add "half up" rounding mode to the _PyTime APIVictor Stinner2015-09-011-1/+4
| | | |
* | | | Merge 3.5Yury Selivanov2015-08-261-1/+2
|\ \ \ \ | | |/ / | |/| |
| * | | docs: Better comment for tp_as_async slotYury Selivanov2015-08-261-1/+2
| |/ /
| * | Post-release updates for Python 3.5.0rc2.Larry Hastings2015-08-251-1/+1
| | |
| * | Version bump for Python 3.5.0rc2.v3.5.0rc2Larry Hastings2015-08-251-2/+2
| | |