summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
Commit message (Collapse)AuthorAgeFilesLines
* bpo-26985: Add missing info of code object in inspect documentation (GH-1090)Xiang Zhang2017-04-131-179/+200
|
* bpo-16355: Clarify when inspect.getcomments() returns None (#428)Marco Buttu2017-03-171-1/+3
| | | Initial patch by Vajrasky Kok.
* bpo-28814: Undeprecate inadvertently deprecated inspect functions. (#122)Matthias Bussonnier2017-02-221-8/+4
| | | | | | | | | | | | | | Nick Coghlan said on bpo-28814: > inspect.getargvalues() and inspect.formatargvalues() were deprecated > in Python 3.5 as part of implementing bpo-20438 > This is incorrect, as these are *frame* introspection related functions, > not callable introspection ones. The documentation and implementation > layout is confusing though, as they're interleaved with the callable > introspection operation This commit undeprecates these functions and adds a note to ignore previous deprecation notices.
* Issue #28091: Document PEP 525 & PEP 530.Yury Selivanov2016-12-151-0/+21
| | | | Patch by Eric Appelt.
* Issue #27172: Undeprecate inspect.getfullargspec()Nick Coghlan2016-12-021-17/+37
| | | | | | This is still useful for single source Python 2/3 code migrating away from inspect.getargspec(), but that wasn't clear with the documented deprecation in place.
* Issue #26010: fix typos; rewordingYury Selivanov2016-10-201-10/+10
|
* Merge 3.5 + document CO_ASYNC_GENERATOR; issue #26010Yury Selivanov2016-10-201-3/+66
|\
| * Issue #26010: Document CO_* constantsYury Selivanov2016-10-201-3/+58
| |
* | Issue #24254: Drop cls.__definition_order__.Eric Snow2016-09-081-188/+179
| |
* | Issue #24254: Preserve class attribute definition order.Eric Snow2016-09-051-179/+188
| |
* | Issue #24314: Merge doc links from 3.5Martin Panter2016-06-181-4/+5
|\ \ | |/
| * Issue #24314: Fix doc links for general attributes like __name__, __dict__Martin Panter2016-06-181-4/+5
| |
* | Merge Issue #22558.Terry Jan Reedy2016-06-111-0/+1
|\ \ | |/
| * Issue #22558: Add remaining doc links to source code for Python-coded modules.Terry Jan Reedy2016-06-111-0/+1
| | | | | | | | | | Reformat header above separator line (added if missing) to a common format. Patch by Yoni Lavi.
* | Issue #19611: handle implicit parameters in inspect.signatureNick Coghlan2016-06-041-0/+10
| | | | | | | | | | | | | | | | inspect.signature now reports the implicit ``.0`` parameters generated by the compiler for comprehension and generator expression scopes as if they were positional-only parameters called ``implicit0``. Patch by Jelle Zijlstra.
* | [merge from 3.5] issue27043 - Explain the inspect.cleandoc behavior on ↵Senthil Kumaran2016-05-301-2/+6
|\ \ | |/ | | | | | | | | synopsis line and other lines. Patch contributed by Nathan Harold.
| * issue27043 - Explain the inspect.cleandoc behavior on synopsis line and ↵Senthil Kumaran2016-05-301-2/+6
| | | | | | | | | | | | other lines. Patch contributed by Nathan Harold.
* | Issue #23921: Standardized documentation whitespace formatting.Serhiy Storchaka2016-05-101-1/+1
|\ \ | |/ | | | | Original patch by James Edwards.
| * Issue #23921: Standardized documentation whitespace formatting.Serhiy Storchaka2016-05-101-1/+1
| | | | | | | | Original patch by James Edwards.
* | Merge 3.5 (issue #25486)Yury Selivanov2016-01-121-2/+1
|\ \ | |/
| * Issue #25486: Drop "removed in 3.6" wording from inspect.getargspec docs.Yury Selivanov2016-01-121-2/+1
| |
* | Issue #25486: Resurrect inspect.getargspec in 3.6. Backout a565aad5d6e1.Yury Selivanov2016-01-111-0/+18
| | | | | | | | | | The decision is that we shouldn't remove popular APIs (however long they are depreacted) from Python 3, while 2.7 is still around and supported.
* | Merge 3.5Yury Selivanov2015-10-311-0/+6
|\ \ | |/
| * docs/inspect: Document __annotations__Yury Selivanov2015-10-311-0/+6
| |
* | Merge 3.5Yury Selivanov2015-09-091-0/+20
|\ \ | |/
| * whatsnew/3.5: Fix library news till Py3.5a1. Update other docs.Yury Selivanov2015-09-091-0/+20
| |
* | Merge 3.5Yury Selivanov2015-08-171-3/+4
|\ \ | |/
| * docs: Clarify that gi_yieldfrom was first added in 3.5Yury Selivanov2015-08-171-3/+4
| |
* | Merge 3.5Yury Selivanov2015-08-171-4/+4
|\ \ | |/
| * docs: Fix inspect docs re gi_yieldfromYury Selivanov2015-08-171-4/+4
| |
* | Issue #13248: Delete remaining references of inspect.getargspec().Berker Peksag2015-07-311-3/+1
| | | | | | | | Noticed by Yaroslav Halchenko.
* | Issue #15582: Add a whatsnew entry for inspect.getdoc() changes in 3.5.Berker Peksag2015-07-301-0/+3
|\ \ | |/ | | | | Patch by Martin Panter.
| * Issue #15582: Add a whatsnew entry for inspect.getdoc() changes in 3.5.Berker Peksag2015-07-301-0/+3
| | | | | | | | Patch by Martin Panter.
* | Issue #13248: Remove inspect.getmoduleinfo() from 3.6 (deprecated in 3.3)Yury Selivanov2015-07-231-20/+1
| |
* | Issue #13248: Remove inspect.getargspec from 3.6 (deprecated from 3.0)Yury Selivanov2015-07-231-18/+0
|/
* Issue #24400: Resurrect inspect.isawaitable()Yury Selivanov2015-07-031-0/+19
| | | | | | | | collections.abc.Awaitable and collections.abc.Coroutine no longer use __instancecheck__ hook to detect generator-based coroutines. inspect.isawaitable() can be used to detect generator-based coroutines and to distinguish them from regular generator objects.
* Issue #24450: Add gi_yieldfrom to generators; cr_await to coroutines.Yury Selivanov2015-07-031-0/+7
| | | | Patch by Benno Leslie and Yury Selivanov.
* Issue #24541: Drop test_inspect.test_eightteen unittest; update docsYury Selivanov2015-07-011-1/+1
| | | | Suggested by Martin Panter.
* Issue #24400: Remove inspect.isawaitable().Yury Selivanov2015-06-301-10/+0
| | | | | | isawaitable() was added before collections.abc.Awaitable; now, with Awaitable, it is no longer needed (we don't have ishashable() or isiterable() methods in the inspect module either).
* Issue #24400: Introduce a distinct type for 'async def' coroutines.Yury Selivanov2015-06-221-19/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 22357: Merge from 3.4Yury Selivanov2015-05-301-0/+11
|\
| * Issue 22357: Document __qualname__ in inspect.rstYury Selivanov2015-05-301-0/+11
| |
* | Issue 20438: Add a note about deprecating old inspect APIs to whatsnew.Yury Selivanov2015-05-221-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, deprecate formatargspec, formatargvalues, and getargvalues functions. Since we are deprecating 'getfullargspec' function in 3.5 (documentation only, no DeprecationWarning), it makes sense to also deprecate functions designed to be directly used with it. In 3.6 we will remove 'getargsspec' function (was deprecated since Python 3.0), and start raising DeprecationWarnings in other 'getarg*' family of functions. We can remove them in 3.7 or later. Also, it is worth noting, that Signature API does not provide 100% of functionality that deprecated APIs have. It is important to do a soft deprecation of outdated APIs in 3.5 to gather users feedback, and improve Signature object.
* | Issue 20438: Deprecate inspect.getargspec() and friends.Yury Selivanov2015-05-221-6/+7
| |
* | Issue 24180: Fixes by Berker Peksag.Yury Selivanov2015-05-211-7/+5
| |
* | Issue 24180: Documentation for PEP 492 changes.Yury Selivanov2015-05-211-0/+41
| |
* | Issue 20691: Add follow_wrapped arg to inspect.signature/from_callable.Yury Selivanov2015-05-201-4/+10
| |
* | Add versionadded directive for BoundArguments.apply_defaults().Berker Peksag2015-05-161-0/+2
| |
* | Issue 24190: Add inspect.BoundArguments.apply_defaults() method.Yury Selivanov2015-05-161-21/+20
| |
* | Issue 24191: Document BoundArguments.signatureYury Selivanov2015-05-141-0/+4
|\ \ | |/