summaryrefslogtreecommitdiffstats
path: root/Doc/library
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-123803: Support arbitrary code page encodings on Windows (GH-123804)Serhiy Storchaka2024-11-181-0/+7
| | | | | | If the cpXXX encoding is not directly implemented in Python, fall back to use the Windows-specific API codecs.code_page_encode() and codecs.code_page_decode().
* Doc: Reorganize math module documentation (#126337)Joseph Martinot-Lagarde2024-11-181-226/+250
| | | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* gh-126896: Fix docs about `asyncio.start_server()` (#126897)beavailable2024-11-171-1/+5
|
* Added a warning to the urljoin docs, indicating that it is not safe to use ↵Alex Gaynor2024-11-151-0/+9
| | | | | with attacker controlled URLs (GH-126659) This was flagged to me at a party today by someone who works in red-teaming as a frequently encountered footgun. Documenting the potentially unexpected behavior seemed like a good place to start.
* gh-122549: Add platform.invalidate_caches() (#122547)Bénédikt Tran2024-11-151-0/+12
| | | Allow to invalidate platform's cached results.
* gh-125063: marshal: Add version 5, improve documentation (GH-126829)Petr Viktorin2024-11-151-18/+46
| | | | | | | | | | * Document that slices can be marshalled * Deduplicate and organize the list of supported types in docs * Organize the type code list in marshal.c, to make it more obvious that this is a versioned format * Back-fill some historical info Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* gh-89083: small docs fixup for UUIDv8 (#126857)Bénédikt Tran2024-11-151-3/+6
|
* gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance ↵Petr Viktorin2024-11-141-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-126182) * gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance This changes nothing changes for CPython supported platforms, but hints how to deal with platforms that stick to the letter of the spec. It also marks `socket.getaddrinfo` as a wrapper around `getaddrinfo(3)`; specifically, workarounds to make the function work consistently across platforms are out of scope in its code. Include wording similar to the POSIX's “by providing options and by limiting the returned information”, which IMO suggests that the hints limit the resulting list compared to the defaults, *but* can be interpreted differently. Details are added in a note. Specifically say that this wraps the underlying C function. So, the details are in OS docs. The “full range of results” bit goes away. Use `AF_UNSPEC` rather than zero for the *family* default, although I don't think a system where it's nonzero would be very usable. Suggest setting proto and/or type (with examples, as the appropriate values aren't obvious). Say why you probably want to do that that on all systems; mention the behavior on the “letter of the spec” systems. Suggest that the results should be tried in order, which is, AFAIK best practice -- see RFC 6724 section 2, and its predecessor from 2003 (which are specific to IP, but indicate how people use this): > Well-behaved applications SHOULD iterate through the list of > addresses returned from `getaddrinfo()` until they find a working address. Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* gh-126731: Update outdated project information in `pprint.pp` doc (#126732)Wulian2024-11-141-1/+1
|
* gh-126390: Support for preserving order of options and nonoption arguments ↵Serhiy Storchaka2024-11-131-0/+24
| | | | in gnu_getopt() (GH-126393)
* gh-126175: Add attributes to TOMLDecodeError. Deprecate free-form `__init__` ↵Taneli Hukkinen2024-11-131-2/+29
| | | | args (GH-126428)
* gh-116897: Deprecate generic false values in urllib.parse.parse_qsl() ↵Serhiy Storchaka2024-11-121-0/+8
| | | | | | | | (GH-116903) Accepting objects with false values (like 0 and []) except empty strings and byte-like objects and None in urllib.parse functions parse_qsl() and parse_qs() is now deprecated.
* gh-89083: add support for UUID version 8 (RFC 9562) (#123224)Bénédikt Tran2024-11-121-9/+33
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-125916: Allow functools.reduce() 'initial' to be a keyword argument (#125917)Sayandip Dutta2024-11-121-2/+5
|
* Docs: re-create pages for removed modules to document their removal. (#126622)Ned Batchelder2024-11-1126-0/+442
| | | | | Will also need to change the redirects that were created here: https://github.com/python/psf-salt/pull/521/files
* Update documentation links to Microsoft's documentation pages (GH-126379)谭九鼎2024-11-112-2/+2
|
* gh-126374: Add support of options with optional arguments in the getopt ↵Serhiy Storchaka2024-11-111-3/+23
| | | | module (GH-126375)
* gh-126543: Docs: change "bound type var" to "bounded" when used in the ↵Pedro Fonini2024-11-111-11/+11
| | | | context of the 'bound' kw argument to TypeVar (#126584)
* gh-125298: Remove misleading text in os.kill documentation (GH-125749)RUANG (James Roy)2024-11-081-2/+1
| | | Windows has not accepted process handles in many releases.
* gh-122838: Document missing opcodes (#123073)Kamil Turek2024-11-061-0/+21
|
* GH-124985: Document that `pathlib.Path.copy()` uses copy-on-write. (#125861)Barney Gale2024-11-051-0/+5
|
* gh-119793: Prefer `map(..., strict=True)` over starmap/zip in examples (#126407)Lukas Geiger2024-11-051-1/+1
|
* gh-120057: Add os.reload_environ() function (#126268)Victor Stinner2024-11-051-9/+24
| | | | | | | Replace the os.environ.refresh() method with a new os.reload_environ() function. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ↵lit2024-11-051-3/+28
| | | | | | | ``ConfigParser`` documentation (#125437) Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``. Split too long line on ``ConfigParser`` signature. Add some sections about when some of ``RawConfigParser`` parameters were added.
* Doc: Fix typo in documentation for ``MAKE_FUNCTION`` opcode (#126396)Mikhail Efimov2024-11-041-1/+1
|
* gh-119793: Add optional length-checking to `map()` (GH-120471)Nice Zombies2024-11-041-3/+8
| | | | | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* gh-126353: remove implicit creation of loop from `asyncio.get_event_loop` ↵Kumar Aditya2024-11-042-8/+5
| | | | | (#126354) Remove implicit creation of loop from `asyncio.get_event_loop`. This is a step forward of deprecating the policy system of asyncio.
* Docs: turn getopt examples into doctests (#126377)Erlend E. Aasland2024-11-041-2/+10
|
* gh-126165: Improve docs of function `math.isclose` (#126215)Zhikang Yan2024-11-042-16/+20
| | | | | Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-99880: document rounding mode for new-style formatting (GH-121481)Sergey B Kirpichev2024-11-021-0/+5
| | | | | | | | | | | | | | | | | | | | * gh-99880: document rounding mode for new-style formatting The CPython uses _Py_dg_dtoa(), which does rounding to nearest with half to even tie-breaking rule. If that functions is unavailable, PyOS_double_to_string() fallbacks to system snprintf(). Since CPython 3.12, build requirements include C11 compiler *and* support for IEEE 754 floating point numbers (Annex F). This means that FE_TONEAREST macro is available and, per default, printf-like functions should use same rounding mode as _Py_dg_dtoa(). * Update Doc/library/string.rst Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --------- Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-125761: Clarify repeated warning suppression criteria in warnings module ↵고병찬2024-11-021-0/+13
| | | | (gh-126326)
* gh-125875: Fix docs typo FORMAT_SPEC to FORMAT_WITH_SPEC (gh-126319)rimchoi2024-11-021-1/+1
| | | Fix docs typo FORMAT_SPEC to FORMAT_WITH_SPEC
* Doc: Add a single table as summary to math documentation (GH-125810)Joseph Martinot-Lagarde2024-11-011-3/+89
| | | | | | | | | | | | | | | | | | | | | | | | | * Summary for math module with separate tables * Forgot remainder description * Single table * data instead of func * Add arguments in the table * Fix inconsistencies in pow documentation * Remove full stops from the table Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> * Fix math.pow link * Fix spacing --------- Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* docs: add a more precise example in enum doc (GH-121015)Filip "Ret2Me" Poplewski2024-11-011-1/+1
| | | | | | | | | | | | | * docs: add a more precise example Previous example used manual integer value assignment in class based declaration but in functional syntax has been used auto value assignment what could be confusing for the new users. Additionally documentation doesn't show how to declare new enum via functional syntax with usage of the manual value assignment. * docs: remove whitespace characters * refactor: change example --------- Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* gh-97850: remove ``find_loader`` and ``get_loader`` from ``pkgutil`` (#119656)Bénédikt Tran2024-11-011-40/+0
| | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Brett Cannon <brett@python.org>
* gh-126259: Fix "unclosed database" warning in sqlite3 doctest (#126260)sobolevn2024-11-011-0/+1
|
* GH-125413: Add `pathlib.Path.scandir()` method (#126060)Barney Gale2024-11-011-0/+29
| | | | | Add `pathlib.Path.scandir()` as a trivial wrapper of `os.scandir()`. This will be used to implement several `PathBase` methods more efficiently, including methods that provide `Path.copy()`.
* gh-126256: Update time.rst to use the same clock as instead of the same ↵Alperen Keleş2024-10-311-2/+2
| | | | | | | clock than (#126257) Update time.rst to use `the same clock as` instead of `the same clock than` The time documentation uses the same clock than time.monotonic instead of the same clock as time.monotonic, which is grammatically false. This PR fixes changes two instances of `the same clock than` to `the same clock as`.
* gh-125818: Fix incorrect signature of argument `skip_file_prefixes` in ↵RUANG (James Roy)2024-10-311-1/+1
| | | | | warnings docs (GH-125823) Change documentation
* gh-114990: Add missing mixin methods in collections.abc's document (GH-114991)AN Long2024-10-301-2/+3
| | | Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill ↵Victor Wheeler2024-10-301-0/+1
| | | | | | | | | `shutil.rmtree` algorithm (GH-126067) * gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm. Resolves #126055 * gh-126055: Fix omitted code highlighting
* gh-60712: Include the "object" type in the lists of documented types (GH-103036)Furkan Onder2024-10-301-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add test for the predefined object's attributes * Include the "object" type in the lists of documented types * remove 'or' from augment tuple * 📜🤖 Added by blurb_it. * Add cross-reference to news Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Fix format for the function parameter Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Add space Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * add reference for the 'object' Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * add reference for NotImplemented Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Change ref:`string <textseq>` as class:`str` Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * remove hyphen from `newly-created` * Update Doc/reference/datamodel.rst 'dictionaries' to 'dict' Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Update predefined attribute types in testPredefinedAttrs * Change `universal type` as `top type` * Don't mention about the top type * Update the description of richcmpfuncs * Update Doc/library/stdtypes.rst Co-authored-by: Éric <merwok@netwok.org> * Revert: Hierarchy Section in Data Model Documentation * Revert to original explanations of __new__ and __init__ methods in datamodel.rst for improved clarity. * Update Doc/reference/datamodel.rst Co-authored-by: Éric <merwok@netwok.org> * Remove blank line Co-authored-by: Éric <merwok@netwok.org> * Use ref:`str <textseq>` instead of :class:`str Co-authored-by: Éric <merwok@netwok.org> * Revert changes the description of Other Built-in Types in stdtypes.rst * Update Doc/reference/datamodel.rst Co-authored-by: Éric <merwok@netwok.org> --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* Fix incorrect indentation in importlib.metadata.rst (GH-126189)Rafael Fontenelle2024-10-301-3/+3
|
* gh-126072: do not add `None` to `co_consts` if there is no docstring (GH-126101)Xuanteng Huang2024-10-301-0/+8
|
* gh-126071: Improve formatting of the argparse documentation (GH-126073)Serhiy Storchaka2024-10-301-65/+72
| | | | | | | | | * Use appropriate roles for ArgumentParser, Action, etc. * Remove superfluous repeated links. * Explicitly document signatures and add index entries for some methods and classes. * Make it more clear that some parameters are keyword-only. * Fix some minor errors.
* gh-118633: Add warning regarding the unsafe usage of eval and exec (GH-118437)Daniel Ruf2024-10-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | * Add warning regarding the unsafe usage of eval * Add warning regarding the unsafe usage of exec * Move warning under parameters table * Use suggested shorter text Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> * Use suggested shorter text Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> * Improve wording as suggested --------- Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-124855: Don't allow the JIT and perf support to be active at the same ↵Pablo Galindo Salgado2024-10-301-0/+2
| | | | time (#124856)
* Doc: Note that pydoc uses and prefers ``MANPAGER`` (#125362)Matthieu Ancellin2024-10-291-2/+3
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-116938: Fix `dict.update` docstring and remove erraneous full stop from ↵Prometheus33752024-10-291-1/+1
| | | | | `dict` documentation (#125421) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-122767: document "new style" formatting for complexes (GH-122848)Sergey B Kirpichev2024-10-291-5/+15
| | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>