Commit graph

75 commits

Author SHA1 Message Date
Victor Stinner
4a74a9a750 Issue #21205: Complete the "versionchanged" note in inspect documentation 2014-06-16 16:25:22 +02:00
Victor Stinner
40ee30181f Issue #21205: Add a new `__qualname__` attribute to generator, the qualified
name, and use it in the representation of a generator (``repr(gen)``). The
default name of the generator (``__name__`` attribute) is now get from the
function instead of the code. Use ``gen.gi_code.co_name`` to get the name of
the code.
2014-06-16 15:59:28 +02:00
Yury Selivanov
67ae50ee1c inspect: Make Signature and Parameter hashable. Issue #20334. 2014-04-08 11:46:50 -04:00
Yury Selivanov
67d727e824 inspect.docs: Document that Signature and Parameter are now picklable (issue #20726) 2014-03-29 13:24:14 -04:00
Yury Selivanov
232b934620 inspect.docs: Fix indentation and version-added for Signature.from_callable 2014-03-29 13:18:30 -04:00
Yury Selivanov
da39645ad3 inspect.Signature: Add 'Signature.from_callable' classmethod. Closes #17373 2014-03-27 12:09:24 -04:00
Nick Coghlan
1635578d5f Improve descriptions of introspection changes
Several of the introspection changes in Python 3.4 are indirect,
where inspect module changes affected pydoc, and those in turn
affected the help builtin. This update adds versionchanged
notes in the key locations, as well as more coverage in the
What's New document (in particular, a note in the porting
section regarding the expanded domain for inspect.getfullargspec).
2014-03-08 16:36:37 +10:00
Yury Selivanov
d71e52fc33 inspect.doc: Soften the note about inspect.signature not supporting
all builtin functions.
2014-01-30 00:22:57 -05:00
Yury Selivanov
783568980a inspect.docs: Document constructors for Signature & Parameter #20442 2014-01-30 00:10:54 -05:00
Yury Selivanov
2393dca472 inspect.signature: Use '/' to separate positional-only parameters from
the rest in Signature.__str__. #20356
2014-01-27 15:07:58 -05:00
Yury Selivanov
ea2d66e68a doc/inspect: Clarify docs for __defaults__, add docs for __kwdefaults__ #20380 2014-01-27 14:26:28 -05:00
Larry Hastings
5c66189e88 Issue #20189: Four additional builtin types (PyTypeObject,
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
2014-01-24 06:17:25 -08:00
Benjamin Peterson
c22eaecd53 merge 3.3 (closes #20108) 2014-01-02 12:26:50 -06:00
Benjamin Peterson
3a990c69b8 remove brackets 2014-01-02 12:22:30 -06:00
Nick Coghlan
367df12044 Assorted 3.4 What's New updates
- cross-references and attributions for inspect changes
- note improvements to inspect and pydoc handling of
  metaclasses and dynamic attributes (courtesy of the
  enum PEP)
- group all CPython implementation specific changes
  into a common section
- add see also links for most of the PEPs
- fix the see also link for the release PEP
- add suitable caveats on Argument Clinic inclusion
- clarify the change to __wrapped__ handling
2013-10-27 01:57:34 +10:00
Ethan Furman
63c141cacd Close #19030: inspect.getmembers and inspect.classify_class_attrs
Order of search is now:
  1. Try getattr
  2. If that throws an exception, check __dict__ directly
  3. If still not found, walk the mro looking for the eldest class that has
     the attribute (e.g. things returned by __getattr__)
  4. If none of that works (e.g. due to a buggy __dir__, __getattr__, etc.
     method or missing __slot__ attribute), ignore the attribute entirely.
2013-10-18 00:27:39 -07:00
Serhiy Storchaka
98b28fddd8 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:12:09 +03:00
Serhiy Storchaka
bfdcd436f0 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:09:14 +03:00
Nick Coghlan
f94a16b494 Close #18626: add a basic CLI for the inspect module 2013-09-22 22:46:49 +10:00
Ethan Furman
668dede7e9 Close #18929: inspect.classify_class_attrs will now search the metaclasses (last) to find where an attr was defined. 2013-09-14 18:53:26 -07:00
Antoine Pitrou
58720d6145 Issue #17934: Add a clear() method to frame objects, to help clean up expensive details (local variables) and break reference cycles. 2013-08-05 23:26:40 +02:00
Nick Coghlan
e8c45d6d0e Close #13266: Add inspect.unwrap
Initial patch by Daniel Urban and Aaron Iles
2013-07-28 20:00:01 +10:00
Georg Brandl
44ea77bd81 Closes #4159: add LaTeX tabular column specifications to tables that otherwise are cut off or have overlapping text. 2013-03-28 13:28:44 +01:00
Andrew Svetlov
735d31723f Issue #16243: add example for inspect.formatargspec
Patch by Berker Peksag.
2012-10-27 00:28:20 +03:00
Larry Hastings
bf84bbabbb Mention that "defaults" can be None for inspect.getfullargspec.
Also minor formatting cleanups.
2012-09-21 09:40:41 -07:00
Ezio Melotti
8429b6784b #15831: merge with 3.2 2012-09-14 06:35:09 +03:00
Georg Brandl
e471772fff Review of signature docs. 2012-08-14 09:45:28 +02:00
Andrew Svetlov
eed1808dec Minor update of docs for inspect module. 2012-08-13 18:23:54 +03:00
Andrew Svetlov
4e48bf929b Issue #15151: PEP 362 — document signature and related classes for inspect.py
Initial patch by Yury Selivanov
2012-08-13 17:10:28 +03:00
Andrew Svetlov
e939f383c1 Fix documentation for inspect module to pass doctest 2012-08-09 13:25:32 +03:00
Nick Coghlan
76e077001d Close #15387: inspect.getmodulename() now uses a new importlib.machinery.all_suffixes() API rather than the deprecated inspect.getmoduleinfo() 2012-07-18 23:14:57 +10:00
Nick Coghlan
04e2e3f231 Close #15153: Added inspect.getgeneratorlocals to simplify whitebox testing of generator state updates 2012-06-23 19:52:05 +10:00
Nick Coghlan
2f92e54507 Close #13062: Add inspect.getclosurevars to simplify testing stateful closures 2012-06-23 19:39:55 +10:00
Brett Cannon
cb66eb0dec Issue #13959: Deprecate imp.get_suffixes() for new attributes on
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.
2012-05-11 12:58:42 -04:00
Michael Foord
3af125a4aa Closes issue 14634. unittest.mock.create_autospec now supports keyword only arguments. 2012-04-21 18:22:28 +01:00
Antoine Pitrou
62ab10a05a Replace mentions of IOError 2011-10-12 20:10:51 +02:00
Éric Araujo
941afedd74 Avoid using the default reST role. Makes Doc/tools/rstlint.py happy. 2011-09-01 02:47:34 +02:00
Michael Foord
dcebe0f2dc Closes issue 11133. Fixes two cases where inspect.getattr_static could trigger code execution 2011-03-15 19:20:44 -04:00
Raymond Hettinger
469271d4ea More source links 2011-01-27 20:38:46 +00:00
Raymond Hettinger
a275c989c9 Add more examples 2011-01-20 04:03:19 +00:00
Georg Brandl
b30f3303f7 Fix various issues (mostly Python 2 relics) found by Jacques Ducasse. 2011-01-06 09:23:56 +00:00
Raymond Hettinger
48f3bd331c Nits 2010-12-16 00:30:53 +00:00
Éric Araujo
28053fb174 Remove unnecessary object base class in docs (#10366).
Also add a note about inheritance from `object` being default.
2010-11-22 03:09:19 +00:00
Nick Coghlan
2dad5cade4 Add a couple of missing versionadded tags in the inspect module docs 2010-11-21 03:55:53 +00:00
Nick Coghlan
e0f04659cd Issue #10220: Add inspect.getgeneratorstate(). Initial patch by Rodolpho Eckhardt 2010-11-21 03:44:04 +00:00
Michael Foord
e516265bbc Issue 9732: fetch the method resolution order from the type metaclass directly in getattr_static 2010-11-20 16:40:44 +00:00
Michael Foord
cc7ebb8f69 Issue 9732: remove use of __class__ in inspect.getattr_static and note the mro exception to code execution 2010-11-20 16:20:16 +00:00
Michael Foord
95fc51dfda Issue 9732: addition of getattr_static to the inspect module 2010-11-20 15:07:30 +00:00
Georg Brandl
39cadc3ffe #4968: updates to inspect.is* function docs. 2010-10-15 16:53:24 +00:00
Georg Brandl
c1c4bf85c1 #9683: remove broken dead code dealing with nested arguments removed from Py3k, and update the docs and docstrings accordingly. 2010-10-15 16:07:41 +00:00