Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | inspect.getfile: Don't crash on classes without '__module__' attribute #20372 | Yury Selivanov | 2014-01-27 | 1 | -0/+10 | |
| | | | | | | | | | | Some classes defined in C may not have the '__module__' attribute, so we now handle this case to avoid having unexepected AttributeError. | |||||
* | | Issue #20189: Four additional builtin types (PyTypeObject, | Larry Hastings | 2014-01-24 | 1 | -30/+68 | |
| | | | | | | | | | | | | 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. | |||||
* | | Issue #20226: Major improvements to Argument Clinic. | Larry Hastings | 2014-01-16 | 1 | -1/+4 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * You may now specify an expression as the default value for a parameter! Example: "sys.maxsize - 1". This support is intentionally quite limited; you may only use values that can be represented as static C values. * Removed "doc_default", simplified support for "c_default" and "py_default". (I'm not sure we still even need "py_default", but I'm leaving it in for now in case a use presents itself.) * Parameter lines support a trailing '\\' as a line continuation character, allowing you to break up long lines. * The argument parsing code generated when supporting optional groups now uses PyTuple_GET_SIZE instead of PyTuple_GetSize, leading to a 850% speedup in parsing. (Just kidding, this is an unmeasurable difference.) * A bugfix for the recent regression where the generated prototype from pydoc for builtins would be littered with unreadable "=<object ...>"" default values for parameters that had no default value. * Converted some asserts into proper failure messages. * Many doc improvements and fixes. | |||||
* | | Issue #20144: Argument Clinic now supports simple constants as parameter | Larry Hastings | 2014-01-07 | 1 | -1/+12 | |
| | | | | | | | | | | default values. inspect.Signature correspondingly supports them in __text_signature__ fields for builtins. | |||||
* | | Issue #19535: Fixed test_docxmlrpc, test_functools, test_inspect, and | Serhiy Storchaka | 2013-12-08 | 1 | -1/+2 | |
|\ \ | |/ | | | | | test_statistics when python is run with -OO. | |||||
* | | Fix inspect.signature tests for builtins when docstrings are compiled out. | Larry Hastings | 2013-11-24 | 1 | -1/+6 | |
| | | ||||||
* | | Issue #19674: inspect.signature() now produces a correct signature | Larry Hastings | 2013-11-23 | 1 | -4/+3 | |
| | | | | | | | | for some builtins. | |||||
* | | Issue #19030: final pieces for proper location of various class attributes ↵ | Ethan Furman | 2013-10-21 | 1 | -5/+15 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | located in the metaclass. Okay, hopefully the very last patch for this issue. :/ I realized when playing with Enum that the metaclass attributes weren't always displayed properly. New patch properly locates DynamicClassAttributes, virtual class attributes (returned by __getattr__ and friends), and metaclass class attributes (if they are also in the metaclass __dir__ method). Also had to change one line in pydoc to get this to work. Added tests in test_inspect and test_pydoc to cover these situations. | |||||
* | | Close #19030: inspect.getmembers and inspect.classify_class_attrs | Ethan Furman | 2013-10-18 | 1 | -11/+89 | |
| | | | | | | | | | | | | | | | | | | | | 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. | |||||
* | | Tweak skipIf message | Brett Cannon | 2013-10-02 | 1 | -1/+1 | |
| | | ||||||
* | | Try to fix issue #19134 again | Brett Cannon | 2013-10-02 | 1 | -5/+6 | |
| | | ||||||
* | | Issue #19134: Make a test in inspect conditional on multiprocessing | Brett Cannon | 2013-09-30 | 1 | -0/+3 | |
| | | | | | | | | | | | | being available. Thanks to Remi Pointel for the bug report. | |||||
* | | Close #19030: improvements to inspect and Enum. | Ethan Furman | 2013-09-25 | 1 | -0/+24 | |
| | | | | | | | | | | | | | | | | | | | | 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 module | Nick Coghlan | 2013-09-22 | 1 | -2/+44 | |
| | | ||||||
* | | Issue #18830: inspect.getclasstree() no more produces duplicated entries even | Serhiy Storchaka | 2013-09-05 | 1 | -2/+19 | |
|\ \ | |/ | | | | | when input list contains duplicates. | |||||
| * | Issue #18830: inspect.getclasstree() no more produces duplicated entries even | Serhiy Storchaka | 2013-09-05 | 1 | -2/+19 | |
| | | | | | | | | when input list contains duplicates. | |||||
* | | Close #13266: Add inspect.unwrap | Nick Coghlan | 2013-07-28 | 1 | -1/+73 | |
| | | | | | | | | Initial patch by Daniel Urban and Aaron Iles | |||||
* | | #17526: merge with 3.3. | Ezio Melotti | 2013-03-30 | 1 | -0/+6 | |
|\ \ | |/ | ||||||
| * | #17526: fix an IndexError raised while passing code without filename to ↵ | Ezio Melotti | 2013-03-30 | 1 | -0/+6 | |
| | | | | | | | | inspect.findsource(). Initial patch by Tyler Doyle. | |||||
* | | Issue #17071: Signature.bind() now works when one of the keyword arguments ↵ | Antoine Pitrou | 2013-01-29 | 1 | -0/+10 | |
|\ \ | |/ | | | | | is named self. | |||||
| * | Issue #17071: Signature.bind() now works when one of the keyword arguments ↵ | Antoine Pitrou | 2013-01-29 | 1 | -0/+10 | |
| | | | | | | | | is named ``self``. | |||||
* | | Replace IOError with OSError (#16715) | Andrew Svetlov | 2012-12-25 | 1 | -4/+4 | |
|/ | ||||||
* | Fix test_inspect messing up with linecache.cache. | Antoine Pitrou | 2012-07-08 | 1 | -3/+9 | |
| | ||||||
* | Properly test the various builtins lookup cases in inspect.getclosurevars | Nick Coghlan | 2012-06-23 | 1 | -0/+24 | |
| | ||||||
* | Use non-deprecated speling. | Antoine Pitrou | 2012-06-23 | 1 | -44/+44 | |
| | ||||||
* | Close #15153: Added inspect.getgeneratorlocals to simplify whitebox testing ↵ | Nick Coghlan | 2012-06-23 | 1 | -0/+46 | |
| | | | | of generator state updates | |||||
* | Close #13062: Add inspect.getclosurevars to simplify testing stateful closures | Nick Coghlan | 2012-06-23 | 1 | -1/+100 | |
| | ||||||
* | Issue #15008: Implement PEP 362 "Signature Objects". | Larry Hastings | 2012-06-22 | 1 | -1/+922 | |
| | | | | Patch by Yury Selivanov. | |||||
* | Prevent test_inspect from keeping alive a ton of frames and local variables ↵ | Antoine Pitrou | 2012-06-17 | 1 | -12/+15 | |
| | | | | | | by way of a global variable keeping a reference to a traceback. Should fix some buildbot failures. | |||||
* | Merge more test vs hashing-order fixes from 3.2. | Georg Brandl | 2012-02-20 | 1 | -1/+2 | |
|\ | ||||||
| * | Disable an inspect test: it depends on dict ordering which parameter is ↵ | Georg Brandl | 2012-02-20 | 1 | -1/+2 | |
| | | | | | | | | reported as duplicate. | |||||
* | | Add part of test_inspect test from 2.7 | Antoine Pitrou | 2012-01-18 | 1 | -0/+11 | |
|\ \ | |/ | ||||||
| * | Add part of test_inspect test from 2.7 | Antoine Pitrou | 2012-01-18 | 1 | -0/+11 | |
| | | ||||||
* | | Merge | Michael Foord | 2011-12-22 | 1 | -0/+17 | |
|\ \ | |/ | ||||||
| * | Metaclasses with metaclasses with a __dict__ descriptor can no longer ↵ | Michael Foord | 2011-12-22 | 1 | -0/+17 | |
| | | | | | | | | | | | | trigger code execution with inspect.getattr_static. Closes issue 11829. | |||||
* | | Issue #1785: Fix inspect and pydoc with misbehaving descriptors. | Antoine Pitrou | 2011-12-21 | 1 | -0/+79 | |
|\ \ | |/ | | | | | Also fixes issue #13581: `help(type)` wouldn't display anything. | |||||
| * | Issue #1785: Fix inspect and pydoc with misbehaving descriptors. | Antoine Pitrou | 2011-12-21 | 1 | -0/+79 | |
| | | | | | | | | Also fixes issue #13581: `help(type)` wouldn't display anything. | |||||
* | | Merge 3.2 | Michael Foord | 2011-12-18 | 1 | -0/+5 | |
|\ \ | |/ | ||||||
| * | Fix inspect.getattr_static to work on modules (again). | Michael Foord | 2011-12-18 | 1 | -0/+5 | |
| | | | | | | | | Closes issue 11813. | |||||
* | | #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). | Ezio Melotti | 2011-09-28 | 1 | -1/+1 | |
|/ | ||||||
* | allow "fake" filenames in findsource (closes #9284) | Benjamin Peterson | 2011-06-11 | 1 | -0/+17 | |
| | | | | | | This allows findsource() to work in doctests. A patch from Dirkjan Ochtman. | |||||
* | #11938: Fix duplicated test name in test_inspect. Patch by Andreas Stührk. | Ezio Melotti | 2011-04-27 | 1 | -1/+1 | |
| | ||||||
* | Correct handling of functions with only kwarg args in getcallargs (closes ↵ | Benjamin Peterson | 2011-03-28 | 1 | -0/+33 | |
| | | | | | | #11256) A patch from Daniel Urban. | |||||
* | Closes issue 11133. Fixes two cases where inspect.getattr_static could ↵ | Michael Foord | 2011-03-15 | 1 | -0/+47 | |
| | | | | trigger code execution | |||||
* | Issue4335: Added a test for inspect.getsourcelines with a module without EOL ↵ | Alexander Belopolsky | 2010-12-02 | 1 | -8/+29 | |
| | | | | at EOF. | |||||
* | Reverted unintended change from r86916 | Alexander Belopolsky | 2010-12-01 | 1 | -7/+0 | |
| | ||||||
* | Issue #4113: Added custom __repr__ method to functools.partial. | Alexander Belopolsky | 2010-12-01 | 1 | -0/+7 | |
| | ||||||
* | Issue 10220: switch to using string constants rather than integers for ↵ | Nick Coghlan | 2010-11-30 | 1 | -0/+8 | |
| | | | | 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 Coghlan | 2010-11-21 | 1 | -1/+46 | |
| | | | | Eckhardt | |||||
* | #9424: Replace deprecated assert* methods in the Python test suite. | Ezio Melotti | 2010-11-20 | 1 | -2/+2 | |
| |