Commit graph

18004 commits

Author SHA1 Message Date
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
66f8828bfc Issue #24439: Improve PEP 492 related docs.
Patch by Martin Panter.
2015-06-24 11:04:15 -04: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
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
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
Senthil Kumaran
b4760efbad Back porting changeset db302b88fdb6 to 3.4 branch, which fixed multiple documentation typos.
Related Issues:

#issue21528
#issue24453
2015-06-14 17:35:37 -07:00
Raymond Hettinger
1c90670bc2 Issue #24453: Fix doubled word. 2015-06-14 16:08:06 -07:00
Terry Jan Reedy
8322b06945 Merge with 3.4 2015-06-12 16:47:58 -04:00
Terry Jan Reedy
6ac5cc15ce whitespace 2015-06-12 16:47:44 -04:00
Terry Jan Reedy
815f1a9128 Merge 3.4 2015-06-12 16:44:59 -04:00
Terry Jan Reedy
fe63c9a298 Issue #24406: Add sentences on dict comparisons, similar to those for Sequence
and set comparisions.  Patch by Gareth Rees.
2015-06-12 16:38:57 -04:00
Terry Jan Reedy
bd44ce8ead Merge with 3.4 2015-06-12 15:45:05 -04:00
Terry Jan Reedy
f5d4523844 Closes issue #24405: mark set display as code. 2015-06-12 15:44:45 -04:00
Ned Deily
cec3f56fab Issue #24423: Fix formatting error in 3.5 whatsnew 2015-06-10 15:43:05 -07:00
Barry Warsaw
9380acbbf7 - Issue #24351: Clarify what is meant by "identifier" in the context of
string.Template instances.
2015-06-09 14:22:44 -04:00
Barry Warsaw
17d5f47423 - Issue #24351: Clarify what is meant by "identifier" in the context of
string.Template instances.
2015-06-09 14:20:31 -04:00
Tal Einat
86a60bfb08 Merge from 3.4 2015-06-09 18:42:18 +03:00
Tal Einat
f330d53691 #23891: correctly refer to PyPI as "Python Package Index" 2015-06-09 18:40:16 +03:00
Andrew Kuchling
6b84335ada Merge from 3.4 2015-06-08 18:19:51 -04:00
Andrew Kuchling
d00407115d #23891: remove extra words 2015-06-08 18:17:06 -04:00
Andrew Kuchling
21fd5a92de Merge from 3.4 2015-06-08 17:40:18 -04:00
Andrew Kuchling
dd15b36c90 #23891: add a section to the Tutorial describing virtual environments and pip 2015-06-08 17:35:45 -04:00
Andrew Kuchling
20f628ee08 Merge from 3.4 2015-06-08 17:14:13 -04:00
Andrew Kuchling
4a75174fba Add link to pyvideoorg 2015-06-07 03:00:58 -04:00
Andrew Kuchling
ecacfd80e3 #23891: rework discussion of python-list a bit 2015-06-06 20:25:21 -04:00
Benjamin Peterson
277b975260 merge 3.4 2015-06-05 21:03:46 -05:00
Benjamin Peterson
d9ede872cd that this is "for Python" is obvious 2015-06-05 21:03:08 -05:00
Berker Peksag
ab2f966f79 Issue #23659: Document **fmtparams in csv.register_dialect docstring.
Initial patch by Brandon Milam.
2015-06-05 15:18:17 +03:00
Berker Peksag
12b50ce4cb Issue #23659: Document **fmtparams in csv.register_dialect docstring.
Initial patch by Brandon Milam.
2015-06-05 15:17:51 +03:00
Berker Peksag
a5f62edbe3 Issue #24148: Fix incorrect Stats.sort_stats() example.
"cum" is not a valid argument.

Patch by Brandon Milam.
2015-06-05 14:48:55 +03:00
Berker Peksag
25587742f6 Issue #24148: Fix incorrect Stats.sort_stats() example.
"cum" is not a valid argument.

Patch by Brandon Milam.
2015-06-05 14:48:29 +03:00
Yury Selivanov
4180e43c12 Docs: Fix typo 2015-06-04 11:10:24 -04:00
Yury Selivanov
aab3c4a211 Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully 2015-06-02 18:43:51 -04:00
Ned Deily
fa1b47cc5a Issue #24357: merge from 3.4 2015-06-01 21:20:46 -07:00
Ned Deily
11cf4f6498 Issue #24357: use example.org instead 2015-06-01 21:19:30 -07:00
Ned Deily
03c28facd2 Issue #24357: merge from 3.4 2015-06-01 19:38:25 -07:00
Ned Deily
834f029c74 Issue #24357: fix real typo 2015-06-01 19:37:40 -07:00
Ned Deily
36a6a6bb3c Issue #24357: merge from 3.4 2015-06-01 19:20:31 -07:00
Ned Deily
9e2dc3f0b1 Issue #24357: fix typo 2015-06-01 19:17:44 -07:00
Ned Deily
3e4f976965 Issue #24357: merge from 3.4 2015-06-01 18:55:45 -07:00