summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.Serhiy Storchaka2015-04-211-1/+1
|
* #23792: also catch interrupt around pipe.write.R David Murray2015-03-301-1/+6
| | | | | | The previous patch only dealt with KeyboardInterrupt when all of the data had been consumed by the pager. This deals with the interrupt when some data is still pending.
* #23792: Ignore KeyboardInterrupt when the pydoc pager is active.R David Murray2015-03-291-3/+10
| | | | | | | | | | | | | | | | | | | | Previously, if you hit ctl-c while the pager was active, the python that launched the subprocess for the pager would see the KeyboardInterrupt in the __exit__ method of the subprocess context manager where it was waiting for the subprocess to complete, ending the wait. This would leave the pager running, while the interactive interpreter, after handling the exception by printing it, would go back to trying to post a prompt...but the pager would generally have the terminal in raw mode, and in any case would be still trying to read from stdin. On some systems, even exiting python at that point would not restore the terminal mode. The problem with raw mode could also happen if ctl-C was hit when pydoc was called from the shell command line and the pager was active. Instead, we now wait on the subprocess in a loop, ignoring KeyboardInterrupt just like the pager does, until the pager actually exits. (Note: this was a regression relative to python2...in python2 the pager is called via system, and system does not return until the pager exits.)
* Issue #23374: Fixed pydoc failure with non-ASCII files when stdout encodingSerhiy Storchaka2015-02-201-9/+13
| | | | differs from file system encoding (e.g. on Mac OS).
* fix pydoc.apropos and pydoc.synopsis on modules with empty docstrings (#21548)Benjamin Peterson2015-02-171-2/+2
| | | | Patch by Yuyang Guo and Berker Peksag.
* Issue #22314: pydoc now works when the LINES environment variable is set.Serhiy Storchaka2014-11-271-2/+8
|
* Issue #20662: Argspec now is escaped in html output of pydoc.Serhiy Storchaka2014-11-171-1/+1
|
* Move Doc/tools/sphinxext content to Doc/tools, there is no need for the ↵Georg Brandl2014-09-301-1/+1
| | | | nested subdirectory anymore.
* Merge from 3.3Senthil Kumaran2014-09-171-2/+2
|\ | | | | | | Issue #22421 - Secure pydoc server run. Bind it to localhost instead of all interfaces.
| * Issue #22421 - Secure pydoc server run. Bind it to localhost instead of all ↵Senthil Kumaran2014-09-171-2/+2
| | | | | | | | interfaces.
| * #17476: make allmethods actually return all methods.R David Murray2013-03-191-1/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression relative to Python2. (In 2, methods on a class were unbound methods and matched the inspect queries being done, in 3 they are just functions and so were missed). This is an undocumented function that pydoc itself does not use, but I found that numpy at least uses it in its documentation generator. Original patch by Matt Bachmann.
| | * #17476: make allmethods actually return all methods.R David Murray2013-03-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression relative to Python2. (In 2, methods on a class were unbound methods and matched the inspect queries being done, in 3 they are just functions and so were missed). This is an undocumented function that pydoc itself does not use, but I found that numpy at least uses it in its documentation generator. Original patch by Matt Bachmann.
* | | Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.Zachary Ware2014-07-101-5/+3
| | |
* | | make sure the builtin help function doesn't fail when sys.stdin is not a ↵Benjamin Peterson2014-06-081-0/+2
| | | | | | | | | | | | | | | | | | valid file (closes #11709) Original patch by Amaury Forgeot d'Arc with a test by bdettmer.
* | | don't remove self from example code in the HTML output (closes #13223)Benjamin Peterson2014-06-071-2/+7
| | | | | | | | | | | | Patch by Víctor Terrón.
* | | Issue #18918: Removed non-existing topic from a list of available topics.Serhiy Storchaka2014-05-251-1/+0
| | | | | | | | | | | | | | | The 'File objects' section was removed in Python 3. Patch by Claudiu Popa.
* | | Issue #21398: Fix an unicode error in the pydoc pager when the documentationVictor Stinner2014-05-131-0/+3
| | | | | | | | | | | | contains characters not encodable to the stdout encoding.
* | | #9364: Improve the text printed by help(pydoc) and help(help).R David Murray2014-04-191-3/+4
| | |
* | | Issue #20976: pyflakes: Remove unused importsVictor Stinner2014-03-201-1/+1
| | |
* | | Issue #20710: The pydoc summary line no longer displays the "self" parameterLarry Hastings2014-02-211-5/+16
| | | | | | | | | | | | | | | | | | for bound methods. Previous to this change, it displayed "self" for methods implemented in Python but not methods implemented in C; it is now both internally consistent and consistent with inspect.Signature.
* | | Issue #20654: Fixed pydoc for enums with zero value. Patch by Vajrasky Kok.Serhiy Storchaka2014-02-191-3/+6
| | |
* | | Issue #20189: Four additional builtin types (PyTypeObject,Larry Hastings2014-01-241-3/+10
| | | | | | | | | | | | | | | | | | 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 #19703: Update pydoc to use the new importer APIs.Eric Snow2014-01-071-4/+13
| | |
* | | Issue 20123: Fix pydoc.synopsis() for "binary" modules.Eric Snow2014-01-051-23/+23
| | | | | | | | | | | | Also add missing tests to test_pydoc.
* | | Issue #19674: inspect.signature() now produces a correct signatureLarry Hastings2013-11-231-28/+24
| | | | | | | | | | | | for some builtins.
* | | Implement PEP 451 (ModuleSpec).Eric Snow2013-11-221-1/+2
| | |
* | | Issue #19030: final pieces for proper location of various class attributes ↵Ethan Furman2013-10-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Issue #18716: Deprecate the formatter moduleBrett Cannon2013-10-041-5/+4
| | |
* | | Issue #15767: back out 8a0ed9f63c6e, finishing the removal ofBrett Cannon2013-07-041-1/+1
| | | | | | | | | | | | ModuleNotFoundError.
* | | Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)Brett Cannon2013-07-041-2/+2
| | |
* | | Issue #17177: Stop using imp in pydocBrett Cannon2013-06-151-5/+4
| | |
* | | Issue #18200: Update the stdlib (except tests) to useBrett Cannon2013-06-141-2/+2
| | | | | | | | | | | | ModuleNotFoundError.
* | | Issue #15767: Introduce ModuleNotFoundError, a subclass ofBrett Cannon2013-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImportError. The exception is raised by import when a module could not be found. Technically this is defined as no viable loader could be found for the specified module. This includes ``from ... import`` statements so that the module usage is consistent for all situations where import couldn't find what was requested. This should allow for the common idiom of:: try: import something except ImportError: pass to be updated to using ModuleNotFoundError and not accidentally mask ImportError messages that should propagate (e.g. issues with a loader). This work was driven by the fact that the ``from ... import`` statement needed to be able to tell the difference between an ImportError that simply couldn't find a module (and thus silence the exception so that ceval can raise it) and an ImportError that represented an actual problem.
* | | Issue #18157: stop using imp.load_module() in imp.Brett Cannon2013-06-111-12/+12
| | |
* | | #11182: remove the unused and undocumented pydoc.Scanner class. Patch by ↵Ezio Melotti2013-04-181-24/+0
| | | | | | | | | | | | Martin Morrison.
* | | Merge: #17476: make allmethods actually return all methods.R David Murray2013-03-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression relative to Python2. (In 2, methods on a class were unbound methods and matched the inspect queries being done, in 3 they are just functions and so were missed). This is an undocumented function that pydoc itself does not use, but I found that numpy at least uses it in its documentation generator. Original patch by Matt Bachmann.
* | | modernize some modules' code by using with statement around open()Giampaolo Rodola'2013-02-121-3/+2
| | |
* | | Closes #17158: Add 'symbols' to help() welcome message; clarify 'modules spam'Terry Jan Reedy2013-02-111-7/+8
| | | | | | | | | | | | messages.
* | | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-2/+2
| | |
* | | merge 3.3Benjamin Peterson2012-10-091-2/+2
|\ \ \ | |/ /
| * | compare singletons by identity not equality (closes #16712)Benjamin Peterson2012-10-091-2/+2
| | | | | | | | | | | | Patch from Serhiy Storchaka.
* | | #16135: Removal of OS/2 support (Python code partial cleanup)Jesus Cea2012-10-051-1/+1
|/ /
* | Issue #15163: Pydoc shouldn't show __loader__ as a part of a module'sBrett Cannon2012-08-061-5/+5
| | | | | | | | | | | | | | | | | | data. Also alphabetized the attributes in the blacklist to make it easier to detect changes. Initial patch by Éric Araujo.
* | Issue #9319: Remove the workaround for this since fixed problem from pydocNick Coghlan2012-07-151-8/+0
| |
* | Issue #15343: A lot more than just unicode decoding can go wrong when ↵Nick Coghlan2012-07-151-1/+1
| | | | | | | | retrieving a source file
* | Closes #15162: the meaning of "online" has shifted a bit in recent years, ↵Georg Brandl2012-06-241-2/+2
| | | | | | | | use "interactive" instead.
* | Implemented PEP 405 (Python virtual environments).Vinay Sajip2012-05-261-1/+1
| |
* | Issue #9260: A finer-grained import lock.Antoine Pitrou2012-05-171-1/+1
| | | | | | | | | | Most of the import sequence now uses per-module locks rather than the global import lock, eliminating well-known issues with threads and imports.
* | Issue #13959: Deprecate imp.get_suffixes() for new attributes onBrett Cannon2012-05-111-5/+20
| | | | | | | | | | | | | | | | | | | | | | 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.
* | merge #14638: pydoc now treats non-str __name__ as None instead of raisingR David Murray2012-04-231-1/+2
|\ \ | |/ | | | | Original patch by Peter Otten.