summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\ \ | |/
| * Issue 24191: Document BoundArguments.signatureYury Selivanov2015-05-141-0/+4
| |
| * docs.inspect: Fix BoundArguments example. Issue #22998.Yury Selivanov2014-12-051-1/+2
| |
* | Issue #15582: inspect.getdoc() now follows inheritance chains.Serhiy Storchaka2015-04-031-0/+3
| |
* | docs.inspect: Fix BoundArguments example. Issue #22998.Yury Selivanov2014-12-051-1/+2
| |
* | merge with 3.4Georg Brandl2014-10-311-10/+13
|\ \ | |/
| * #22613: minor other fixes in library docs (thanks Jacques Ducasse)Georg Brandl2014-10-311-10/+13
| |
| * Merge in all documentation changes since branching 3.4.0rc1.Larry Hastings2014-03-161-0/+5
| |
* | Issue #16808: inspect.stack() now returns a named tuple instead of a tuple.Antoine Pitrou2014-08-241-2/+8
| | | | | | | | Patch by Daniel Shahaf.
* | Issue #21205: Complete the "versionchanged" note in inspect documentationVictor Stinner2014-06-161-1/+3
| |
* | Issue #21205: Add a new ``__qualname__`` attribute to generator, the qualifiedVictor Stinner2014-06-161-0/+14
| | | | | | | | | | | | | | name, and use it in the representation of a generator (``repr(gen)``). The default name of the generator (``__name__`` attribute) is now get from the function instead of the code. Use ``gen.gi_code.co_name`` to get the name of the code.
* | inspect: Make Signature and Parameter hashable. Issue #20334.Yury Selivanov2014-04-081-2/+2
| |
* | inspect.docs: Document that Signature and Parameter are now picklable (issue ↵Yury Selivanov2014-03-291-0/+6
| | | | | | | | #20726)
* | inspect.docs: Fix indentation and version-added for Signature.from_callableYury Selivanov2014-03-291-1/+3
| |
* | inspect.Signature: Add 'Signature.from_callable' classmethod. Closes #17373Yury Selivanov2014-03-271-0/+12
| |
* | Improve descriptions of introspection changesNick Coghlan2014-03-081-0/+5
|/ | | | | | | | | Several of the introspection changes in Python 3.4 are indirect, where inspect module changes affected pydoc, and those in turn affected the help builtin. This update adds versionchanged notes in the key locations, as well as more coverage in the What's New document (in particular, a note in the porting section regarding the expanded domain for inspect.getfullargspec).
* inspect.doc: Soften the note about inspect.signature not supportingYury Selivanov2014-01-301-2/+2
| | | | all builtin functions.
* inspect.docs: Document constructors for Signature & Parameter #20442Yury Selivanov2014-01-301-2/+11
|
* inspect.signature: Use '/' to separate positional-only parameters fromYury Selivanov2014-01-271-3/+6
| | | | the rest in Signature.__str__. #20356
* doc/inspect: Clarify docs for __defaults__, add docs for __kwdefaults__ #20380Yury Selivanov2014-01-271-1/+6
|