summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-116143: Fix race condition in pydoc _start_server (GH-116144) ↵Miss Islington (bot)2024-03-061-3/+4
| | | | | | | | (#116416) gh-116143: Fix race condition in pydoc _start_server (GH-116144) (cherry picked from commit 02ee475ee3ce9468d44758df2cd79df9f0926303) Co-authored-by: Itamar Oren <itamarost@gmail.com>
* [3.11] gh-107155: Fix help() for lambda function with return annotation ↵Kirill Podoprigora2024-02-171-2/+4
| | | | | (GH-115613) (cherry picked from commit b9a9e3dd62326b726ad2e8e8efd87ca6327b4019)
* [3.11] gh-108303: Move all `pydoc` related files to `test_pydoc` (GH-114506) ↵Nikita Sobolev2024-02-151-1/+1
| | | | | (#115501) (cherry picked from commit ccc76c3e88647e416184bb1f5210b4e8946ae358)
* [3.11] [3.12] gh-97959: Fix rendering of routines in pydoc (GH-113941) ↵Serhiy Storchaka2024-02-111-34/+115
| | | | | | | | | | | | | (GH-115296) (GH-115302) * Class methods no longer have "method of builtins.type instance" note. * Corresponding notes are now added for class and unbound methods. * Method and function aliases now have references to the module or the class where the origin was defined if it differs from the current. * Bound methods are now listed in the static methods section. * Methods of builtin classes are now supported as well as methods of Python classes. (cherry picked from commit 2939ad02be62110ffa2ac6c4d9211c85e1d1720f) (cherry picked from commit cfb79caaab6c4823b6b186aabab642c4dab3927f)
* [3.11] gh-112007: Re-organize help utility intro message (GH-112017) (#112048)Miss Islington (bot)2023-11-131-11/+13
| | | | | | | | | | | gh-112007: Re-organize help utility intro message (GH-112017) Most important: move how-to-quit sentence to the end and mention 'q'. Re-group the other sentences and improve some wording. --------- (cherry picked from commit b28bb130bbc2ad956828819967d83e06d30a65c5) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.11] gh-102541: Fix Helper.help("mod") for non-existent mod (GH-105934) ↵Miss Islington (bot)2023-07-011-1/+5
| | | | | | | | | | | | | (#106323) gh-102541: Fix Helper.help("mod") for non-existent mod (GH-105934) If the output arg to Helper() is a stream rather than the default None, which means 'page to stdout', the ImportError from pydoc.resolve is currently not caught in pydoc.doc. The same error is caught when output is None. --------- (cherry picked from commit 0530f4f64629ff97f3feb7524da0833b9535e8b6) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.11] gh-102541: Hide traceback in help prompt (gh-102614). (gh-105830)Dong-hee Na2023-06-151-9/+14
| | | | | (cherry picked from commit ba516e70c6d156dc59dede35b6fc3db0151780a5) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.11] gh-98374: Suppress ImportError for invalid query for help() co… ↵Dong-hee Na2022-10-201-1/+4
| | | | (gh-98472)
* gh-89828: Do not relay the __class__ attribute in GenericAlias (GH-93754)Miss Islington (bot)2022-06-181-13/+9
| | | | | | | | list[int].__class__ returned type, and isinstance(list[int], type) returned True. It caused numerous problems in code that checks isinstance(x, type). (cherry picked from commit f9433fff476aa13af9cb314fcc6962055faa4085) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-46547: remove leaking vars into `pydoc.Helper` namespace (#30957)Nikita Sobolev2022-05-021-0/+1
| | | Fixes #90705
* bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124)Hugo van Kemenade2022-03-301-2/+2
|
* bpo-26120: do not exclude __future__ import in pydoc of the __future__ ↵Irit Katriel2022-03-291-1/+1
| | | | module itself (GH-32180)
* bpo-26120: make pydoc exclude __future__ imports from the data block of the ↵Irit Katriel2022-03-281-0/+7
| | | | module (GH-30888)
* bpo-40296: Fix supporting generic aliases in pydoc (GH-30253)Serhiy Storchaka2022-03-181-9/+13
|
* bpo-40280: Emscripten has no support for subprocesses (GH-29872)Christian Heimes2021-12-021-0/+2
| | | | | | | Fixes ``platform`` and ``help()`` on emscripten. Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran
* bpo-10716: Migrating pydoc to html5. (GH-28651)Julien Palard2021-10-091-85/+79
|
* bpo-42278: Use tempfile.TemporaryDirectory rather than tempfile.mktemp in ↵E-Paine2021-08-291-6/+7
| | | | | pydoc (GH-23200) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44967: pydoc: return non-zero exit code when query is not found (GH-27868)Gregory Anders2021-08-261-17/+12
|
* Update URLs in comments and metadata to use HTTPS (GH-27458)Noah Kantrowitz2021-07-301-1/+1
|
* bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)Mariusz Felisiak2021-07-261-6/+6
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-43651: Fix EncodingWarning in `pydoc`. (GH-25644)Inada Naoki2021-04-271-2/+3
|
* bpo-42988: Remove the pydoc getfile feature (GH-25015)Victor Stinner2021-03-291-18/+0
| | | | | | | CVE-2021-3426: Remove the "getfile" feature of the pydoc module which could be abused to read arbitrary files on the disk (directory traversal vulnerability). Moreover, even source code of Python modules can contain sensitive data like passwords. Vulnerability reported by David Schwörer.
* bpo-42869: Avoid an HTTP redirection. (GH-24174)Julien Palard2021-01-251-1/+1
|
* bpo-40939: Remove PEG parser easter egg (__new_parser__) (#20802)Lysandros Nikolaou2020-06-111-1/+0
| | | It no longer serves a purpose (there's only one parser) and having "new" in any name will eventually look odd. Also, it impinges on a potential sub-namespace, `__new_...__`.
* bpo-40939: Generate keyword.py using the new parser (GH-20800)Lysandros Nikolaou2020-06-111-0/+1
|
* bpo-40257: Revert changes to inspect.getdoc() (GH-20073)Serhiy Storchaka2020-05-181-2/+94
|
* bpo-40257: Improve help for the typing module (GH-19546)Serhiy Storchaka2020-04-181-3/+6
| | | | | | * Show docstring for special forms. * Show docstring for special generic aliases. * Show documentation for __origin__ for generic aliases.
* bpo-40257: Output object's own docstring in pydoc (GH-19479)Serhiy Storchaka2020-04-151-11/+8
|
* bpo-21016: pydoc and trace use sysconfig (GH-18476)Victor Stinner2020-02-121-3/+2
| | | | | | | | bpo-21016, bpo-1294959: The pydoc and trace modules now use the sysconfig module to get the path to the Python standard library, to support uncommon installation path like /usr/lib64/python3.9/ on Fedora. Co-Authored-By: Jan Matějek <jmatejek@suse.com>
* bpo-38786: Add parsing of https links to pydoc (GH-17143)Kirill2019-11-131-1/+1
|
* Mark files as executable that are meant as scripts. (GH-15354)Greg Price2019-09-091-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This is the converse of GH-15353 -- in addition to plenty of scripts in the tree that are marked with the executable bit (and so can be directly executed), there are a few that have a leading `#!` which could let them be executed, but it doesn't do anything because they don't have the executable bit set. Here's a command which finds such files and marks them. The first line finds files in the tree with a `#!` line *anywhere*; the next-to-last step checks that the *first* line is actually of that form. In between we filter out files that already have the bit set, and some files that are meant as fragments to be consumed by one or another kind of preprocessor. $ git grep -l '^#!' \ | grep -vxFf <( \ git ls-files --stage \ | perl -lane 'print $F[3] if (!/^100644/)' \ ) \ | grep -ve '\.in$' -e '^Doc/includes/' \ | while read f; do head -c2 "$f" | grep -qxF '#!' \ && chmod a+x "$f"; \ done
* bpo-36045: builtins.help() now prefixes `async` for async functions (GH-12010)Dan Rose2019-05-241-3/+15
| | | | | | 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
* bpo-20285: Improve help docs for object (GH-4759)Cheryl Sabella2019-05-241-2/+2
|
* Add missing docstrings for TarInfo objects (#12555)Raymond Hettinger2019-03-271-2/+2
|
* Fix line ending (GH-12531)Raymond Hettinger2019-03-251-1/+1
|
* bpo-36401: Have help() show readonly properties separately (GH-12517)Raymond Hettinger2019-03-251-0/+6
|
* bpo-35619: Improve support of custom data descriptors in help() and pydoc. ↵Serhiy Storchaka2019-01-151-36/+16
| | | | (GH-11366)
* bpo-35614: Fix pydoc help() on metaclasses (#11357)Sanyam Khurana2018-12-311-1/+1
|
* bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182)Victor Stinner2018-12-171-2/+2
| | | | | | | 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).
* bpo-34966: Improve support of method aliases in pydoc. (GH-9823)Serhiy Storchaka2018-11-081-4/+2
| | | | Pydoc now does not duplicate docstrings for aliases of inherited methods.
* bpo-8525: help() on a type now shows builtin subclasses (GH-5066)Sanyam Khurana2018-10-211-0/+18
| | | | | 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.
* bpo-940286: Fix pydoc to show cross refs correctly (GH-8390)Berker Peksag2018-07-231-2/+3
|
* bpo-33422: Fix quotation marks getting deleted when looking up byte/string ↵Andrés Delfino2018-05-051-2/+9
| | | | | literals on pydoc. (GH-6701) Also update the list of string prefixes.
* bpo-33185: Improve wording and markup (GH-6477)Nick Coghlan2018-04-151-1/+1
| | | | | | Adds some working and markup fixes that I missed in the initial commit for this issue. (Follow-up to GH-6419)
* bpo-33185: Fix regression in pydoc CLI sys.path handling (GH-6419)Nick Coghlan2018-04-151-7/+39
| | | | | | | | | | 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.
* bpo-32440: Update the docs URL to https in help() (GH-5030)oldk2017-12-281-1/+1
| | | | In pydoc.py, the reference to Python' documentation was in http. The link has been updated to use https.
* bpo-30406: Make async and await proper keywords (#1669)Jelle Zijlstra2017-10-061-1/+3
| | | Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.
* bpo-31128: Allow pydoc to bind to arbitrary hostnames (#3011)Feanil Patel2017-09-141-17/+26
| | | | New -n flag allow overriding localhost with custom value, for example to run from containers.
* bpo-31238: pydoc ServerThread.stop() now joins itself (#3151)Victor Stinner2017-08-211-0/+4
| | | | | | | | | | * 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
* bpo-29776: Use decorator syntax for properties. (#585)Serhiy Storchaka2017-03-191-2/+7
|