summaryrefslogtreecommitdiffstats
path: root/Doc/library
Commit message (Collapse)AuthorAgeFilesLines
* gh-106535: Document PEP 387 Soft Deprecation (#106536)Victor Stinner2023-07-071-2/+3
| | | Mark the optparse module as soft deprecated.
* Doc: Add missing ref labels to exception groups/notes sections (#106465)C.A.M. Gerlach2023-07-061-0/+2
|
* gh-96844: Improve error message of list.remove (gh-106455)Dong-hee Na2023-07-051-3/+3
|
* shlex docs: remove outdated note (#106463)Jelle Zijlstra2023-07-051-6/+0
| | | As the versionchanged notice says, this note is no longer true on 3.12+.
* Clarify state of CancelledError in doc (#106453)Kristján Valur Jónsson2023-07-051-1/+1
| | | This change makes it explicit that asyncio.CancelledError is not a subclass of Exception.
* gh-61215: Rename `wait_until_any_call` to `wait_until_any_call_with` (#106414)Mario Corchero2023-07-041-2/+2
| | | | | | mock: Rename `wait_until_any_call` to `wait_until_any_call_with` Rename the method to be more explicit that it expects the args and kwargs to wait for.
* Small speed-up for the convolve() recipe. (GH-106371)Raymond Hettinger2023-07-031-2/+2
|
* gh-61215: New mock to wait for multi-threaded events to happen (#16094)Mario Corchero2023-07-031-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mock: Add `ThreadingMock` class Add a new class that allows to wait for a call to happen by using `Event` objects. This mock class can be used to test and validate expectations of multithreading code. It uses two attributes for events to distinguish calls with any argument and calls with specific arguments. The calls with specific arguments need a lock to prevent two calls in parallel from creating the same event twice. The timeout is configured at class and constructor level to allow users to set a timeout, we considered passing it as an argument to the function but it could collide with a function parameter. Alternatively we also considered passing it as positional only but from an API caller perspective it was unclear what the first number meant on the function call, think `mock.wait_until_called(1, "arg1", "arg2")`, where 1 is the timeout. Lastly we also considered adding the new attributes to magic mock directly rather than having a custom mock class for multi threading scenarios, but we preferred to have specialised class that can be composed if necessary. Additionally, having added it to `MagicMock` directly would have resulted in `AsyncMock` having this logic, which would not work as expected, since when if user "waits" on a coroutine does not have the same meaning as waiting on a standard call. Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
* gh-106232: Make timeit doc command lines compatible with Windows. (#106296)Terry Jan Reedy2023-07-011-9/+9
| | | | | | Command Prompt (CMD Shell) and older versions of PowerShell require double quotes and single quotes inside the string. This form also works on linux and macOS.
* gh-101100: Docs: Fix references to several numeric dunders (#106278)F3eQnxN3RriK2023-06-303-19/+19
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-106008: Make implicit boolean conversions explicit (GH-106003)Brandt Bucher2023-06-291-1/+22
|
* gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)hms2023-06-291-12/+11
| | | | | | This enables super-instruction formation, removal of checks for uninitialized variables, and frees up an instruction.
* gh-101100: Fix reference to `parse_args` in `optparse.rst` (#105265)F3eQnxN3RriK2023-06-281-24/+27
|
* gh-101100: Fix reference to asynchronous methods (#106172)F3eQnxN3RriK2023-06-281-1/+1
|
* gh-105993: Add possible `None` return type to `asyncio.EventLoop.start_tls` ↵Sam Bull2023-06-281-0/+3
| | | | docs (#105995)
* Refer to `TimeoutError` instead of `asyncio.TimeoutError` in ↵lightdrk2023-06-281-4/+4
| | | | | | `asyncio-task.rst` (#106136) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-92788: Add docs for `ast.Module`, `ast.Expression`, and others (#101055)Nikita Sobolev2023-06-271-0/+101
|
* GH-105774: Clarify operation of normalize() (GH-106093)Raymond Hettinger2023-06-271-6/+37
|
* Revert "GH-96145: Add AttrDict to JSON module for use with object_hook ↵Łukasz Langa2023-06-261-43/+0
| | | | | (#96146)" (#105948) This reverts commit 1f0eafa844bf5a380603d55e8d4b42d8c2a3439d.
* gh-106107: document correct error that's raised when a mutable default value ↵Roderich Schupp2023-06-261-1/+1
| | | | for a field is detected (gh-106109)
* GH-105793: Add follow_symlinks argument to `pathlib.Path.is_dir()` and ↵Barney Gale2023-06-261-6/+18
| | | | | | | `is_file()` (GH-105794) Brings `pathlib.Path.is_dir()` and `in line with `os.DirEntry.is_dir()`, which will be important for implementing generic path walking and globbing. Likewise `is_file()`.
* gh-106111: Remove zipapp documentation on creating a Windows executable ↵Paul Moore2023-06-261-106/+9
| | | | | (#106112) Remove zipapp documentation on creating a Windows executable
* Improve typing docs on the type of class objects (#106081)Alex Waygood2023-06-261-49/+59
|
* Docs: add links to 'callable' term in sqlite3 docs (#106072)Erlend E. Aasland2023-06-251-17/+18
|
* GH-104375: Use `versionchanged` to describe new arguments in pathlib docs ↵Barney Gale2023-06-241-14/+14
| | | | (GH-104376)
* Typing docs: fix typo in annotating tuples comment (#106048)Eamon Tracey2023-06-231-2/+2
|
* gh-105730: support more callables in ExceptionGroup.split() and subgroup() ↵Irit Katriel2023-06-231-4/+8
| | | | (#106035)
* Typing docs: improve the guidance on annotating tuples (#106021)Alex Waygood2023-06-231-21/+72
|
* GH-89812: Add `pathlib.UnsupportedOperation` (GH-105926)Barney Gale2023-06-221-1/+43
| | | | | | | This new exception type is raised instead of `NotImplementedError` when a path operation is not supported. It can be raised from `Path.readlink()`, `symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a future version of pathlib, it will be raised by `AbstractPath` for these methods and others, such as `AbstractPath.mkdir()` and `unlink()`.
* stdtypes.rst: remove a period (#105959)Mathieu Dupuy2023-06-211-1/+1
|
* typing docs: Improve the intro to each section (#105901)Alex Waygood2023-06-181-36/+40
|
* gh-105875: Require SQLite 3.15.2 or newer (#105876)Erlend E. Aasland2023-06-181-4/+1
| | | SQLite 3.15.2 was released 2016-11-28.
* gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and ↵Irit Katriel2023-06-171-0/+6
| | | | replace by their new versions (#105865)
* gh-105678: document SET_FUNCTION_ATTRIBUTE (#105843)Carl Meyer2023-06-161-9/+20
|
* bpo-44530: Document the change in MAKE_FUNCTION behavior (#93189)Alex Doe2023-06-161-2/+5
| | | | | * bpo-44530: Document the change in MAKE_FUNCTION behavior Fixes dis module documentation for MAKE_FUNCTION due to https://github.com/python/cpython/commit/2f180ce2cb6e6a7e3c517495e0f4873d6aaf5f2f (bpo-44530, released as part of 3.11) removes the qualified name at TOS
* More reorganisation of the typing docs (#105787)Alex Waygood2023-06-151-101/+117
|
* Improve docs for `typing.dataclass_transform` (#105792)Alex Waygood2023-06-151-37/+69
|
* GH-77273: Better bytecodes for f-strings (GH-6132)Mark Shannon2023-06-141-16/+37
|
* gh-105570: Deprecate unusual ways of creating empty TypedDicts (#105780)Alex Waygood2023-06-141-0/+8
| | | Deprecate two methods of creating typing.TypedDict classes with 0 fields using the functional syntax: `TD = TypedDict("TD")` and `TD = TypedDict("TD", None)`. Both will be disallowed in Python 3.15. To create a TypedDict class with 0 fields, either use `class TD(TypedDict): pass` or `TD = TypedDict("TD", {})`.
* Typing docs: move the deprecated stuff below the non-deprecated stuff (#105781)Alex Waygood2023-06-141-488/+488
|
* gh-105566: Deprecate unusual ways of creating `typing.NamedTuple` classes ↵Alex Waygood2023-06-141-0/+13
| | | | | | | (#105609) Deprecate creating a typing.NamedTuple class using keyword arguments to denote the fields (`NT = NamedTuple("NT", x=int, y=str)`). This will be disallowed in Python 3.15. Use the class-based syntax or the functional syntax instead. Two methods of creating `NamedTuple` classes with 0 fields using the functional syntax are also deprecated, and will be disallowed in Python 3.15: `NT = NamedTuple("NT")` and `NT = NamedTuple("NT", None)`. To create a `NamedTuple` class with 0 fields, either use `class NT(NamedTuple): pass` or `NT = NamedTuple("NT", [])`.
* gh-104873: Add typing.get_protocol_members and typing.is_protocol (#104878)Jelle Zijlstra2023-06-141-0/+32
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* tarfile: Fix positional-only syntax in docs (GH-105770)Jelle Zijlstra2023-06-141-4/+4
| | | | | | | | The syntax used in the current docs (a / before any args) is invalid. I think the right approach is for the arguments to arbitrary filter functions to be treated as positional-only, meaning that users can supply filter functions with any names for the argument. tarfile.py only calls the filter function with positional arguments.
* GH-104554: Add RTSPS support to `urllib/parse.py` (#104605)zentarim2023-06-131-3/+3
| | | | | | | | | | | | | * GH-104554: Add RTSPS support to `urllib/parse.py` RTSPS is the permanent scheme defined in https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml alongside RTSP and RTSPU schemes. * 📜🤖 Added by blurb_it. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-105331: Change `asyncio.sleep` to raise ``ValueError` for nan (#105641)Jay2023-06-121-0/+3
| | | | Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-102676: Add more convenience properties to `dis.Instruction` (#103969)Tomas R2023-06-111-0/+42
| | | | | | | | Adds start_offset, cache_offset, end_offset, baseopcode, baseopname, jump_target and oparg to dis.Instruction. Also slightly improves the disassembly output by allowing opnames to overflow into the space reserved for opargs.
* gh-80480: Emit DeprecationWarning for array's 'u' type code (#95760)Hugo van Kemenade2023-06-111-1/+1
|
* gh-99108: Mention HACL\* in the hashlib docs. (#105634)Gregory P. Smith2023-06-101-5/+6
|
* Cleanup and clarify our hashlib docs. (#105624)Gregory P. Smith2023-06-101-47/+90
| | | Clarify and improve our hashlib docs. Now with 50% less mess!
* Clarify the supported cases in the tokenize module (#105569)Pablo Galindo Salgado2023-06-091-0/+9
|