summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar().Antoine Pitrou2015-06-231-0/+2
|\
| * Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar().Antoine Pitrou2015-06-231-0/+2
| |
* | Issue #24400: Introduce a distinct type for 'async def' coroutines.Yury Selivanov2015-06-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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")
* | - Issue #24351: Clarify what is meant by "identifier" in the context ofBarry Warsaw2015-06-091-0/+6
|\ \ | |/ | | | | string.Template instances.
| * - Issue #24351: Clarify what is meant by "identifier" in the context ofBarry Warsaw2015-06-091-0/+3
| | | | | | | | string.Template instances.
* | Issue #24408: Fixed AttributeError in measure() and metrics() methods ofSerhiy Storchaka2015-06-081-0/+3
| | | | | | | | tkinter.Font.
* | Issue #14373: C implementation of functools.lru_cache() now can be used withSerhiy Storchaka2015-06-081-0/+3
| | | | | | | | methods.
* | Issue #8232: webbrowser support incomplete on Windows. Patch by Brandon MilamSteve Dower2015-06-081-0/+3
| |
* | Issue #24373: Eliminate PEP 489 test refleaksNick Coghlan2015-06-041-0/+7
| | | | | | | | | | | | | | _testmultiphase and xxlimited now use tp_traverse and tp_finalize to avoid reference leaks encountered when combining tp_dealloc with PyType_FromSpec (see issue #16690 for details)
* | Issue #24369: Defend against key-changes during iteration.Eric Snow2015-06-041-0/+2
| |
* | Issue #24377: Fix a ref leak in OrderedDict.__repr__.Eric Snow2015-06-031-0/+2
| |
* | Issue #24362: Simplify the C OrderedDict fast nodes resize logic.Eric Snow2015-06-031-0/+2
| |
* | Issue #24368: Support keyword arguments in OrderedDict methods.Eric Snow2015-06-031-0/+2
| |
* | Issue #24359: Check for changed OrderedDict size during iteration.Eric Snow2015-06-021-0/+2
| |
* | Issue #24348: Drop superfluous increfs/decrefs.Eric Snow2015-06-021-0/+2
| |
* | Issue #24347: Set KeyError if PyDict_GetItemWithError returns NULL.Eric Snow2015-06-021-0/+2
| |
* | add Py_tp_finalize slot (closes #24345)Benjamin Peterson2015-06-011-0/+2
| | | | | | | | Patch from Petr Viktorin.
* | Moved Misc/NEWS entry (issue #24270) to correct section.Serhiy Storchaka2015-06-011-3/+3
| |
* | Merge release engineering changes with 3.5 branch head.Larry Hastings2015-06-011-1/+13
|\ \
| * | Post-release updates for Python 3.5.0b2.Larry Hastings2015-06-011-0/+12
| | |
| * | Version bump for Python 3.5.0b2.v3.5.0b2Larry Hastings2015-05-311-1/+1
| | |
* | | Issue #19543: Implementation of isclose as per PEP 485Tal Einat2015-05-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | For details, see: PEP 0485 -- A Function for testing approximate equality Functions added: math.isclose() and cmath.isclose(). Original code by Chris Barker. Patch by Tal Einat.
* | | Issue #24284: The startswith and endswith methods of the str class no longerSerhiy Storchaka2015-05-311-0/+4
|/ / | | | | | | | | return True when finding the empty string and the indexes are completely out of range.
* | Issue #23934: Fix inspect.signature to fail correctly for builtin types.Yury Selivanov2015-05-301-0/+3
| | | | | | | | Initial patch by James Powell.
* | Issue #5633: Fixed timeit when the statement is a string and the setup is not.Serhiy Storchaka2015-05-301-0/+2
|\ \ | |/ | | | | Refactored timeit.__init__ for unified handling of stmt and setup parameters.
| * Issue #5633: Fixed timeit when the statement is a string and the setup is not.Serhiy Storchaka2015-05-301-0/+2
| |
* | Reverting my previous commit.Yury Selivanov2015-05-301-15/+0
| | | | | | | | Something went horribly wrong when I was doing `hg rebase`.
* | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-0/+4
|\ \ | | | | | | | | | | | | 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-301-0/+4
| |\ \ | | |/ | | | | | | | | | 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-301-0/+4
| | | | | | | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
| * | Issue #16991: Add a C implementation of collections.OrderedDict.Eric Snow2015-05-301-0/+2
| | |
* | | Issue #16991: Add a C implementation of collections.OrderedDict.Eric Snow2015-05-301-0/+2
| | |
* | | merge 3.5 (#24328)Benjamin Peterson2015-05-291-0/+2
|\ \ \ | |/ /
| * | fix importing one char extension modules (closes #24328)Benjamin Peterson2015-05-291-0/+2
| | |
* | | Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.Serhiy Storchaka2015-05-291-0/+3
|\ \ \ | |/ / | | | | | | Original patch by David Moore.
| * | Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.Serhiy Storchaka2015-05-291-0/+3
| |\ \ | | |/ | | | | | | Original patch by David Moore.
| | * Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.Serhiy Storchaka2015-05-291-0/+3
| | | | | | | | | | | | Original patch by David Moore.
* | | merge 3.5 (#11205)Benjamin Peterson2015-05-281-0/+2
|\ \ \ | |/ /
| * | in dict displays, evaluate the key before the value (closes #11205)Benjamin Peterson2015-05-281-0/+2
| | | | | | | | | | | | Patch partially by Steve Dougherty.
* | | Issue 24298: Fix signature() to properly unwrap wrappers around bound methodsYury Selivanov2015-05-281-0/+3
|\ \ \ | |/ /
| * | Issue 24298: Fix signature() to properly unwrap wrappers around bound methodsYury Selivanov2015-05-281-0/+3
| |\ \ | | |/
| | * Issue 24298: Fix signature() to properly unwrap wrappers around bound methodsYury Selivanov2015-05-281-0/+3
| | |
* | | Issue #23359: Specialize set_lookkey intoa lookup function and an insert ↵Raymond Hettinger2015-05-271-0/+3
| | | | | | | | | | | | function.
* | | Merge fix for issue #24285 from 3.5Nick Coghlan2015-05-261-1/+5
|\ \ \ | |/ /
| * | Issue #24285: fix importing extensions from packagesNick Coghlan2015-05-261-1/+5
| | |
* | | Moved Misc/NEWS entries to correct section and fix formatting.Serhiy Storchaka2015-05-261-8/+8
|\ \ \ | |/ /
| * | Moved Misc/NEWS entries to correct section and fix formatting.Serhiy Storchaka2015-05-261-8/+8
| |\ \ | | |/
| | * Moved Misc/NEWS entries to correct section and fix formatting.Serhiy Storchaka2015-05-261-7/+7
| | |
* | | (Merge 3.6) Issue #23840: tokenize.open() now closes the temporary binary fileVictor Stinner2015-05-251-0/+3
|\ \ \ | |/ / | | | | | | on error to fix a resource warning.
| * | (Merge 3.5) Issue #23840: tokenize.open() now closes the temporary binary fileVictor Stinner2015-05-251-0/+3
| |\ \ | | |/ | | | | | | on error to fix a resource warning.