| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
(GH-18786)
`list(sys.modules.items())` was apparently not immune to "dictionary
changed size during iteration" errors.
Tested internally using an integration test that has run into this a couple of times in the past two years. With this patch applied, the test is no longer flaky.
(cherry picked from commit 85cf1d514b84dc9a4bcb40e20a12e1d82ff19f20)
Co-authored-by: Gregory P. Smith <gps@google.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-16108) (GH-16114)
https://bugs.python.org/issue34706
Specifically in the case of a class that does not override its
constructor signature inherited from object.
These are Buck Evan @bukzor's changes cherrypicked from GH-9344.
(cherry picked from commit 5b9ff7a0dcb16d6f5c3cd4f1f52e0ca6a4bde586)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
| |
Constants added by the site module like exit() "should not be used in programs"
(cherry picked from commit e3c59a75279b0df4e7553d6f0031e202de434e43)
Co-authored-by: Alan Yee <alanyee@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, inspect.getfile(str) will report nonsense:
```pytb
>>> inspect.getfile(str)
TypeError: <module 'builtins' (built-in)> is a built-in class
```
This fixes that
https://bugs.python.org/issue37173
(cherry picked from commit d407d2a7265f6102e51a1d62b3fd28b4f7a78d16)
Co-authored-by: Philipp A <flying-sheep@web.de>
|
| |
|
|
|
| |
(cherry picked from commit ded87d804e2a85b2a3ea9e7a11384b41fafdfa29)
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
|
| |
|
|
|
|
| |
https://bugs.python.org/issue34871
(cherry picked from commit 6f85b826b527e240551613aeec3118a5469e3a33)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(GH-8864)
(cherry picked from commit 91cb298f811961277fd4cc4a32211899d48bedcb)
Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
|
| |
|
|
|
|
|
| |
warning (GH-7655) (GH-7657)
(cherry picked from commit 41254ebd5e4f40a2e095d8aaea60bf3973de4647)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 46c5cd0f6e22bdfbdd3f0b18f1d01eda754e7e11)
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-7204)
(cherry picked from commit a9cab433bbf02f3a1de59d14dc8f583181ffe2d5)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-6004)
(cherry picked from commit 8a387219bdfb6ee34928d6168ac42ca559f11c9a)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
namespace package (GH-5980) (GH-5997)
* bpo-32991: Add test capturing expectation.
DocTestFinder.find should return an empty list for doctests in a namespace package.
* bpo-32991: Restore expectation that inspect.getfile on a namespace package raises TypeError.
(cherry picked from commit b9650a04a81355c8a7dcd0464c28febfb4bfc0a9)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| | |
|
| |
|
|
| |
Add types.ClassMethodDescriptorType for unbound class methods.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Some objects (like test mocks) auto-generate new objects on
attribute access, which can lead to an infinite loop in
inspect.unwrap().
Ensuring references are retained to otherwise temporary objects
and capping the size of the memo dict turns this case into a
conventional exception instead.
|
| |
|
|
|
|
|
|
| |
* Replaced list(<generator expression>) with list comprehension
* Replaced dict(<generator expression>) with dict comprehension
* Replaced set(<list literal>) with set literal
* Replaced builtin func(<list comprehension>) with func(<generator
expression>) when supported (e.g. any(), all(), tuple(), min(), &
max())
|
| | |
|
| |
|
|
|
|
|
| |
At the time when an abstract base class' __init_subclass__ runs,
ABCMeta.__new__ has not yet finished running, so in the presence of
__init_subclass__, inspect.isabstract() can no longer depend only on
TPFLAGS_IS_ABSTRACT.
|
| | |
|
| |\ |
|
| | |
| |
| |
| | |
Noticed by Serhiy Storchaka.
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| | |
context
Patch by Sam Breese.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
Patch by Justin Mayfield.
|
| | | |
|
| |\ \
| |/
| |
| | |
function annotations. Ivan L. (3.5->3.6)
|
| | |
| |
| |
| | |
function annotations. Ivan L.
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
Patch by Frederick Wagner (issue #26347)
|
| | |
| |
| |
| |
| | |
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.
|
| |\ \
| |/
| |
| | |
Original patch by John Mark Vandenberg.
|
| | |
| |
| |
| | |
Original patch by John Mark Vandenberg.
|
| | |
| |
| |
| | |
Noticed by Yaroslav Halchenko.
|
| |\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The fix for Issue #21217 introduced a regression that caused
`inspect.getsource` to return incorrect results on nested
functions. The root cause of the regression was due to
switching the implementation to analyze the underlying
bytecode instead of the source code.
This commit switches things back to analyzing the source code
in a more complete way. The original bug and the regression
are both fixed by the new source code analysis.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The fix for Issue #21217 introduced a regression that caused
`inspect.getsource` to return incorrect results on nested
functions. The root cause of the regression was due to
switching the implementation to analyze the underlying
bytecode instead of the source code.
This commit switches things back to analyzing the source code
in a more complete way. The original bug and the regression
are both fixed by the new source code analysis.
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
| |
Patch by Kai Groner.
|
| |\ |
|
| | | |
|