summaryrefslogtreecommitdiffstats
path: root/Doc
Commit message (Collapse)AuthorAgeFilesLines
* gh-125541: Make Ctrl-C interrupt `threading.Lock.acquire()` on Windows (#125546)Sam Gross2024-10-172-6/+6
|
* gh-118986: expose `socket.IPV6_RECVERR` (#118987)chrysn2024-10-171-2/+2
|
* gh-95836: Add custom type converter examples to argparse tutorial (GH-125376)Savannah Ostrowski2024-10-171-0/+47
|
* gh-125542: Deprecate prefix_chars in ArgumentParser.add_argument_group() ↵Savannah Ostrowski2024-10-173-2/+17
| | | | (GH-125563)
* GH-99749: Add optional feature to suggest correct names (ArgumentParser) ↵Savannah Ostrowski2024-10-171-1/+27
| | | | (GH-124456)
* gh-124694: Add concurrent.futures.InterpreterPoolExecutor (gh-124548)Eric Snow2024-10-165-8/+152
| | | | | | | | | | | | This is an implementation of InterpreterPoolExecutor that builds on ThreadPoolExecutor. (Note that this is not tied to PEP 734, which is strictly about adding a new stdlib module.) Possible future improvements: * support passing a script for the initializer or to submit() * support passing (most) arbitrary functions without pickling * support passing closures * optionally exec functions against __main__ instead of the their original module
* gh-125615: Fix grammar nit in tutorial's interactive interpreter appendix ↵Cornelius Roemer2024-10-161-1/+1
| | | | | (GH-125617) Replace "without ... nor" with "with neither ... nor"
* gh-124872: Replace enter/exit events with "switched" (#125532)Kirill Podoprigora2024-10-161-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Users want to know when the current context switches to a different context object. Right now this happens when and only when a context is entered or exited, so the enter and exit events are synonymous with "switched". However, if the changes proposed for gh-99633 are implemented, the current context will also switch for reasons other than context enter or exit. Since users actually care about context switches and not enter or exit, replace the enter and exit events with a single switched event. The former exit event was emitted just before exiting the context. The new switched event is emitted after the context is exited to match the semantics users expect of an event with a past-tense name. If users need the ability to clean up before the switch takes effect, another event type can be added in the future. It is not added here because YAGNI. I skipped 0 in the enum as a matter of practice. Skipping 0 makes it easier to troubleshoot when code forgets to set zeroed memory, and it aligns with best practices for other tools (e.g., https://protobuf.dev/programming-guides/dos-donts/#unspecified-enum). Co-authored-by: Richard Hansen <rhansen@rhansen.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* Python 3.14.0a1v3.14.0a1Hugo van Kemenade2024-10-158-15/+15
|
* gh-89819: Add argument_default and conflict_handler to add_argument_group() ↵Savannah Ostrowski2024-10-151-1/+7
| | | | docs (GH-125379)
* gh-125512: Revert "gh-124872: Replace enter/exit events with "switched" ↵Kirill Podoprigora2024-10-151-4/+10
| | | | (#124776)" (#125513)
* gh-125517: Fix unreachable code warnings in `_testembed.c` (#125518)sobolevn2024-10-151-6/+10
|
* gh-125234: Make PyInitConfig_Free(NULL) a no-op (#125266)RUANG (Roy James)2024-10-151-0/+2
|
* gh-123299: Copyedit "What's New in Python 3.14" (#125438)Hugo van Kemenade2024-10-1510-78/+79
|
* Doc: Update CVE URL (#125489)Mariusz Felisiak2024-10-151-1/+1
|
* gh-85453: Improve variable mark up for datetime.rst (#120702)edson duarte2024-10-141-17/+17
| | | Variables and literals are marked up using backticks.
* gh-124872: Replace enter/exit events with "switched" (#124776)Richard Hansen2024-10-141-10/+4
| | | | | | | | | | | | | | | | | | | | | | Users want to know when the current context switches to a different context object. Right now this happens when and only when a context is entered or exited, so the enter and exit events are synonymous with "switched". However, if the changes proposed for gh-99633 are implemented, the current context will also switch for reasons other than context enter or exit. Since users actually care about context switches and not enter or exit, replace the enter and exit events with a single switched event. The former exit event was emitted just before exiting the context. The new switched event is emitted after the context is exited to match the semantics users expect of an event with a past-tense name. If users need the ability to clean up before the switch takes effect, another event type can be added in the future. It is not added here because YAGNI. I skipped 0 in the enum as a matter of practice. Skipping 0 makes it easier to troubleshoot when code forgets to set zeroed memory, and it aligns with best practices for other tools (e.g., https://protobuf.dev/programming-guides/dos-donts/#unspecified-enum).
* gh-125461: Remove Python 2 from identifiers in doc (GH-125462)Paul Hoffman2024-10-141-3/+2
| | | Remove Python 2 from identifiers in doc
* gh-112088: aclocal version is updated to 1.16.5 in docs (#125457)Mikhail Efimov2024-10-142-4/+4
|
* gh-121798: Add class method Decimal.from_number() (GH-121801)Serhiy Storchaka2024-10-142-0/+23
| | | | | | It is an alternate constructor which only accepts a single numeric argument. Unlike to Decimal.from_float() it accepts also Decimal. Unlike to the standard constructor, it does not accept strings and tuples.
* gh-121797: Add class method Fraction.from_number() (GH-121800)Serhiy Storchaka2024-10-142-0/+14
| | | | | | | | It is an alternative constructor which only accepts a single numeric argument. Unlike to Fraction.from_float() and Fraction.from_decimal() it accepts any real numbers supported by the standard constructor (int, float, Decimal, Rational numbers, objects with as_integer_ratio()). Unlike to the standard constructor, it does not accept strings.
* gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426)Sergey B Kirpichev2024-10-141-6/+4
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-101291: Add versionadded directives for PyUnstable_Long_* (#125384)Sergey B Kirpichev2024-10-131-0/+5
|
* gh-125403: fix console formatting in Chapter 12 of the tutorial (#125404)partev2024-10-131-8/+8
|
* gh-125383: Update `fib` function comment for accuracy (#125386)Wulian2024-10-131-2/+2
| | | `Doc/tutorial/controlflow.rst`: fix comment for `fib` function
* Doc: Fix suggested usage of `-X gil=0` in the glossary (#125366)Ruoyu Zhong2024-10-131-1/+1
| | | | | | | | | | | | | | | | Currently, the "global interpreter lock" entry in the glossary mentions that `-X gil 0` can be used to disable the GIL [1]. However, this is invalid; the correct usage should be `-X gil=0`. $ python -X gil 0 -c 'print("Hello, world")' Fatal Python error: config_read_gil: PYTHON_GIL / -X gil must be "0" or "1" Python runtime state: preinitialized $ python -X gil=0 -c 'print("Hello, world")' Hello, world [1]: https://docs.python.org/3/using/cmdline.html#cmdoption-X Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
* gh-124872: Change PyContext_WatchCallback to take PyObject (#124737)Richard Hansen2024-10-121-1/+1
| | | | | The PyContext struct is not intended to be public, and users of the API don't need anything more specific than PyObject. Also see gh-78943.
* gh-125289: Update sample code in asyncio-task.rst (GH-125292)Ghorban M. Tavakoly2024-10-121-1/+1
| | | | | | | | | | | | | | | | | | | * Update sample code in asyncio-task.rst This will change **coroutines** sample code in the **Awaitables** section and make the example clearer. * Update Doc/library/asyncio-task.rst Revert the added print Co-authored-by: Carol Willing <carolcode@willingconsulting.com> * Update Doc/library/asyncio-task.rst Co-authored-by: Carol Willing <carolcode@willingconsulting.com> --------- Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* Prefer "similar" over "equivalent" in tutorial (#125343)Stephen Rosen2024-10-121-4/+4
| | | | | | | | | | | In the datastructures tutorial doc, some operations are described as "equivalent to" others. This has led to some user-confusion -- at least in the Discourse forums -- about cases in which the operations differ. This change doesn't systematically eliminate the word "equivalent" from the tutorial. It just substitutes "similar to" in several cases in which "equivalent to" could mislead users into expecting exact equivalence.
* gh-125260: Change the default ``gzip.compress()`` mtime to 0 (#125261)Bernhard M. Wiedemann2024-10-121-2/+7
| | | | | | | | | This follows GNU gzip, which defaults to using 0 as the mtime for compressing stdin, where no file mtime is involved. This makes the output of gzip.compress() deterministic by default, greatly helping reproducible builds. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-85935: Explicitly document the case nargs=0 in argparse (GH-125302)Serhiy Storchaka2024-10-121-0/+5
|
* gh-59330: Improve error message for dest= for positionals (GH-125215)Serhiy Storchaka2024-10-121-0/+19
| | | | | | | Also improve the documentation. Specify how dest and metavar are derived from add_argument() positional arguments. Co-authored-by: Simon Law <sfllaw@sfllaw.ca>
* Doc: Fix a typo in "Function Examples" in the control-flow tutorial (#125338)Rafael Fontenelle2024-10-121-1/+1
|
* gh-116938: Clarify documentation of `dict` and `dict.update` regarding the ↵Victorien2024-10-111-12/+13
| | | | | | positional argument they accept (#125213) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Fix typo in ``Doclibrary/functions.rst`` (#125327)Rafael Fontenelle2024-10-111-1/+1
|
* gh-125058: update `_thread` docs regarding interruptibility of ↵Jan Kaliszewski2024-10-111-3/+5
| | | | `lock.acquire()` (#125141)
* gh-125296: Fix strange fragment identifier for `name or flags` in argparse ↵Savannah Ostrowski2024-10-111-1/+1
| | | | docs (#125297)
* Add some doctest cleanups for `turtle` and `configparser` (#125288)Alex Waygood2024-10-102-0/+6
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Doc: Upgrade Sphinx to 8.1 (#125276)Adam Turner2024-10-102-8/+25
|
* Note argparse exit code in documentation (GH-119568)Justin Kunimune2024-10-101-1/+2
| | | Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
* gh-71784: [doc] add usage examples for traceback.TracebackException (#125189)Irit Katriel2024-10-101-15/+118
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-124872: Refine contextvars documentation (#124773)Richard Hansen2024-10-093-46/+112
| | | | | | | | | | | | | * Add definitions for "context", "current context", and "context management protocol". * Update related definitions to be consistent with the new definitions. * Restructure the documentation for the `contextvars.Context` class to prepare for adding context manager support, and for consistency with the definitions. * Use `testcode` and `testoutput` to test the `Context.run` example. * Expand the documentation for the `Py_CONTEXT_EVENT_ENTER` and `Py_CONTEXT_EVENT_EXIT` events to clarify and to prepare for planned changes.
* gh-125196: PyUnicodeWriter_Discard(NULL) does nothing (#125222)Victor Stinner2024-10-091-0/+2
|
* GH-121970: Extract ``availability`` into a new extension (#125082)Adam Turner2024-10-093-76/+126
|
* gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_STR) (#125194)Victor Stinner2024-10-093-6/+6
| | | | | Replace PyUnicode_New(0, 0), PyUnicode_FromString("") and PyUnicode_FromStringAndSize("", 0) with Py_GetConstant(Py_CONSTANT_EMPTY_STR).
* gh-101100: Fix Sphinx warnings in `library/unittest.mock.rst` (#124106)Hugo van Kemenade2024-10-091-30/+30
|
* gh-125168: Fix typo in `__future__.rst` (#125183)JamesMcCarthy212024-10-091-1/+1
| | | | | | | | | * Update `__future__.rst` Fixed typo in the sentence :pep:`649`: *Deferred evaluation of annotations using descriptors* - James McCarthy * Update `__future__.rst` Fixed sphinx formatting
* gh-101100: Consolidate documentation on `ModuleType` attributes (#124709)Alex Waygood2024-10-0919-336/+371
| | | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Barry Warsaw <barry@python.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Fix importlib.resources issue reference in 3.13 What's New (#125175)Alyssa Coghlan2024-10-091-2/+2
| | | | | Previous link was to the PR that removed the mentioned importlib.resources APIs, rather than the issue that added back their improved forms.
* gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (GH-124974)Serhiy Storchaka2024-10-091-3/+3
| | | | | Now it returns a tuple of up to 100 strings (an empty tuple on most locales). Previously it returned the first item of that tuple or an empty string.