summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
Commit message (Collapse)AuthorAgeFilesLines
* Docs: remove redundant "adverb-adjective" hyphens from compound modifiers ↵Ned Batchelder2022-07-051-2/+2
| | | | | (GH-94551) Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
* bpo-40838: document `getdoc`, `getmodule`, `getsourcefile` in `inspect` ↵Nikita Sobolev2022-05-181-2/+5
| | | | | | returns `None` (#30575) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-88116: Enhance the inspect frame APIs to use the extended position ↵Pablo Galindo Salgado2022-04-231-24/+102
| | | | information (GH-91531)
* bpo-45492: Corrected documentation for co_names in inspect library doc ↵slateny2022-03-021-2/+3
| | | | (GH-31456)
* bpo-29418: Implement inspect.ismethodwrapper and fix inspect.isroutine for ↵Hakan Çelik2022-02-161-0/+8
| | | | | cases where methodwrapper is given (GH-19261) Automerge-Triggered-By: GH:isidentical
* bpo-30533: Add docs for `inspect.getmembers_static` (#29874)Weipeng Hong2021-12-011-0/+18
| | | | | * Add docs for `inspect.getmembers_static` * update
* bpo-45320: Remove long-deprecated inspect methods (GH-28618)Hugo van Kemenade2021-10-201-47/+0
|
* bpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052)Pablo Galindo2021-07-071-0/+4
|
* bpo-43693 Get rid of CO_NOFREE -- it's unused (GH-26839)Guido van Rossum2021-06-231-4/+0
| | | | | | All uses of this flag are either setting it or in doc or tests for it. So we should be able to get rid of it completely.
* [doc] Fix indentation in inspect documentation (GH-24846)Numerlor2021-05-211-4/+4
|
* bpo-43987: Add "Annotations Best Practices" HOWTO doc. (#25746)larryhastings2021-05-021-0/+7
| | | Add "Annotations Best Practices" HOWTO doc.
* bpo-43817: Add inspect.get_annotations(). (#25522)larryhastings2021-04-301-12/+64
| | | | | Add inspect.get_annotations, which safely computes the annotations defined on an object. It works around the quirks of accessing the annotations from various types of objects, and makes very few assumptions about the object passed in. inspect.get_annotations can also correctly un-stringize stringized annotations. inspect.signature, inspect.from_callable, and inspect.from_function now call inspect.get_annotations to retrieve annotations. This means inspect.signature and inspect.from_callable can now un-stringize stringized annotations, too.
* bpo-42990: Add __builtins__ attribute to functions (GH-24559)Victor Stinner2021-02-181-0/+6
| | | | | | Expose the new PyFunctionObject.func_builtins member in Python as a new __builtins__ attribute on functions. Document also the behavior change in What's New in Python 3.10.
* bpo-41960: Add globalns and localns parameters to inspect.signature and ↵Batuhan Taskaya2020-12-231-3/+19
| | | | Signature.from_callable (GH-22583)
* [doc] Fix erroneous backslashes in signatures and names (GH-23658)Andre Delfino2020-12-171-4/+4
| | | | | The issue being resolved is shown in the 3.10 docs (if you select docs for older versions you won't see a visual glitch). The newer sphinx version that produces the 3.10 docs doesn't treat the backslash to escape things in some situations it previously did.
* bpo-40257: Revert changes to inspect.getdoc() (GH-20073)Serhiy Storchaka2020-05-181-4/+1
|
* bpo-40257: Output object's own docstring in pydoc (GH-19479)Serhiy Storchaka2020-04-151-1/+4
|
* bpo-39775: inspect: Change Signature.parameters back to OrderedDict. (GH-18684)Inada Naoki2020-03-021-7/+4
|
* bpo-36350: inspect: Replace OrderedDict with dict. (GH-12412)Rémi Lapeyre2020-01-281-8/+14
|
* bpo-38918: Add __module__ entry for function & method type in inspect docs ↵Parth Sharma2019-12-201-0/+6
| | | | | | | | | | | table (GH-17408) Adds` __module__ ` entries for function & method types in inspect docs table. https://bugs.python.org/issue38918
* Fix the description of isdatadescriptor in inspect.rst (#16645)HongWeipeng2019-11-151-1/+1
|
* bpo-38738: Fix formatting of True and False. (GH-17083)Serhiy Storchaka2019-11-121-25/+25
| | | | | | | | | * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in monospace). * Replaced "True/False" with "true/false" if it can be not only bool. * Replaced some 1/0 with True/False if it corresponds the code. * "Returns <bool>" is replaced with "Return <bool>".
* bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)Serhiy Storchaka2019-06-011-1/+1
|
* bpo-36540: Documentation for PEP570 - Python positional only arguments (#13202)Pablo Galindo2019-05-281-7/+6
| | | | | | | | | | | | | | | | | | * bpo-36540: Documentation for PEP570 - Python positional only arguments * fixup! bpo-36540: Documentation for PEP570 - Python positional only arguments * Update reference for compound statements * Apply suggestions from Carol Co-Authored-By: Carol Willing <carolcode@willingconsulting.com> * Update Doc/tutorial/controlflow.rst Co-Authored-By: Carol Willing <carolcode@willingconsulting.com> * Add extra bullet point and minor edits
* bpo-36751: Undeprecate getfullargspec (GH-13245)Pablo Galindo2019-05-161-5/+0
|
* bpo-36751: Deprecate getfullargspec and report positional-only args as ↵Pablo Galindo2019-04-301-0/+5
| | | | | | | | regular args (GH-13016) * bpo-36751: Deprecate getfullargspec and report positional-only args as regular args * Use inspect.signature in testhelpers
* bpo-21314: Add a FAQ entry about positional only parameters (GH-10641)Lysandros Nikolaou2019-03-101-0/+4
|
* bpo-34890: Make iscoroutinefunction, isgeneratorfunction and ↵Pablo Galindo2018-10-261-0/+12
| | | | | | | | | | | isasyncgenfunction work with functools.partial (GH-9903) inspect.isfunction() processes both inspect.isfunction(func) and inspect.isfunction(partial(func, arg)) correctly but some other functions in the inspect module (iscoroutinefunction, isgeneratorfunction and isasyncgenfunction) lack this functionality. This commits adds a new check in the mentioned functions in the inspect module so they can work correctly with arbitrarily nested partial functions.
* bpo-35038: AttributeError: 'frame' object has no attribute 'f_restricted'. ↵Stéphane Wirtel2018-10-251-3/+0
| | | | | (GH-10098) https://bugs.python.org/issue35038
* Fix "Python" casing in a few places (GH-9001)Andrés Delfino2018-09-141-1/+1
|
* bpo-33197: Add versionadded tag to the documentation of ParameterKind (GH-7536)Dong-hee Na2018-06-081-0/+2
|
* bpo-33197: Add description property for _ParameterKind. (GH-7206)Dong-hee Na2018-06-081-0/+17
|
* Clarify the inspect.getmembers predicate parameter (#6615)Brian Curtin2018-04-261-3/+4
| | | | | | | | Previously, the predicate parameter was mentioned, but what it was to be called with was not documented and required either trial-and-error or looking into the source to find that it is called with the `value`, or second item, of the full members list. This change addresses what the predicate will receive, as well as does some light formatting to make this clear.
* bpo-32697: Definition order of kwonly params is now guaranteed preserved. ↵larryhastings2018-01-281-2/+13
| | | | | | (#5391) Definition order of kwonly params is now guaranteed preserved.
* bpo-32591: Add native coroutine origin tracking (#5250)Nathaniel J. Smith2018-01-211-0/+10
| | | | | | * Add coro.cr_origin and sys.set_coroutine_origin_tracking_depth * Use coroutine origin information in the unawaited coroutine warning * Stop using set_coroutine_wrapper in asyncio debug mode * In BaseEventLoop.set_debug, enable debugging in the correct thread
* 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.