Commit Graph

339 Commits

Author SHA1 Message Date
Dan Rose 2a37f8f55b bpo-36045: builtins.help() now prefixes `async` for async functions (GH-12010)
Previously, it was hard to tell whether a function should be awaited. It was also incorrect (per PEP 484) to put this in the type hint for coroutine functions. Added this info to the output of builtins.help and pydoc.


https://bugs.python.org/issue36045
2019-05-24 04:38:01 -07:00
Cheryl Sabella c95c93d4eb
bpo-20285: Improve help docs for object (GH-4759) 2019-05-24 06:43:29 -04:00
Raymond Hettinger a694f23948
Add missing docstrings for TarInfo objects (#12555) 2019-03-27 13:16:34 -07:00
Raymond Hettinger 9dcc095f45
Fix line ending (GH-12531) 2019-03-25 00:23:39 -07:00
Raymond Hettinger 62be33870e
bpo-36401: Have help() show readonly properties separately (GH-12517) 2019-03-24 17:07:47 -07:00
Serhiy Storchaka efcf82f945
bpo-35619: Improve support of custom data descriptors in help() and pydoc. (GH-11366) 2019-01-15 10:53:18 +02:00
Sanyam Khurana b539cef31c bpo-35614: Fix pydoc help() on metaclasses (#11357) 2018-12-31 15:14:47 +10:00
Victor Stinner 2cf4c202ff
bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182)
Replace time.time() with time.monotonic() in tests to measure time
delta.

test_zipfile64: display progress every minute (60 secs) rather than
every 5 minutes (5*60 seconds).
2018-12-17 09:36:36 +01:00
Serhiy Storchaka a44d34e179
bpo-34966: Improve support of method aliases in pydoc. (GH-9823)
Pydoc now does not duplicate docstrings for aliases of inherited methods.
2018-11-08 08:48:11 +02:00
Sanyam Khurana a323cdcb33 bpo-8525: help() on a type now shows builtin subclasses (GH-5066)
For builtin types with builtin subclasses, help() on the type now shows up
to 4 of the subclasses. This partially replaces the exception hierarchy
information previously displayed in Python 2.7.
2018-10-21 17:22:02 +10:00
Berker Peksag d04f46c59f
bpo-940286: Fix pydoc to show cross refs correctly (GH-8390) 2018-07-23 08:37:47 +03:00
Andrés Delfino b2043bbe60 bpo-33422: Fix quotation marks getting deleted when looking up byte/string literals on pydoc. (GH-6701)
Also update the list of string prefixes.
2018-05-05 19:07:32 +03:00
Nick Coghlan 1a5c4bdb6e
bpo-33185: Improve wording and markup (GH-6477)
Adds some working and markup fixes that I missed
in the initial commit for this issue.

(Follow-up to GH-6419)
2018-04-15 23:32:05 +10:00
Nick Coghlan 82a9481059
bpo-33185: Fix regression in pydoc CLI sys.path handling (GH-6419)
The pydoc CLI assumed -m pydoc would add the empty string
to sys.path, and hence got confused when it switched to
adding the full initial working directory instead.

This refactors the pydoc CLI path manipulation to be
more testable, and ensures it won't accidentally
remove the standard library directory containing
pydoc itself from sys.path.
2018-04-15 21:52:57 +10:00
oldk e5681b9822 bpo-32440: Update the docs URL to https in help() (GH-5030)
In pydoc.py, the reference to Python' documentation was in http.
The link has been updated to use https.
2017-12-28 06:37:46 -08:00
Jelle Zijlstra ac317700ce bpo-30406: Make async and await proper keywords (#1669)
Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.
2017-10-05 23:24:46 -04:00
Feanil Patel 6a396c9807 bpo-31128: Allow pydoc to bind to arbitrary hostnames (#3011)
New -n flag allow overriding localhost with custom value,
for example to run from containers.
2017-09-14 17:54:09 -04:00
Victor Stinner 4cab2cd0c0 bpo-31238: pydoc ServerThread.stop() now joins itself (#3151)
* bpo-31238: pydoc ServerThread.stop() now joins itself

ServerThread.stop() now joins itself to wait until
DocServer.serve_until_quit() completes and then explicitly sets
its docserver attribute to None to break a reference cycle.

* Add NEWS.d entry
2017-08-21 23:24:40 +02:00
Serhiy Storchaka bdf6b910f9 bpo-29776: Use decorator syntax for properties. (#585) 2017-03-19 08:40:32 +02:00
Serhiy Storchaka 213f229fbd Issue #29338: Don't output an empty signature for class constructor. 2017-01-23 14:02:35 +02:00
Serhiy Storchaka ccb5f3cee9 Issue #29338: The help of a builtin or extension class now includes the
constructor signature if __text_signature__ is provided for the class.
2017-01-23 12:37:00 +02:00
Eric Snow 46f97b85a8 Issue #15767: Use ModuleNotFoundError. 2016-09-07 16:56:15 -07:00
doko@ubuntu.com c8fd1928d0 - Issue #8637: Honor a pager set by the env var MANPAGER (in preference to
one set by the env var PAGER).
2016-06-14 09:03:52 +02:00
doko@ubuntu.com 965754521e - Issue #8637: Honor a pager set by the env var MANPAGER (in preference to
one set by the env var PAGER).
2016-06-14 08:39:31 +02:00
Martin Panter 5285545271 Issue #16484: Merge pydoc Windows fixes from 3.5 2016-06-12 04:31:25 +00:00
Martin Panter 4f8aaf6440 Issue #16484: Fix pydoc link and test on Windows, by Kaushik Nadikuditi 2016-06-12 04:24:06 +00:00
R David Murray 13ee7d15e3 Merge: #16484: Fix pydoc doc links to modules whose names are mixed case. 2016-06-03 19:29:18 -04:00
R David Murray ead9bfc5c3 #16484: Fix pydoc doc links to modules whose names are mixed case.
Patch by Sean Rodman, test by Kaushik N.
2016-06-03 19:28:35 -04:00
Serhiy Storchaka 885bdc4946 Issue #25985: sys.version_info is now used instead of sys.version
to format short Python version.
2016-02-11 13:10:36 +02:00
Martin Panter e2e0deec45 Issue #18010: Merge pydoc web search fix from 3.5 2015-11-06 01:08:34 +00:00
Martin Panter 98da9d0e0d Issue #18010: Merge pydoc web search fix from 3.4 into 3.5 2015-11-06 00:51:38 +00:00
Martin Panter 9ad0aae656 Issue #18010: Fix pydoc web server search to handle package exceptions
Implementation by Antoine Pitrou.
2015-11-06 00:27:14 +00:00
Serhiy Storchaka fc632e3912 Merge with 3.5. 2015-10-06 18:52:52 +03:00
Raymond Hettinger 95801bbe4e Issue #24879: Teach pydoc to display named tuple fields in the order they were defined. 2015-08-18 22:25:16 -07:00
Eric Snow 32439d6eb6 Issue #23911: Move path-based bootstrap code to a separate frozen module. 2015-05-02 19:15:18 -06:00
Serhiy Storchaka f5e8540e1b Issue #23008: Fixed resolving attributes with boolean value is False in pydoc. 2015-04-21 21:11:13 +03:00
Serhiy Storchaka b6076fb13c Issue #23008: Fixed resolving attributes with boolean value is False in pydoc. 2015-04-21 21:09:48 +03:00
Brett Cannon f299abdafa Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
2015-04-13 14:21:02 -04:00
Serhiy Storchaka 46ba6c8563 Issue #22831: Use "with" to avoid possible fd leaks. 2015-04-04 11:01:02 +03:00
R David Murray c156e51668 Merge: #23792: also catch interrupt around pipe.write. 2015-03-30 10:15:22 -04:00
R David Murray e7f5e147cd #23792: also catch interrupt around pipe.write.
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.
2015-03-30 10:14:47 -04:00
R David Murray f375b0a4d5 Merge: #23792: Ignore KeyboardInterrupt when the pydoc pager is active. 2015-03-29 15:19:13 -04:00
R David Murray 1058cda38f #23792: Ignore KeyboardInterrupt when the pydoc pager is active.
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.)
2015-03-29 15:15:40 -04:00
Serhiy Storchaka 1c205518a3 Issue #19980: Improved help() for non-recognized strings. help('') now
shows the help on str.  help('help') now shows the help on help().
Original patch by Mark Lawrence.
2015-03-01 00:42:54 +02:00
Serhiy Storchaka 7065f376e0 Issue #23374: Fixed pydoc failure with non-ASCII files when stdout encoding
differs from file system encoding (e.g. on Mac OS).
2015-02-20 23:47:09 +02:00
Serhiy Storchaka 5e3d7a401d Issue #23374: Fixed pydoc failure with non-ASCII files when stdout encoding
differs from file system encoding (e.g. on Mac OS).
2015-02-20 23:46:06 +02:00
Benjamin Peterson 77c041ba64 merge 3.4 (#21548) 2015-02-16 19:45:42 -05:00
Benjamin Peterson 54237f9fea fix pydoc.apropos and pydoc.synopsis on modules with empty docstrings (#21548)
Patch by Yuyang Guo and Berker Peksag.
2015-02-16 19:45:01 -05:00
Serhiy Storchaka ab5e9b9213 Issue #22314: pydoc now works when the LINES environment variable is set. 2014-11-28 00:09:29 +02:00
Serhiy Storchaka f1fc9fb33d Issue #22314: pydoc now works when the LINES environment variable is set. 2014-11-28 00:11:07 +02:00