Commit graph

90578 commits

Author SHA1 Message Date
Serhiy Storchaka
101ff3541c Issue #24336: The contextmanager decorator now works with functions with
keyword arguments called "func" and "self".  Patch by Martin Panter.
2015-06-28 17:06:07 +03:00
Benjamin Peterson
4801383c29 upgrade to Unicode 8.0.0 2015-06-27 15:45:56 -05:00
Benjamin Peterson
7b78d4364d prevent integer overflow in escape_unicode (closes #24522) 2015-06-27 15:01:51 -05:00
Benjamin Peterson
758d60baaa merge 3.4 2015-06-27 14:26:21 -05:00
Benjamin Peterson
acac1e0e3b merge 3.3 2015-06-27 14:26:15 -05:00
Benjamin Peterson
dac3ab84c7 add issue number 2015-06-27 14:25:50 -05:00
Benjamin Peterson
7763c68dcd merge 3.4 2015-06-27 14:18:23 -05:00
Benjamin Peterson
ff0f322edb merge 3.3 2015-06-27 13:56:46 -05:00
Benjamin Peterson
59b08c18a8 use safe allocation and reallocation macros 2015-06-27 13:41:33 -05:00
Jason R. Coombs
d1d628d552 Issue #20387: Update Misc/NEWS 2015-06-26 17:45:09 -04:00
Berker Peksag
a7c781724f Issue #23684: Clarify the return value of the scheme attribute of ParseResult and SplitResult objects.
Patch by Martin Panter.
2015-06-25 23:39:26 +03:00
Berker Peksag
89584c97e4 Issue #23684: Clarify the return value of the scheme attribute of ParseResult and SplitResult objects.
Patch by Martin Panter.
2015-06-25 23:38:48 +03:00
Yury Selivanov
e79f3557cc Merge 3.4 (issue #24509) 2015-06-25 13:50:21 -04:00
Yury Selivanov
1096f761b6 Issue #24509: Clarify Handle.cancel() and loop.call_* methods. 2015-06-25 13:49:52 -04:00
Yury Selivanov
f76628fa5d Merge 3.4 2015-06-25 11:54:49 -04:00
Yury Selivanov
bb96134368 asyncio.docs: Use less confusing title 2015-06-25 11:54:34 -04:00
Yury Selivanov
edb09c5c0b Issue #24439: Update tulip_coro.dia 2015-06-25 11:48:32 -04:00
Yury Selivanov
f847f1fba7 Issue #24400, #24325: More tests for types._GeneratorWrapper
Also, make 'wrapped' and 'isgen' private.
2015-06-24 12:49:28 -04:00
Yury Selivanov
00e3372358 Issue #24325, #24400: Add more unittests for types.coroutine; tweak wrapper implementation. 2015-06-24 11:44:51 -04:00
Yury Selivanov
66f8828bfc Issue #24439: Improve PEP 492 related docs.
Patch by Martin Panter.
2015-06-24 11:04:15 -04:00
Yury Selivanov
fcba97242b Issue #24495, #24400: Test asyncio.Task.repr in debug mode 2015-06-24 10:55:12 -04:00
Yury Selivanov
5ac716251f Fix asyncio unittests in debug mode 2015-06-24 10:47:44 -04:00
Yury Selivanov
339d5e7d85 Fix asyncio unittests in debug mode 2015-06-24 10:45:44 -04:00
Yury Selivanov
8f1c99321b Issue #24400: Fix CoroWrapper for 'async def' coroutines 2015-06-24 10:32:22 -04:00
Yury Selivanov
29a602a140 Issue #24400: Fix CoroWrapper for 'async def' coroutines 2015-06-24 10:30:14 -04:00
Yury Selivanov
3bdbcedfd9 Merge 3.4 2015-06-24 09:41:56 -04:00
Yury Selivanov
dfbd27f0be asyncio: Merge changes from issue #24400. 2015-06-24 09:41:35 -04:00
Steve Dower
7aec764d73 Closes #24244: Removes invalid test from test_time 2015-06-23 20:48:32 -07:00
Yury Selivanov
27947d5d5c docs.whatsnew: Update ref to tp_as_async 2015-06-23 15:09:58 -04:00
Yury Selivanov
bce294b993 docs.capi: Fix tp_as_async doc 2015-06-23 11:46:09 -04:00
Antoine Pitrou
a72f0cdaea Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar(). 2015-06-23 14:38:13 +02:00
Antoine Pitrou
6bc217dd3d Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar(). 2015-06-23 14:31:11 +02:00
Yury Selivanov
5376ba9630 Issue #24400: Introduce a distinct type for 'async def' coroutines.
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")
2015-06-22 12:19:30 -04:00
Dingyuan Wang
e411b6629f Issue #20387: Restore retention of indentation during untokenize. 2015-06-22 10:01:12 +08:00
Jason R. Coombs
b6d1cdda8e Issue #20387: Correct test to properly capture expectation. 2015-06-25 22:42:24 -04:00
Serhiy Storchaka
cd881b850c Fixed documentation of functions with const char* arguments. 2015-06-21 17:12:16 +03:00
Serhiy Storchaka
03863d2b29 Fixed documentation of functions with const char* arguments. 2015-06-21 17:11:21 +03:00
Serhiy Storchaka
289dd19124 Added the const qualifier for char* argument of Py_EnterRecursiveCall(). 2015-06-21 16:27:09 +03:00
Serhiy Storchaka
5fa22fc088 Added the const qualifier for char* argument of Py_EnterRecursiveCall(). 2015-06-21 16:26:28 +03:00
Serhiy Storchaka
ccfdf0923a Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add.
Patch by Michael Ensslin.
2015-06-21 16:00:33 +03:00
Serhiy Storchaka
73c95f1949 Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add.
Patch by Michael Ensslin.
2015-06-21 15:59:46 +03:00
Serhiy Storchaka
ac803cd2f3 Issue #24408: Fixed test for tkinter.Font on OS X.
Based on patch by Martin Panter.
2015-06-21 14:42:57 +03:00
Serhiy Storchaka
753a1dfcc2 Issue #24408: Fixed test for tkinter.Font on OS X.
Based on patch by Martin Panter.
2015-06-21 14:41:44 +03:00
Jason R. Coombs
5713b3c5bf Issue #20387: Add test capturing failure to roundtrip indented code in tokenize module. 2015-06-20 19:52:22 -04:00
Jason R. Coombs
7cf36387e4 Remove unused import and remove doctest-only import into doctests. 2015-06-20 19:13:50 -04:00
Steve Dower
6d58f8dc52 Issue 24476: Statically links vcruntime140.dll and removes it from the installer 2015-06-19 10:49:04 -07:00
Zachary Ware
4ab4ac8e03 Merge 3.4 2015-06-17 10:08:44 -05:00
Zachary Ware
6c7f2acd99 Merge 3.4's PCbuild/readme.txt update.
All the new information in 3.4's readme.txt was already here, but the
wrong name was used to refer to the script.  Also reworded the sentence.
2015-06-17 09:45:22 -05:00
Zachary Ware
d1f7c594fa Update PCbuild/readme.txt
It now recommends PCbuild/get_externals.bat instead of the scripts in
Tools/buildbot.
2015-06-16 23:27:56 -05:00
Zachary Ware
9fe164364a Deprecate unused scripts in Tools/buildbot.
I would just outright delete them, but the readme in PCbuild recommended
their use, so I figure it would be nice to leave them there for a while.
2015-06-16 10:56:14 -05:00