summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Issue #24707: Remove assertion in monotonic clockVictor Stinner2015-09-021-10/+0
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Don't check anymore at runtime that the monotonic clock doesn't go backward. Yes, it happens. It occurs sometimes each month on a Debian buildbot slave running in a VM. The problem is that Python cannot do anything useful if a monotonic clock goes backward. It was decided in the PEP 418 to not fix the system, but only expose the clock provided by the OS.
* | | Issue #24975: Fix AST compilation for PEP 448 syntax.Yury Selivanov2015-09-011-2/+4
| | |
* | | Rebuilt Clinic generated code.Larry Hastings2015-08-252-3/+3
| | |
* | | Issue #24769: Interpreter now starts properly when dynamic loadingLarry Hastings2015-08-253-25/+75
| | | | | | | | | | | | is disabled. Patch by Petr Viktorin.
* | | Issue #24492: make sure that ``from ... import ...` raises anBrett Cannon2015-08-121-7/+12
| | | | | | | | | | | | | | | | | | ImportError if __name__ is not defined on a package. Thanks to Armin Rigo for the bug report and diagnosing the cause.
* | | Issue #24791: Fix grammar regression for call syntax: 'g(*a or b)'.Yury Selivanov2015-08-052-34/+33
| | |
* | | py_getrandom(): getrandom() *can* return EINTRVictor Stinner2015-07-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the latest version of getrandom() manual page: http://man7.org/linux/man-pages/man2/getrandom.2.html#NOTES The behavior when a call to getrandom() that is blocked while reading from /dev/urandom is interrupted by a signal handler depends on the initialization state of the entropy buffer and on the request size, buflen. If the entropy is not yet initialized, then the call will fail with the EINTR error. If the entropy pool has been initialized and the request size is large (buflen > 256), the call either succeeds, returning a partially filled buffer, or fails with the error EINTR. If the entropy pool has been initialized and the request size is small (buflen <= 256), then getrandom() will not fail with EINTR. Instead, it will return all of the bytes that have been requested. Note: py_getrandom() calls getrandom() with flags=0.
* | | Fix refleak.Stefan Krah2015-07-271-1/+3
| | |
* | | Issue #24687: Plug refleak on SyntaxError in function parameters annotations.Yury Selivanov2015-07-231-14/+13
| | |
* | | Issue #24619: More tests; fix nits in compiler.cYury Selivanov2015-07-222-4/+3
| | |
* | | set items in dict displays from left to right (closes #24569)Benjamin Peterson2015-07-051-6/+9
| | |
* | | Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.Yury Selivanov2015-07-033-4/+4
| | |
* | | Issue #24528: Improve error message for awaits in comprehensionsYury Selivanov2015-06-301-1/+4
| | |
* | | Issue #24400: Introduce a distinct type for 'async def' coroutines.Yury Selivanov2015-06-224-151/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fixed indentation of Python examples in C comments.Serhiy Storchaka2015-06-101-2/+2
|\ \ \ | |/ /
| * | Fixed indentation of Python examples in C comments.Serhiy Storchaka2015-06-101-2/+2
| | |
* | | Issue 24374: Plug refleak in set_coroutine_wrapperYury Selivanov2015-06-041-31/+19
| | |
* | | Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapperYury Selivanov2015-06-031-28/+30
| | |
* | | Issue 24366: Merge 3.4Yury Selivanov2015-06-021-1/+1
|\ \ \ | |/ /
| * | Issue 24366: Merge 3.3Yury Selivanov2015-06-021-1/+1
| |\ \ | | |/
| | * Issue 24366: Indent code (thanks to li4ick for reporting).Yury Selivanov2015-06-021-1/+1
| | |
* | | Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefullyYury Selivanov2015-06-022-9/+31
| | |
* | | Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper privateYury Selivanov2015-06-012-6/+6
| | |
* | | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-302-6/+11
|\ \ \ | |/ / | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
| * | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-302-6/+11
| | | | | | | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
* | | Specify default values of semantic booleans in Argument Clinic generated ↵Serhiy Storchaka2015-05-302-9/+9
| | | | | | | | | | | | signatures as booleans.
* | | Use converter names instead of format units in Argument Clinic descriptionsSerhiy Storchaka2015-05-301-72/+72
| | | | | | | | | | | | in builtin and _crypt modules.
* | | fix importing one char extension modules (closes #24328)Benjamin Peterson2015-05-291-10/+9
| | |
* | | remove STORE_MAP, since it's unusedBenjamin Peterson2015-05-283-18/+1
| | |
* | | in dict displays, evaluate the key before the value (closes #11205)Benjamin Peterson2015-05-283-112/+112
| | | | | | | | | | | | Patch partially by Steve Dougherty.
* | | Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.Yury Selivanov2015-05-281-2/+2
| | |
* | | Issue #24285: fix importing extensions from packagesNick Coghlan2015-05-261-1/+1
| | |
* | | Issue #24268: Fix import naming when loading extension modules. Patch by ↵Steve Dower2015-05-233-4/+4
| | | | | | | | | | | | Petr Viktorin.
* | | Issue #24268: Fixes generation of init import name on Windows.Steve Dower2015-05-231-1/+1
| | |
* | | PEP 489: Multi-phase extension module initializationNick Coghlan2015-05-2313-2867/+3090
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Known limitations of the current implementation: - documentation changes are incomplete - there's a reference leak I haven't tracked down yet The leak is most visible by running: ./python -m test -R3:3 test_importlib However, you can also see it by running: ./python -X showrefcount Importing the array or _testmultiphase modules, and then deleting them from both sys.modules and the local namespace shows significant increases in the total number of active references each cycle. By contrast, with _testcapi (which continues to use single-phase initialisation) the global refcounts stabilise after a couple of cycles.
* | | Issue #24102: Fixed exception type checking in standard error handlers.Serhiy Storchaka2015-05-181-27/+21
|\ \ \ | |/ /
| * | Issue #24102: Fixed exception type checking in standard error handlers.Serhiy Storchaka2015-05-181-24/+18
| | |
* | | allow test node after ** in calls (closes #24176)Benjamin Peterson2015-05-161-8/+4
| | |
* | | Issue #24192: Fix namespace package imports.Eric Snow2015-05-162-4525/+4482
| | |
* | | Issue 24017: fix for "async with" refcountingNick Coghlan2015-05-131-0/+2
| | | | | | | | | | | | | | | | | | * adds missing INCREF in WITH_CLEANUP_START * adds missing DECREF in WITH_CLEANUP_FINISH * adds several new tests Yury created while investigating this
* | | use our normal bracing styleBenjamin Peterson2015-05-121-1/+2
| | |
* | | Issue #24017: Plug ref leak.Yury Selivanov2015-05-121-2/+0
| | |
* | | Fix warnings for PyEval_GetCoroutineWrapperYury Selivanov2015-05-121-1/+1
| | |
* | | PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov2015-05-1212-5389/+6617
| | |
* | | PEP 479: Change StopIteration handling inside generators.Yury Selivanov2015-05-091-0/+2
| | | | | | | | | | | | Closes issue #22906.
* | | Merge 3.4Benjamin Peterson2015-05-071-5/+4
|\ \ \ | |/ /