summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas ↵Petr Viktorin2023-11-161-6/+97
| | | | | | (GH-111504) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* gh-111916: Make hashlib related modules thread-safe without the GIL (#111981)Tomas R2023-11-1510-137/+188
| | | | | Always use an individual lock on hash objects when in free-threaded builds. Fixes #111916
* gh-111811: Fix test_recursive_repr for WASI (#112130)Kushal Das2023-11-151-0/+1
|
* gh-112088: Run autoreconf in GHA check_generated_files (#112090)Victor Stinner2023-11-159-160/+131
| | | | | | | | | | | The "Check if generated files are up to date" job of GitHub Actions now runs the "autoreconf -ivf -Werror" command instead of the "make regen-configure" command to avoid depending on the external quay.io server. Add Tools/build/regen-configure.sh script to regenerate the configure with an Ubuntu container image. The "quay.io/tiran/cpython_autoconf:271" container image (https://github.com/tiran/cpython_autoconf) is no longer used.
* gh-112026: Add again _PyThreadState_UncheckedGet() function (#112121)Victor Stinner2023-11-152-0/+6
| | | | Add again the private _PyThreadState_UncheckedGet() function as an alias to the new public PyThreadState_GetUnchecked() function.
* gh-96954: Don't run regen-unicodedata in regen-all (#112120)Victor Stinner2023-11-151-3/+3
| | | | | | The "make regen-unicodedata" should now be run manually. By the default, it requires an Internet connection, which is not always the case. Some Linux distributions build Linux packages in isolated environment (without network).
* gh-112026: Restore removed _PyDict_GetItemStringWithError() (#112119)Victor Stinner2023-11-153-1/+17
| | | | Restore the removed _PyDict_GetItemStringWithError() function. It is used by numpy.
* gh-96954: Fix `make regen-unicodedata` in out-of-tree builds (#112118)Miro Hrončok2023-11-155-4/+5
| | | | | | | | | This avoids: python3.13 Tools/unicode/makeunicodedata.py python3.13: can't open file '.../build/debug/Tools/unicode/makeunicodedata.py': [Errno 2] No such file or directory make: *** [Makefile:1498: regen-unicodedata] Error 2 Re-run `make regen-unicodedata` to update the script path in generated files.
* gh-112026: Restore removed private C API (#112115)Victor Stinner2023-11-1520-236/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore removed private C API functions, macros and structures which have no simple replacement for now: * _PyDict_GetItem_KnownHash() * _PyDict_NewPresized() * _PyHASH_BITS * _PyHASH_IMAG * _PyHASH_INF * _PyHASH_MODULUS * _PyHASH_MULTIPLIER * _PyLong_Copy() * _PyLong_FromDigits() * _PyLong_New() * _PyLong_Sign() * _PyObject_CallMethodId() * _PyObject_CallMethodNoArgs() * _PyObject_CallMethodOneArg() * _PyObject_CallOneArg() * _PyObject_EXTRA_INIT * _PyObject_FastCallDict() * _PyObject_GetAttrId() * _PyObject_Vectorcall() * _PyObject_VectorcallMethod() * _PyStack_AsDict() * _PyThread_CurrentFrames() * _PyUnicodeWriter structure * _PyUnicodeWriter_Dealloc() * _PyUnicodeWriter_Finish() * _PyUnicodeWriter_Init() * _PyUnicodeWriter_Prepare() * _PyUnicodeWriter_PrepareKind() * _PyUnicodeWriter_WriteASCIIString() * _PyUnicodeWriter_WriteChar() * _PyUnicodeWriter_WriteLatin1String() * _PyUnicodeWriter_WriteStr() * _PyUnicodeWriter_WriteSubstring() * _PyUnicode_AsString() * _PyUnicode_FromId() * _PyVectorcall_Function() * _Py_HashDouble() * _Py_HashPointer() * _Py_IDENTIFIER() * _Py_c_abs() * _Py_c_diff() * _Py_c_neg() * _Py_c_pow() * _Py_c_prod() * _Py_c_quot() * _Py_c_sum() * _Py_static_string() * _Py_static_string_init()
* gh-112026: Add again <unistd.h> include in Python.h (#112046)Victor Stinner2023-11-153-21/+15
| | | | Add again <ctype.h> and <unistd.h> includes in Python.h, but don't include them in the limited C API version 3.13 and newer.
* GH-111848: Set the IP when de-optimizing (GH-112065)Mark Shannon2023-11-156-98/+118
| | | | | | | | | | | | * Replace jumps with deopts in tier 2 * Fewer special cases of uop names * Add target field to uop IR * Remove more redundant SET_IP and _CHECK_VALIDITY micro-ops * Extend whitelist of non-escaping API functions.
* Fix typo in perf profiling docs (#112112)Ryuji Tsutsui2023-11-151-1/+1
|
* gh-108303: Delete `imp_dummy` test file (#112110)Nikita Sobolev2023-11-151-3/+0
|
* gh-111789: Use PyDict_GetItemRef() in Modules/_asynciomodule.c (GH-112072)Serhiy Storchaka2023-11-151-6/+2
|
* Docs: Add the time to the HTML last updated format (#110091)Adam Turner2023-11-151-3/+2
|
* gh-112062: Make `_struct` module thread-safe in `--disable-gil` builds (#112094)Radislav Chugunov2023-11-151-7/+6
| | | | | * gh-112062: Make `_struct` module thread-safe in --disable-gil builds
* gh-111545: Test PyHash_GetFuncDef() function (#112098)Victor Stinner2023-11-159-1/+147
| | | Add Modules/_testcapi/hash.c and Lib/test/test_capi/test_hash.py.
* gh-109538: Avoid RuntimeError when StreamWriter is deleted with closed loop ↵DPR2023-11-153-5/+45
| | | | | | | (#111983) Issue a ResourceWarning instead. Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-111995: Add getnameinfo extension flag (#111994)adder322023-11-152-0/+5
| | | Add getnameinfo extension NI_IDN flag.
* gh-111545: Add Include/cpython/pyhash.h header file (#112063)Victor Stinner2023-11-155-13/+24
| | | Move non-limited C API to a new Include/cpython/pyhash.h header file.
* gh-111942: Fix SystemError in the TextIOWrapper constructor (#112061)Serhiy Storchaka2023-11-143-5/+9
| | | | | | In non-debug more the check for the "errors" argument is skipped, and then PyUnicode_AsUTF8() can fail, but its result was not checked. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-111906: Fix warnings during mimalloc build on FreeBSD (#111907)Furkan Onder2023-11-141-2/+2
| | | Fix `unused function` warnings during mimalloc build on FreeBSD.
* gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976)Serhiy Storchaka2023-11-143-5/+122
| | | | | | | | * Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments.
* GH-111848: Convert remaining jumps to deopts into tier 2 code. (GH-112045)Mark Shannon2023-11-147-129/+184
|
* gh-111789: Simplify bytecodes.c by using PyDict_GetItemRef() (GH-111978)Serhiy Storchaka2023-11-143-140/+51
|
* gh-111262: Add PyDict_Pop() function (#112028)Victor Stinner2023-11-1415-73/+335
| | | | | | | _PyDict_Pop_KnownHash(): remove the default value and the return type becomes an int. Co-authored-by: Stefan Behnel <stefan_ml@behnel.de> Co-authored-by: Antoine Pitrou <pitrou@free.fr>
* gh-110944: Make pdb completion work for alias and convenience vars (GH-110945)Tian Gao2023-11-143-1/+39
|
* gh-111903: Add `@critical_section` directive to Argument Clinic. (#111904)Sam Gross2023-11-145-8/+117
| | | | | | | | | The `@critical_section` directive instructs Argument Clinic to generate calls to `Py_BEGIN_CRITICAL_SECTION()` and `Py_END_CRITICAL_SECTION()` around the bound function. In `--disable-gil` builds, these calls will lock and unlock the `self` object. They are no-ops in the default build. This is used in one place (`_io._Buffered.close`) as a demonstration. Subsequent PRs will use it more widely in the `_io.Buffered` bindings.
* gh-111789: Simplify ceval.c by using PyDict_GetItemRef() (GH-111980)Serhiy Storchaka2023-11-141-18/+14
|
* gh-111789: Simplify import.c by using PyDict_GetItemRef() (GH-111979)Serhiy Storchaka2023-11-141-18/+17
|
* gh-111789: Use PyDict_GetItemRef() in _ctypes (GH-111828)Serhiy Storchaka2023-11-142-78/+61
|
* gh-111789: Use PyDict_GetItemRef() in Objects/ (GH-111827)Serhiy Storchaka2023-11-145-120/+76
|
* gh-111622: Fix doc for items views (#112051)Terry Jan Reedy2023-11-141-5/+8
| | | | They are set-like even when some values are not hashable, but work even better when all are.
* GH-111520: Add back the operand local (GH-111813)Brandt Bucher2023-11-143-28/+24
|
* gh-107149: make new opcode util functions private rather than public and ↵Irit Katriel2023-11-145-39/+43
| | | | unstable (#112042)
* 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-110417: Fix `glob` docs ordering (#110418)Barney Gale2023-11-131-34/+35
| | | | | | | Fix incorrect placement of `translate()` docs from cf67ebf. Move "see also: pathlib" admonition to the bottom of the page, alongside one for fnmatch. This helps the module introduction flow more naturally into the function descriptions. Add an "Examples" subheading just before the examples. This makes it more obvious that examples aren't specifically related to the preceding documentation of `escape()` and `translate()`.
* GH-72904: Add `glob.translate()` function (#106703)Barney Gale2023-11-137-106/+229
| | | | | | | | | | | Add `glob.translate()` function that converts a pathname with shell wildcards to a regular expression. The regular expression is used by pathlib to implement `match()` and `glob()`. This function differs from `fnmatch.translate()` in that wildcards do not match path separators by default, and that a `*` pattern segment matches precisely one path segment. When *recursive* is set to true, `**` pattern segments match any number of path segments, and `**` cannot appear outside its own segment. In pathlib, this change speeds up directory walking (because `_make_child_relpath()` does less work), makes path objects smaller (they don't need a `_lines` slot), and removes the need for some gnarly code. Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-111138: Add PyList_Extend() and PyList_Clear() functions (#111862)Victor Stinner2023-11-138-127/+303
| | | | | | * Split list_extend() into two sub-functions: list_extend_fast() and list_extend_iter(). * list_inplace_concat() no longer has to call Py_DECREF() on the list_extend() result, since list_extend() now returns an int.
* gh-111856: Fix os.fstat on windows with FAT32 and exFAT filesystem (GH-112038)AN Long2023-11-132-3/+10
|
* gh-111460: Restore ncurses widechar support on macOS (#111878)Davide Rizzo2023-11-133-3/+8
|
* gh-106905: avoid incorrect SystemError about recursion depth mismatch (#106906)Markus Mohrhard2023-11-133-0/+16
| | | | | | | | | | * gh-106905: avoid incorrect SystemError about recursion depth mismatch * Update Misc/NEWS.d/next/Core and Builtins/2023-07-20-11-41-16.gh-issue-106905.AyZpuB.rst --------- Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-110944: Move pty helper to test.support and add basic pdb completion test ↵Tian Gao2023-11-133-54/+91
| | | | (GH-111826)
* gh-102837: more tests for the math module (GH-111930)Sergey B Kirpichev2023-11-131-0/+55
| | | | | | | | | | | | | | Add tests to improve coverage: * fsum: L1369, L1379, L1383, L1412 * trunc: L2081 * log: L2267 * dist: L2577, L2579 * hypot: L2632 * sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838 * pow: L2982 * prod: L3294, L3308, L3318-3330 // line numbers wrt to 9dc4fb8204
* Docs: Add `make htmllive` to rebuild and reload HTML files in your browser ↵Hugo van Kemenade2023-11-132-0/+7
| | | | (#111900)
* gh-111999: Add signatures and improve docstrings for builtins (GH-112000)Serhiy Storchaka2023-11-138-39/+74
|
* gh-111928: make "memo" dict local to scan_once call (gh-112005)AN Long2023-11-131-23/+19
| | | Co-authored-by: Sam Gross <colesbury@gmail.com>
* gh-111944: Add assignment expression parentheses requirements (#111977)Terry Jan Reedy2023-11-131-4/+5
| | | | | | | gh-111944: Clarify where assignment expressions require ()s Augment the list of places where parentheses are required around assignnment statements. In particular, 'a := 0' and 'a = b := 1' are syntax errors.
* GH-111429: Speed up `pathlib.PurePath.[is_]relative_to()` (#111431)Barney Gale2023-11-122-4/+10
|
* gh-111969: refactor to make it easier to construct a dis.Instruction object ↵Irit Katriel2023-11-122-64/+101
| | | | (#111970)