summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-125514: fix bug in test_traceback utility. Specify exception types in ↵Irit Katriel2024-10-151-9/+10
| | | | except: clauses (#125516)
* gh-125517: Fix unreachable code warnings in `_testembed.c` (#125518)sobolevn2024-10-152-14/+22
|
* gh-125041: test_zlib: For s390x HW acceleration, only skip checking the ↵Petr Viktorin2024-10-153-12/+22
| | | | compressed bytes (#125042)
* gh-119535: Support 𝜋thon in Python 3.14 venvs (#125035)foreignmeloman2024-10-151-1/+1
|
* gh-125196: Use PyUnicodeWriter in HAMT (#125458)Victor Stinner2024-10-151-50/+31
|
* gh-125234: Make PyInitConfig_Free(NULL) a no-op (#125266)RUANG (Roy James)2024-10-153-0/+6
|
* gh-53203: Fix strptime() tests for %X on glibc < 2.29 (#125469)Serhiy Storchaka2024-10-151-3/+11
|
* 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-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed (#125416)Sam Gross2024-10-153-13/+8
| | | | | | | | We previously used `AC_RUN_IF_ELSE` with a short test program to detect if `-latomic` is needed, but that requires choosing a specific default value when cross-compiling because the test program is not run. Some cross compilation targets like `wasm32-emscripten` do not support `-latomic`, while other cross compilation targets, like `arm-linux-gnueabi` require it.
* gh-124958: Revert "gh-125472: Revert "gh-124958: fix asyncio.TaskGroup and ↵Thomas Grainger2024-10-145-15/+157
| | | | | | | | | _PyFuture refcycles ... (#125486) * Revert "gh-125472: Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#12… (#125476)" This reverts commit e99650b80ace3893c2a80b3f2a4aca99cb305191. * fix incompatability with gh-124392
* gh-124944: Add socket.SO_ORIGINAL_DST (#124945)Steven Jin2024-10-146-1/+18
|
* gh-85453: Improve variable mark up for datetime.rst (#120702)edson duarte2024-10-141-17/+17
| | | Variables and literals are marked up using backticks.
* Fix idlelib typos (#125484)Terry Jan Reedy2024-10-142-15/+18
| | | | | Propagate fixes in Doc/library/idle.rst to help.html. Change 'interruptable' to 'interruptible' in run.py. The latter was reported by ember91 in PR 125473.
* gh-125470: Fix warning in `Python/generated_cases.c.h` (#125471)sobolevn2024-10-143-0/+6
| | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-124872: Replace enter/exit events with "switched" (#124776)Richard Hansen2024-10-146-117/+117
| | | | | | | | | | | | | | | | | | | | | | 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-125472: Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles ↵Kirill Podoprigora2024-10-145-147/+15
| | | | | | | (#12… (#125476) Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#124959)" This reverts commit d5dbbf4372cd3dbf3eead1cc70ddc4261c061fd9.
* gh-119786: [doc] broken link and typo fix in interpreter_definition.md ↵Mikhail Efimov2024-10-142-2/+5
| | | | (#125455)
* 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-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#124959)Thomas Grainger2024-10-145-15/+147
|
* gh-112088: aclocal version is updated to 1.16.5 in docs (#125457)Mikhail Efimov2024-10-142-4/+4
|
* gh-111178: fix USAN failures for `partialobject` (#124733)Bénédikt Tran2024-10-141-25/+34
|
* gh-124960: Fixed `barry_as_FLUFL` future flag does not work in new REPL ↵Wulian2024-10-144-5/+40
| | | | | | (#124999) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-53203: Fix strptime() for %c, %x and %X formats on many locales (GH-125406)Serhiy Storchaka2024-10-144-40/+66
| | | | | Fixed most locales that use non-ASCII digits, like Persian, Burmese, Odia and Shan.
* GH-125323: Convert DECREF_INPUTS_AND_REUSE_FLOAT into a function that takes ↵Mark Shannon2024-10-1410-44/+69
| | | | PyStackRefs. (GH-125439)
* gh-125139: use `_PyRecursiveMutex` in `_thread.RLock` (#125144)Kumar Aditya2024-10-143-122/+63
|
* gh-121798: Add class method Decimal.from_number() (GH-121801)Serhiy Storchaka2024-10-147-0/+122
| | | | | | 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-125323: Remove some unsafe Py_DECREFs in bytecodes.c, replacing them with ↵Ken Jin2024-10-146-60/+65
| | | | PyStackRef_CLOSEs (GH-125324)
* gh-121797: Add class method Fraction.from_number() (GH-121800)Serhiy Storchaka2024-10-145-8/+82
| | | | | | | | 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-86357: argparse: use str() consistently and explicitly to print choices ↵rindeal2024-10-143-8/+36
| | | | | (GH-117766) Signed-off-by: Jan Chren ~rindeal <dev.rindeal@gmail.com>
* 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-125243: Fix ZoneInfo data race in free threading build (#125281)Sam Gross2024-10-133-20/+87
| | | | | | | | Lock `ZoneInfoType` to protect accesses to `ZONEINFO_STRONG_CACHE`. Refactor the `tp_new` handler to use Argument Clinic so that we can just use `@critical_section` annotations on the relevant functions. Also use `PyDict_SetDefaultRef` instead of `PyDict_SetDefault` when inserting into the `TIMEDELTA_CACHE`.
* GH-125069: Fix inconsistent joining in `WindowsPath(PosixPath(...))` (#125156)Barney Gale2024-10-133-2/+15
| | | | | | | | | | `PurePath.__init__()` incorrectly uses the `_raw_paths` of a given `PurePath` object with a different flavour, even though the procedure to join path segments can differ between flavours. This change makes the `_raw_paths`-enabled deferred joining apply _only_ when the path flavours match. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-101291: Add versionadded directives for PyUnstable_Long_* (#125384)Sergey B Kirpichev2024-10-131-0/+5
|
* add Kumar Aditya as codeowner for weakref (#125405)Kumar Aditya2024-10-131-0/+2
|
* gh-125403: fix console formatting in Chapter 12 of the tutorial (#125404)partev2024-10-131-8/+8
|
* gh-89967: make WeakKeyDictionary and WeakValueDictionary thread safe (#125325)Kumar Aditya2024-10-133-174/+50
| | | Make `WeakKeyDictionary` and `WeakValueDictionary` thread safe by copying the underlying the dict before iterating over it.
* gh-125161: return non zero value in pthread_self on wasi (#125303)Kumar Aditya2024-10-131-5/+5
|
* fix comment in _PyMutex_TryUnlock (#125319)Kumar Aditya2024-10-131-2/+2
|
* gh-125383: Update `fib` function comment for accuracy (#125386)Wulian2024-10-131-2/+2
| | | `Doc/tutorial/controlflow.rst`: fix comment for `fib` function
* gh-61698: Use launchctl to detect macOS window manager in tests (#118390)Erlend E. Aasland2024-10-131-15/+9
|
* gh-86673: Loosen test_ttk.test_identify() requirements (#125335)Erlend E. Aasland2024-10-131-5/+5
| | | In aeca373b3 (PR gh-12011, issue gh-71500), test_identify() was changed to expect different results on Darwin. Ned's fix was later adjusted by e52f9bee8. This workaround is only needed for some variants of Tk/Tcl on macOS, so we now allow both the workaround and the generic results for these tests.
* Trivial change: Update comments in activate about what running hash -r does ↵Andrew Athan2024-10-131-2/+3
| | | | | | | (GH-125385) Update comments about what running hash -r does The old comment said "hash -r" forgets "past commands." However, the documentation for "hash" states that it forgets past locations. The old comment was, in my opinion, confusing. This is because it could be interpreted to mean it does something to the command history (HISTORY/HISTFILE etc) vs the cache of locations.
* 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-124-10/+10
| | | | | 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-124872: Move PyThreadState to first argument for consistency (#124774)Richard Hansen2024-10-121-3/+4
|
* gh-53203: Fix strptime() for %c and %x formats on many locales (GH-124946)Serhiy Storchaka2024-10-123-34/+134
| | | | | | | | | | | | | | | | | | | In some locales (like French or Hebrew) the full or abbreviated names of the default month and weekday used in __calc_date_time can be part of other name or constant part of the %c format. The month name can also match %m with constant suffix (like in Japanese). So the code failed to correctly distinguish formats %a, %A, %b, %B and %m. Cycle all month and all days of the week to find the variable part and distinguish %a from %A and %b from %B or %m. Fixed locales for the following languges: Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, French, Irish, Ge'ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, Haitian Kreyol, Japanese, Kannada, Korean, Marathi, Malay, Norwegian, Nynorsk, Punjabi, Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon and Chinese. Co-authored-by: Eli Bendersky <eliben@gmail.com>
* gh-125260: Change the default ``gzip.compress()`` mtime to 0 (#125261)Bernhard M. Wiedemann2024-10-124-5/+23
| | | | | | | | | 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>