Commit Graph

89900 Commits

Author SHA1 Message Date
Yury Selivanov d396d53bc7 Merge 3.5 2015-06-23 15:10:21 -04:00
Yury Selivanov 27947d5d5c docs.whatsnew: Update ref to tp_as_async 2015-06-23 15:09:58 -04:00
Yury Selivanov ebbd83e70d Merge 3.5 2015-06-23 11:46:26 -04:00
Yury Selivanov bce294b993 docs.capi: Fix tp_as_async doc 2015-06-23 11:46:09 -04:00
Antoine Pitrou d6362db83d Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar(). 2015-06-23 14:39:57 +02: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 6edc2f7549 Issue #24400: Merge 3.5 2015-06-22 12:31:24 -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
Raymond Hettinger 7e3592dca6 Harmonize the bottom of the outer loop with its entry point
giving a small simplification.  Timings show that hash
pre-check seems only benefit the inner-loop (the linear probes).
2015-06-21 10:47:20 -07:00
Serhiy Storchaka 2e2f374098 Fixed documentation of functions with const char* arguments. 2015-06-21 17:12:40 +03: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 dcbff7d4e1 Added the const qualifier for char* argument of Py_EnterRecursiveCall(). 2015-06-21 16:27:36 +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 86621ae19b Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add.
Patch by Michael Ensslin.
2015-06-21 16:00:58 +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 1a2d134e31 Issue #24408: Fixed test for tkinter.Font on OS X.
Based on patch by Martin Panter.
2015-06-21 14:43:15 +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
Serhiy Storchaka 66dc4648fc Issue #24426: Fast searching optimization in regular expressions now works
for patterns that starts with capturing groups.  Fast searching optimization
now can't be disabled at compile time.
2015-06-21 14:06:55 +03:00
Raymond Hettinger 6ee588f14e Restore quick exit (no freeslot check) for common case (found null on first probe). 2015-06-20 21:39:51 -07:00
Steve Dower 81fdd0b868 Issue 24476: Statically links vcruntime140.dll and removes it from the installer 2015-06-19 13:08:58 -07: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 72dd522761 Remove deprecated buildbot scripts 2015-06-17 10:09:24 -05:00
Zachary Ware 84f6578b7a Merge 3.5 2015-06-17 10:08:57 -05:00
Zachary Ware 4ab4ac8e03 Merge 3.4 2015-06-17 10:08:44 -05:00
Zachary Ware 4132b30636 Merge PCbuild/readme.txt update from 3.5 2015-06-17 09:48:19 -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
Steve Dower c1c272e8bf Issue #8232: Renamed WinFireFox to WinFirefox 2015-06-15 09:11:37 -07:00
Steve Dower f3291a8340 Issue #8232: Renamed WinFireFox to WinFirefox 2015-06-15 09:11:14 -07:00
Ned Deily df00b10858 null merge 3.5 to default (9a0c5ffe7420 merged 3.4 to default, bypassing 3.5) 2015-06-14 18:30:46 -07:00
Ned Deily 28363e97cc null merge 3.4 to 3.5 (9a0c5ffe7420 merged 3.4 to default, bypassing 3.5) 2015-06-14 18:30:04 -07:00
Senthil Kumaran 5e32a5b2c3 null merge with 3.4
Back porting changeset db302b88fdb6 to 3.4 branch, which fixed multiple documentation typos.

Related Issues:
#issue21528
#issue24453
2015-06-14 17:37:09 -07: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 bed1e7ecc7 merge 2015-06-14 16:08:59 -07:00
Raymond Hettinger 355654c1c7 merge 2015-06-14 16:08:35 -07:00
Raymond Hettinger 1c90670bc2 Issue #24453: Fix doubled word. 2015-06-14 16:08:06 -07:00
Berker Peksag a61794e527 Issue #24435: Use the devguide link instead of PEP 306 in Grammar/Grammar. 2015-06-13 11:19:43 +03:00
Berker Peksag b83c514bf5 Issue #24435: Use the devguide link instead of PEP 306 in Grammar/Grammar. 2015-06-13 11:19:16 +03:00
Berker Peksag 192c750f4f Issue #24435: Use the devguide link instead of PEP 306 in Grammar/Grammar. 2015-06-13 11:18:33 +03:00
Terry Jan Reedy 160849444e Merge with 3.5 2015-06-12 16:48:30 -04: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 0a2db7a7ad Merge with 3.5 2015-06-12 16:45:18 -04:00
Terry Jan Reedy 815f1a9128 Merge 3.4 2015-06-12 16:44:59 -04:00