summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Issue #26304: Change "allows to <verb>" to "allows <verb>ing" or similarMartin Panter2016-02-101-1/+1
| | | | | The original form is incorrect grammar and feels awkward, even though the meaning is clear.
* code_richcompare() now uses the constants typesVictor Stinner2016-01-221-1/+10
| | | | | | | | | Issue #25843: When compiling code, don't merge constants if they are equal but have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now correctly compiled to two different functions: f1() returns 1 (int) and f2() returns 1.0 (int), even if 1 and 1.0 are equal. Add a new _PyCode_ConstantKey() private function.
* issue25909 - Correct the documentation of PyMapping_Items, PyMapping_Keys andSenthil Kumaran2016-01-211-7/+7
| | | | | | PyMapping_Values in Include/abstract.h and Doc/c-api/mapping.rst. Patch contributed by Sonali Gupta.
* Add _PyThreadState_UncheckedGet()Victor Stinner2016-01-201-0/+10
| | | | | | | | | | | | | | | | | | | Issue #26154: Add a new private _PyThreadState_UncheckedGet() function which gets the current thread state, but don't call Py_FatalError() if it is NULL. Python 3.5.1 removed the _PyThreadState_Current symbol from the Python C API to no more expose complex and private atomic types. Atomic types depends on the compiler or can even depend on compiler options. The new function _PyThreadState_UncheckedGet() allows to get the variable value without having to care of the exact implementation of atomic types. Changes: * Replace direct usage of the _PyThreadState_Current variable with a call to _PyThreadState_UncheckedGet(). * In pystate.c, replace direct usage of the _PyThreadState_Current variable with the PyThreadState_GET() macro for readability. * Document also PyThreadState_Get() in pystate.h
* Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-0/+26
| | | | macro Py_SETREF.
* Issue #25914: Fixed and simplified OrderedDict.__sizeof__.Serhiy Storchaka2015-12-221-1/+1
|
* Issue #25701: Document C API functions that both set and delete objectsMartin Panter2015-12-081-10/+10
| | | | | | Also document that the separate functions that delete objects are preferred; using PyObject_SetAttr(), _SetAttrString(), and PySequence_SetItem() to delete is deprecated.
* Post-release fixups for Python 3.5.1.Larry Hastings2015-12-071-1/+1
|
* Version bump for 3.5.1 final.v3.5.1Larry Hastings2015-12-061-3/+3
|
* Post-release updates for Python 3.5.1rc1.Larry Hastings2015-11-231-1/+1
|
* 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 #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" 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.
| * #21167: Fix definition of NAN when ICC used without -fp-model strict.R David Murray2015-08-131-1/+23
| | | | | | | | Patch from Chris Hogan of Intel, reviewed by Mark Dickinson.
* | 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.
* | Issue #24483: C implementation of functools.lru_cache() now calculates key'sSerhiy Storchaka2015-10-021-0/+4
| | | | | | | | hash only once.
* | 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
|\ \ \ | |/ / |/| |
| * | docs: Better comment for tp_as_async slotYury Selivanov2015-08-261-1/+2
| | |
* | | Version bump for Python 3.5.0rc3.v3.5.0rc3Larry Hastings2015-09-071-2/+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
| |
* | #21167: Fix definition of NAN when ICC used without -fp-model strict.R David Murray2015-08-151-1/+23
| | | | | | | | Patch from Chris Hogan of Intel, reviewed by Mark Dickinson.
* | Post-release bump for Python 3.5.0rc1.Larry Hastings2015-08-111-1/+1
| |
* | Release bump for Python 3.5.0rc1.Larry Hastings2015-08-091-3/+3
| |
* | Post-release updates for Python 3.5.0b4.Larry Hastings2015-07-261-1/+1
| |
* | Version bump for Python 3.5.0b4.v3.5.0b4Larry Hastings2015-07-251-2/+2
| |
* | Post-release fixes for Python 3.5.0b3.Larry Hastings2015-07-051-1/+1
| |
* | Version bump for Python 3.5.0b3 release.v3.5.0b3Larry Hastings2015-07-051-2/+2
| |
* | Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.Yury Selivanov2015-07-032-3/+4
| |
* | Issue #24400: Introduce a distinct type for 'async def' coroutines.Yury Selivanov2015-06-222-26/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
* | Added the const qualifier for char* argument of Py_EnterRecursiveCall().Serhiy Storchaka2015-06-211-1/+1
|\ \ | |/
| * Added the const qualifier for char* argument of Py_EnterRecursiveCall().Serhiy Storchaka2015-06-211-1/+1
| |
* | Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add.Serhiy Storchaka2015-06-211-1/+1
|\ \ | |/ | | | | Patch by Michael Ensslin.
| * Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add.Serhiy Storchaka2015-06-211-1/+1
| | | | | | | | Patch by Michael Ensslin.
* | Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapperYury Selivanov2015-06-031-1/+0
| |
* | Issue 24365: Conditionalize PEP 489 additions to the stable ABIYury Selivanov2015-06-023-9/+27
| | | | | | | | Patch by Petr Viktorin.
* | Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefullyYury Selivanov2015-06-022-1/+3
| |
* | Issue #24347: Set KeyError if PyDict_GetItemWithError returns NULL.Eric Snow2015-06-021-0/+2
| |
* | Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper privateYury Selivanov2015-06-011-2/+2
| |