summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
Commit message (Collapse)AuthorAgeFilesLines
* Close #19030: improvements to inspect and Enum.Ethan Furman2013-09-251-29/+69
| | | | | | | | | | inspect.getmembers and inspect.classify_class_attrs now search the metaclass mro for types.DynamicClassAttributes (what use to be called enum._RouteClassAttributeToGetattr); in part this means that these two functions no longer rely solely on dir(). Besides now returning more accurate information, these improvements also allow a more helpful help() on Enum classes.
* Close #18626: add a basic CLI for the inspect moduleNick Coghlan2013-09-221-0/+61
|
* Close #18929: inspect.classify_class_attrs will now search the metaclasses ↵Ethan Furman2013-09-151-1/+6
| | | | (last) to find where an attr was defined.
* Issue #18830: inspect.getclasstree() no more produces duplicated entries evenSerhiy Storchaka2013-09-051-1/+2
|\ | | | | | | when input list contains duplicates.
| * Issue #18830: inspect.getclasstree() no more produces duplicated entries evenSerhiy Storchaka2013-09-051-1/+2
| | | | | | | | when input list contains duplicates.
* | #18705: merge with 3.3.Ezio Melotti2013-08-171-2/+2
|\ \ | |/
| * #18705: fix a number of typos. Patch by Févry Thibault.Ezio Melotti2013-08-171-2/+2
| |
* | Close #13266: Add inspect.unwrapNick Coghlan2013-07-281-7/+37
| | | | | | | | Initial patch by Daniel Urban and Aaron Iles
* | Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)Brett Cannon2013-07-041-1/+1
| |
* | Issue #17177: The imp module is pending deprecation.Brett Cannon2013-06-161-1/+3
| | | | | | | | | | | | To make sure there is no issue with code that is both Python 2 and 3 compatible, there are no plans to remove the module any sooner than Python 4 (unless the community moves to Python 3 solidly before then).
* | Issue #18200: Update the stdlib (except tests) to useBrett Cannon2013-06-141-1/+1
| | | | | | | | ModuleNotFoundError.
* | #17115,17116: Have modules initialize the __package__ and __loader__Brett Cannon2013-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attributes to None. The long-term goal is for people to be able to rely on these attributes existing and checking for None to see if they have been set. Since import itself sets these attributes when a loader does not the only instances when the attributes are None are from someone overloading __import__() and not using a loader or someone creating a module from scratch. This patch also unifies module initialization. Before you could have different attributes with default values depending on how the module object was created. Now the only way to not get the same default set of attributes is to circumvent initialization by calling ModuleType.__new__() directly.
* | #17526: merge with 3.3.Ezio Melotti2013-03-301-1/+1
|\ \ | |/
| * #17526: fix an IndexError raised while passing code without filename to ↵Ezio Melotti2013-03-301-1/+1
| | | | | | | | inspect.findsource(). Initial patch by Tyler Doyle.
* | Issue #17071: Signature.bind() now works when one of the keyword arguments ↵Antoine Pitrou2013-01-291-4/+4
|\ \ | |/ | | | | is named self.
| * Issue #17071: Signature.bind() now works when one of the keyword arguments ↵Antoine Pitrou2013-01-291-4/+4
| | | | | | | | is named ``self``.
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-10/+10
|/
* Issue #15401: Fix typo in inspect.getclosurevars docstring.Meador Inge2012-07-201-1/+1
|
* Close #15387: inspect.getmodulename() now uses a new ↵Nick Coghlan2012-07-181-2/+9
| | | | importlib.machinery.all_suffixes() API rather than the deprecated inspect.getmoduleinfo()
* Close #15153: Added inspect.getgeneratorlocals to simplify whitebox testing ↵Nick Coghlan2012-06-231-0/+18
| | | | of generator state updates
* Close #13062: Add inspect.getclosurevars to simplify testing stateful closuresNick Coghlan2012-06-231-0/+54
|
* Issue #15008: Implement PEP 362 "Signature Objects".Larry Hastings2012-06-221-3/+772
| | | | Patch by Yury Selivanov.
* Issue #14987: Add a missing import statementBrett Cannon2012-06-031-0/+1
|
* Issue #13959: Deprecate imp.get_suffixes() for new attributes onBrett Cannon2012-05-111-11/+16
| | | | | | | | | | | importlib.machinery that provide the suffix details for import. The attributes were not put on imp so as to compartmentalize everything importlib needs for setting up imports in importlib.machinery. This also led to an indirect deprecation of inspect.getmoduleinfo() as it directly returned imp.get_suffix's returned tuple which no longer makes sense.
* MergeMichael Foord2011-12-221-4/+5
|\
| * Metaclasses with metaclasses with a __dict__ descriptor can no longer ↵Michael Foord2011-12-221-4/+5
| | | | | | | | | | | | trigger code execution with inspect.getattr_static. Closes issue 11829.
* | Issue #1785: Fix inspect and pydoc with misbehaving descriptors.Antoine Pitrou2011-12-211-33/+46
|\ \ | |/ | | | | Also fixes issue #13581: `help(type)` wouldn't display anything.
| * Issue #1785: Fix inspect and pydoc with misbehaving descriptors.Antoine Pitrou2011-12-211-33/+46
| | | | | | | | Also fixes issue #13581: `help(type)` wouldn't display anything.
* | Merge 3.2Michael Foord2011-12-181-4/+6
|\ \ | |/
| * Fix inspect.getattr_static to work on modules (again).Michael Foord2011-12-181-4/+6
| | | | | | | | Closes issue 11813.
* | Merge 3.2Éric Araujo2011-11-291-1/+1
|\ \ | |/
| * Fix inspect.getmodule to use a copy of sys.modules for iteration (#13487).Éric Araujo2011-11-291-1/+1
| | | | | | | | | | | | This fixes a regression compared to 2.x, where sys.modules.items() returns a copy, as indicated by a comment in the source. Diagnosis and patch by Erik Tollerud.
* | remove unused imports (closes #12432)Benjamin Peterson2011-06-281-1/+0
| | | | | | | | A patch from Vincent Legoll.
* | give the names of missing positional or keyword-only arguments (closes #12356)Benjamin Peterson2011-06-241-12/+29
| |
* | merge 3.2 (#9284)Benjamin Peterson2011-06-111-2/+6
|\ \ | |/
| * allow "fake" filenames in findsource (closes #9284)Benjamin Peterson2011-06-111-2/+6
| | | | | | | | | | | | This allows findsource() to work in doctests. A patch from Dirkjan Ochtman.
* | greatly improve argument parsing error messages (closes #12265)Benjamin Peterson2011-06-061-50/+59
|/
* Correct handling of functions with only kwarg args in getcallargs (closes ↵Benjamin Peterson2011-03-281-2/+8
| | | | | | #11256) A patch from Daniel Urban.
* Closes issue 11133. Fixes two cases where inspect.getattr_static could ↵Michael Foord2011-03-151-6/+21
| | | | trigger code execution
* Issue 10220: switch to using string constants rather than integers for ↵Nick Coghlan2010-11-301-1/+4
| | | | inspect.getgeneratorstate() return values and make debugging friendly str() and repr() for generator states a requirement in the test suite
* Issue #10220: Add inspect.getgeneratorstate(). Initial patch by Rodolpho ↵Nick Coghlan2010-11-211-0/+20
| | | | Eckhardt
* Issue 9732: __class__ no longer checked on objects by getattr_staticMichael Foord2010-11-201-1/+8
|
* Issue 9732: fetch the method resolution order from the type metaclass ↵Michael Foord2010-11-201-2/+5
| | | | directly in getattr_static
* Issue 9732: remove use of __class__ in inspect.getattr_static and note the ↵Michael Foord2010-11-201-1/+1
| | | | mro exception to code execution
* Issue 9732: addition of getattr_static to the inspect moduleMichael Foord2010-11-201-0/+64
|
* classic classes are gone; whoppie!Benjamin Peterson2010-11-041-13/+1
|
* Issue #9308: Removed redundant coding cookies. Added tests forAlexander Belopolsky2010-10-151-1/+0
| | | | | importing encoded modules that do not depend on specific stdlib modules being encoded in a certain way.
* #9683: remove broken dead code dealing with nested arguments removed from ↵Georg Brandl2010-10-151-28/+12
| | | | Py3k, and update the docs and docstrings accordingly.
* Address XXX comment in dis.py: inspect.py now attempts to reuse the dis.py ↵Nick Coghlan2010-08-171-4/+14
| | | | compiler flag values before resorting to defining its own
* Issue #8983: Corrected docstrings.Alexander Belopolsky2010-08-161-1/+1
|