summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-101552: Allow pydoc to display signatures in source format (#124669)Jelle Zijlstra2024-10-091-2/+3
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-81263: Add assignment expressions to `help` (#124641)Emily Morehouse2024-09-271-0/+2
| | | | | * Add assignment expression (:=) to `help` * Update index for Assignment Expressions to include pair of `assignment; expression`
* gh-122129: Improve support of method descriptors and wrappers in the help ↵Serhiy Storchaka2024-07-231-0/+7
| | | | title (GH-122157)
* gh-120541: Improve the "less" prompt in pydoc (GH-120543)Serhiy Storchaka2024-06-151-1/+8
| | | | | When help() is called with non-string argument, use __qualname__ or __name__ if available, otherwise use "{typename} object".
* gh-120417: Add #noqa to used imports in the stdlib (#120421)Victor Stinner2024-06-131-1/+4
| | | | | Tools such as ruff can ignore "imported but unused" warnings if a line ends with "# noqa: F401". It avoids the temptation to remove an import which is used effectively.
* gh-120417: Remove unused imports in the stdlib (#120420)Victor Stinner2024-06-121-1/+1
|
* bpo-37755: Use configured output in pydoc instead of pager (GH-15105)Enrico Tröger2024-06-081-2/+6
| | | | | | | If the Helper() class was initialized with an output, the topics, keywords and symbols help still use the pager instead of the output. Change the behavior so the output is used if available while keeping the previous behavior if no output was configured.
* gh-119856: Support exiting help() with just "exit" (#119858)Victor Stinner2024-06-031-2/+2
|
* gh-118673: Remove shebang and executable bits from stdlib modules. (#119658)Jason R. Coombs2024-05-291-1/+0
| | | | | | | * gh-118673: Remove shebang and executable bits from stdlib modules. * Removed shebangs and exe bits on turtledemo scripts. The setting was inappropriate for '__main__' and inconsistent across the other modules. The scripts can still be executed directly by invoking with the desired interpreter.
* gh-118465: Add __firstlineno__ attribute to class (GH-118475)Serhiy Storchaka2024-05-061-1/+1
| | | | It is set by compiler with the line number of the first line of the class definition.
* gh-111201: A new Python REPL (GH-111567)Pablo Galindo Salgado2024-05-051-145/+13
| | | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-65824: Add "Help on ..." to the "less" prompt in pydoc (GH-116183)Serhiy Storchaka2024-04-171-15/+22
|
* gh-115775: Compiler adds __static_attributes__ field to classes (#115913)Irit Katriel2024-03-261-1/+2
|
* gh-116143: Fix race condition in pydoc _start_server (#116144)Itamar Oren2024-03-061-3/+4
|
* gh-65824: Improve the "less" prompt in pydoc (GH-116050)Serhiy Storchaka2024-03-011-1/+10
| | | | | | | Output the line number, the percentage and the help about how to get help or quit the pager. Inspired by the GNU man.
* gh-113942: Show functions implemented as builtin methods (GH-115306)Serhiy Storchaka2024-02-261-6/+6
| | | | Pydoc no longer skips global functions implemented as builtin methods, such as MethodDescriptorType and WrapperDescriptorType.
* gh-101860: Expose __name__ on property (GH-101876)Eugene Toder2024-02-201-3/+2
| | | | | Useful for introspection and consistent with functions and other descriptors.
* gh-107155: Fix help() for lambda function with return annotation (GH-107401)Kirill Podoprigora2024-02-171-2/+4
|
* gh-108303: Move all `pydoc` related test files to new `test.test_pydoc` ↵Nikita Sobolev2024-02-131-1/+1
| | | | package (#114506)
* gh-97959: Fix rendering of routines in pydoc (GH-113941)Serhiy Storchaka2024-02-111-34/+115
| | | | | | | | | | * 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.
* gh-64020: Deprecate pydoc.ispackage() (GH-20908)Zackery Spytz2023-12-271-0/+2
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-112139: Add `inspect.Signature.format` and use it in `pydoc` (#112143)Nikita Sobolev2023-12-021-1/+4
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-112007: Re-organize help utility intro message (#112017)Terry Jan Reedy2023-11-131-11/+13
| | | | | | Most important: move how-to-quit sentence to the end and mention 'q'. Re-group the other sentences and improve some wording. --------- Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-107782: Pydoc: fall back to __text_signature__ if inspect.signature() ↵Serhiy Storchaka2023-08-111-40/+38
| | | | | | | fails (GH-107786) It allows to show signatures which are not representable in Python, e.g. for getattr and dict.pop.
* gh-102541: Fix Helper.help("mod") for non-existent mod (#105934)Kirill Podoprigora2023-07-011-1/+5
| | | | | | 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. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-102541: Hide traceback in help prompt (gh-102614)Kirill Podoprigora2023-06-141-8/+13
|
* pydoc.safeimport: Use importlib.import_module instead of __import__ (GH-103118)Yuxin Wu2023-05-031-4/+1
|
* gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059)Barry Warsaw2023-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove deprecated classes from pkgutil * Remove some other PEP 302 obsolescence * Use find_spec instead of load_module * Remove more tests of PEP 302 obsolete APIs * Remove another bunch of tests using obsolete load_modules() * Remove deleted names from __all__ * Remove obsolete footnote * imp is removed * Remove `imp` from generated stdlib names * What's new and blurb * Update zipimport documentation for the removed methods * Fix some Windows tests * Remove any test (or part of a test) that references `find_module()`. * Use assertIsNone() / assertIsNotNone() consistently. * Update Doc/reference/import.rst * We don't need pkgutil._get_spec() any more either * test.test_importlib.fixtures.NullFinder * ...BadLoaderFinder.find_module * ...test_api.InvalidatingNullFinder.find_module * ...test.test_zipimport test of z.find_module * Suppress cross-references to find_loader and find_module * Suppress cross-references to Finder * Suppress cross-references to pkgutil.ImpImporter and pkgutil.ImpLoader --------- Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* gh-98040: Remove just the `imp` module (#98573)Barry Warsaw2023-04-281-1/+1
|
* gh-102799: Let pydoc use the exception instead of sys.exc_info (#102830)Irit Katriel2023-03-211-14/+22
|
* bpo-45975: Simplify some while-loops with walrus operator (GH-29347)Nick Drozd2022-11-261-3/+1
|
* gh-98374: Suppress ImportError for invalid query for help() command. (gh-98450)Dong-hee Na2022-10-201-1/+4
|
* gh-94318: Strip trailing spaces in pydoc text output (GH-94319)Serhiy Storchaka2022-06-271-2/+1
|
* gh-89828: Do not relay the __class__ attribute in GenericAlias (#93754)Serhiy Storchaka2022-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).
* bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)Serhiy Storchaka2022-05-081-6/+6
| | | | I suppose it is a remnants of very old code written when str, int, list, dict, etc were functions and not classes.
* 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_...__`.