| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(GH-94551)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
|
|
|
|
|
|
| |
returns `None` (#30575)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
| |
information (GH-91531)
|
|
|
|
| |
(GH-31456)
|
|
|
|
|
| |
cases where methodwrapper is given (GH-19261)
Automerge-Triggered-By: GH:isidentical
|
|
|
|
|
| |
* Add docs for `inspect.getmembers_static`
* update
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Add "Annotations Best Practices" HOWTO doc.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signature.from_callable (GH-22583)
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
table (GH-17408)
Adds` __module__ ` entries for function & method types in inspect docs table.
https://bugs.python.org/issue38918
|
| |
|
|
|
|
|
|
|
|
|
| |
* "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-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
|
| |
|
|
|
|
|
|
|
|
| |
regular args (GH-13016)
* bpo-36751: Deprecate getfullargspec and report positional-only args as regular args
* Use inspect.signature in testhelpers
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
(GH-10098)
https://bugs.python.org/issue35038
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
(#5391)
Definition order of kwonly params is now guaranteed preserved.
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
| |
Initial patch by Vajrasky Kok.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Patch by Eric Appelt.
|
|
|
|
|
|
| |
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.
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|