summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-101100: Improve documentation on function attributes (#112933) ↵Alex Waygood2023-12-121-2/+3
| | | | | | (#113003) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.11] gh-101100: Improve documentation for attributes on instance methods ↵Miss Islington (bot)2023-12-081-1/+1
| | | | | | | | (GH-112832) (#112873) gh-101100: Improve documentation for attributes on instance methods (GH-112832) (cherry picked from commit ed21d0c1f4bd17b392e24bfd83e652723dad4ddf) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.11] gh-101100: Improve documentation of code object attributes (#112781) ↵Alex Waygood2023-12-061-2/+2
| | | | | (#112817) (cherry-picked from commit e9707d3c3d)
* [3.11] gh-101100: Properly document frame object attributes (#112735) (#112775)Alex Waygood2023-12-051-2/+2
| | | | | * [3.11] gh-101100: Properly document frame object attributes (#112735) (cherry-picked from commit d109f637c0)
* [3.11] gh-101100: Fix most Sphinx nitpicks in `inspect.rst` (GH-112662) ↵Miss Islington (bot)2023-12-031-6/+9
| | | | | | | | (#112667) gh-101100: Fix most Sphinx nitpicks in `inspect.rst` (GH-112662) (cherry picked from commit 45650d1c479a8b0370f126d821718dd3c502f333) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.11] Run more `inspect.rst` code snippets in CI (#112654) (#112656)Alex Waygood2023-12-031-27/+38
| | | (cherry-picked from commit 4ed46d224401243399b41c7ceef4532bd249da27)
* [3.11] [3.12] gh-112316: improve docs for `inspect.signature` and ↵Miss Islington (bot)2023-12-031-33/+51
| | | | | | | | | | `inspect.Signature` (GH-112631) (GH-112649) (#112652) [3.12] gh-112316: improve docs for `inspect.signature` and `inspect.Signature` (GH-112631) (GH-112649) (cherry-picked from commit fc9e24b01fb7da4160b82cef26981d72bb678c13) (cherry picked from commit 6221482f0c459c2e7dbd946265069246a400072a) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.11] gh-112316: Improve docs of `inspect.signature` and ↵Alex Waygood2023-12-021-19/+18
| | | | | | | `Signature.from_callable` (#112317) (#112630) (cherry-picked from commit a74daba7ca) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.11] gh-106310 - document the __signature__ attribute (GH-106311) (#111146)Miss Islington (bot)2023-10-231-0/+5
| | | | | Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.11] gh-110631: Fix reST indentation in `Doc/library` (GH-110685) (#110737)Ezio Melotti2023-10-111-8/+10
| | | | | | | | | | * [3.11] gh-110631: Fix reST indentation in `Doc/library` (GH-110685) Fix wrong indentation in the Doc/library dir.. (cherry picked from commit bb7923f556537a463c403dc1097726d8a8e1a6f2) Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> * Fix merge glitch.
* [3.11] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292) ↵Adam Turner2023-10-051-1/+1
| | | | | | (#110303) [3.11] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292). (cherry picked from commit 77e9aae3837d9f0cf87461d023896f2c4aeb282f)
* [3.11] gh-108857: improve markup in inspect.Signature.replace() docs ↵Miss Islington (bot)2023-09-061-1/+1
| | | | | | | | (GH-108862) (#108970) gh-108857: improve markup in inspect.Signature.replace() docs (GH-108862) (cherry picked from commit 6f8411cfd68134ccae01b0b4cb332578008a69e3) Co-authored-by: nabin2004 <107109731+nabin2004@users.noreply.github.com>
* gh-98239: Document that `inspect.getsource()` can raise `TypeError` (GH-101689)Miss Islington (bot)2023-03-231-0/+4
| | | | | (cherry picked from commit b6132085ca5418f714eff6e31d1d03369d3fd1d9) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-102296 Document that inspect.Parameter kinds support ordering (GH-102297)Miss Islington (bot)2023-02-271-2/+3
| | | | | | (cherry picked from commit 0db6f442598a1994c37f24e704892a2bb71a0a1b) Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Automerge-Triggered-By: GH:AlexWaygood
* GH-101898: Fix missing term references for hashable definition (GH-101899)Miss Islington (bot)2023-02-141-2/+2
| | | | | | Fix missing term references for hashable definition (cherry picked from commit 3690688149dca11589af59b7704541336613199a) Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
* gh-64019: Have attribute table in `inspect` docs link to module attributes ↵Miss Islington (bot)2022-11-251-6/+1
| | | | | | | | instead of listing them (GH-98116) (cherry picked from commit 7d2dcc53d09fe903329926bf7bbfe460b1465dab) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
* gh-95913: Copyedit & xref FrameInfo in Whatsnew inspect section (GH-98304)Miss Islington (bot)2022-10-221-7/+15
| | | | | (cherry picked from commit 8f30267ab49e1ef3ac3165a102b2196336547c8a) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Docs: remove redundant "adverb-adjective" hyphens from compound modifiers ↵Miss Islington (bot)2022-07-051-2/+2
| | | | | | | | (GH-94551) (GH-94557) Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021 (cherry picked from commit 3440d197a55800ecceea3e115e44b4262411359c) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* bpo-40838: document `getdoc`, `getmodule`, `getsourcefile` in `inspect` ↵Miss Islington (bot)2022-05-181-2/+5
| | | | | | | | | returns `None` (GH-30575) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit b86d783a4eff96306f315acf9a6f1aca85d47fc3) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* 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.