summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Merge 3.5 (monotonic)Victor Stinner2015-09-021-13/+3
|\
| * oops, rename pymonotonic_new() to pymonotonic()Victor Stinner2015-09-021-3/+3
| | | | | | | | | | I was not supposed to commit the function with the name pymonotonic_new(). I forgot to rename it.
| * 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 #23517: datetime.timedelta constructor now rounds microseconds to nearestVictor Stinner2015-09-021-2/+1
| | | | | | | | | | | | 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).
* | Merge 3.5 (issue #24975)Yury Selivanov2015-09-021-2/+4
|\ \ | |/
| * Issue #24975: Fix AST compilation for PEP 448 syntax.Yury Selivanov2015-09-011-2/+4
| |
* | Issue #23517: Try to fix test_time on "x86 Ubuntu Shared 3.x" buildbotVictor Stinner2015-09-021-7/+10
| |
* | Issue #23517: Fix _PyTime_ObjectToDenominator()Victor Stinner2015-09-021-18/+17
| | | | | | | | | | * initialize numerator on overflow error ensure that numerator is smaller than * denominator.
* | Issue #23517: Add "half up" rounding mode to the _PyTime APIVictor Stinner2015-09-011-10/+54
| |
* | Move assertion inside _PyTime_ObjectToTimeval()Victor Stinner2015-09-011-6/+14
| | | | | | | | | | Change also _PyTime_FromSeconds() assertion to ensure that the _PyTime_t type is used.
* | Refactor pytime.cVictor Stinner2015-09-011-48/+65
| | | | | | | | Move code to convert double timestamp to subfunctions.
* | Merge from 3.5 (with 3.5.0rc2 changes) into default (3.6). Messy!Larry Hastings2015-08-253-25/+75
|\ \ | |/
| * 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.
* | Fix a trivial typo.Eric V. Smith2015-08-211-1/+1
| |
* | Use PyTuple_GET_SIZE like the adjacent code does.Raymond Hettinger2015-08-181-1/+1
| |
* | Inline PyIter_Next() matching the other itertools code.Raymond Hettinger2015-08-181-1/+2
| |
* | Merge from 3.5 for issue #24492Brett Cannon2015-08-141-7/+12
|\ \ | |/
| * 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 #9232: Support trailing commas in function declarations.Robert Collins2015-08-112-55/+74
| | | | | | | | | | | | For example, "def f(*, a = 3,): pass" is now legal. Patch from Mark Dickinson.
* | Merge 3.5 (issue #24791)Yury Selivanov2015-08-052-34/+33
|\ \ | |/
| * Issue #24791: Fix grammar regression for call syntax: 'g(*a or b)'.Yury Selivanov2015-08-052-34/+33
| |
* | Merge 3.5 (os.urandom)Victor Stinner2015-07-301-1/+0
|\ \ | |/
| * 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
|\ \ | |/
| * Fix refleak.Stefan Krah2015-07-271-1/+3
| |
* | Merge 3.5 (Issue #24687)Yury Selivanov2015-07-231-14/+13
|\ \ | |/
| * Issue #24687: Plug refleak on SyntaxError in function parameters annotations.Yury Selivanov2015-07-231-14/+13
| |
* | Merge 3.5 (Issue #24619)Yury Selivanov2015-07-222-4/+3
|\ \ | |/
| * Issue #24619: More tests; fix nits in compiler.cYury Selivanov2015-07-222-4/+3
| |
* | merge 3.5 (#24569)Benjamin Peterson2015-07-051-6/+9
|\ \ | |/
| * set items in dict displays from left to right (closes #24569)Benjamin Peterson2015-07-051-6/+9
| |
* | Merge 3.5 (Issue #19235)Yury Selivanov2015-07-033-4/+4
|\ \ | |/
| * Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.Yury Selivanov2015-07-033-4/+4
| |
* | Merge 3.5 (Issue #24528)Yury Selivanov2015-06-301-1/+4
|\ \ | |/
| * Issue #24528: Improve error message for awaits in comprehensionsYury Selivanov2015-06-301-1/+4
| |
* | Issue #24400: Merge 3.5Yury Selivanov2015-06-224-151/+148
|\ \ | |/
| * 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
| |\
| | * 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 #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-4/+4
|\ \ \ | |/ /
| * | 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
|\ \ | |/