summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-87319: Simplify TemporaryDirectory cleanup using os.path.isjunction() ↵Serhiy Storchaka2023-12-071-13/+1
| | | | (GH-112791)
* gh-91133: tempfile.TemporaryDirectory: fix symlink bug in cleanup (GH-99930)Søren Løvborg2023-12-073-15/+125
| | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-112302: Add Software Bill-of-Materials (SBOM) tracking for dependencies ↵Seth Michael Larson2023-12-077-1/+2499
| | | | (#112303)
* gh-111962: Make dtoa thread-safe in `--disable-gil` builds. (#112049)Sam Gross2023-12-073-30/+70
| | | | | | | | | | | | | | | | | | | | This updates `dtoa.c` to avoid using the Bigint free-list in --disable-gil builds and to pre-computes the needed powers of 5 during interpreter initialization. * gh-111962: Make dtoa thread-safe in `--disable-gil` builds. This avoids using the Bigint free-list in `--disable-gil` builds and pre-computes the needed powers of 5 during interpreter initialization. * Fix size of cached powers of 5 array. We need the powers of 5 up to 5**512 because we only jump straight to underflow when the exponent is less than -512 (or larger than 308). * Rename Py_NOGIL to Py_GIL_DISABLED * Changes from review * Fix assertion placement
* gh-110190: Temporarily skip new test introduced in gh-112604 on PPC64LE ↵Łukasz Langa2023-12-071-45/+53
| | | | (#112818)
* bpo-42519: Remove outdated sentence in comment (#112822)Christopher Chavez2023-12-071-1/+1
| | | Update objimpl.h
* gh-112125: Fix None.__ne__(None) returning NotImplemented instead of False ↵andrewluotechnologies2023-12-075-1/+15
| | | | (#112504)
* GH-111485: Separate out parsing, analysis and code-gen phases of tier 1 code ↵Mark Shannon2023-12-0715-526/+1675
| | | | generator (GH-112299)
* gh-102980: Redirect output of pdb's `interact` command, add tests and ↵Tian Gao2023-12-074-4/+86
| | | | improve docs (#111194)
* gh-51944: Add missing macOS constants to termios (#112823)Ronald Oussoren2023-12-072-0/+67
| | | | | | | | | | | * gh-51944: Add some macOS constants to termios This changeset adds all public constants in <termio.h> and <sys/termios.h> on macOS that weren't present already. Based on the macOS 14.2 SDK Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-74616: Raise ValueError in case of null character in input prompt (GH-1738)Kushal Das2023-12-073-9/+42
| | | | | | | If the input prompt to the builtin input function on terminal has any null character, then raise ValueError instead of silently truncating it. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-112660: Do not clear arbitrary errors on import (GH-112661)Serhiy Storchaka2023-12-074-58/+72
| | | | | Previously arbitrary errors could be cleared during formatting error messages for ImportError or AttributeError for modules. Now all unexpected errors are reported.
* gh-109981: Fix support.fd_count() on macOS 14 (#112797)Ronald Oussoren2023-12-072-2/+12
| | | | | | | Use scanning "/dev/fd/" on macOS in support.fd_count(). That's both more efficient than scanning all possible file descriptors, and avoids crashing the interpreter when there are open "guarded" file descriptors. "Guarded" file descriptors are a macOS feature where file descriptors used by system libraries are marked and cause hard crashes when used by "user" code. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-112730: Use color to highlight error locations (gh-112732)Pablo Galindo Salgado2023-12-068-40/+369
| | | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-101100: Fix Sphinx nitpicks in `library/reprlib.rst` (#112811)Alex Waygood2023-12-062-23/+30
|
* gh-101100: Improve documentation of code object attributes (#112781)Alex Waygood2023-12-0610-53/+112
|
* gh-111178: Define `visitproc` callback functions properly and remove ↵Christopher Chavez2023-12-061-9/+13
| | | | unnecessary casts in gcmodule.c (#112687)
* gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds "funcid" ↵Serhiy Storchaka2023-12-063-11/+51
| | | | | | | | | | | | | (GH-111322) Previously, "widget.unbind(sequence, funcid)" destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now it removes only "funcid" from the binding for "sequence", keeping other commands, and deletes the "funcid" command. It leaves "sequence" unbound only if "funcid" was the last bound command. Co-authored-by: GiovanniL <13402461+GiovaLomba@users.noreply.github.com>
* gh-111545: Add Py_HashPointer() function (#112096)Victor Stinner2023-12-069-22/+103
| | | | | * Implement _Py_HashPointerRaw() as a static inline function. * Add Py_HashPointer() tests to test_capi.test_hash. * Keep _Py_HashPointer() function as an alias to Py_HashPointer().
* gh-108223: Refer to PEP 703 as Free Threading (#112780)Victor Stinner2023-12-062-2/+5
|
* gh-111178: Docs: fix `traverseproc`, `inquiry`, and `destructor` parameters ↵Christopher Chavez2023-12-061-3/+3
| | | | | | | | in slot typedefs table (GH-112742) In the slot typedefs table, the parameter of `destructor` and the first parameter of `traverseproc` should both be `PyObject *` rather than `void *`. Same for `inquiry`.
* gh-101100: Fix most Sphinx nitpicks in the glossary and `stdtypes.rst` (#112757)Alex Waygood2023-12-062-32/+41
|
* gh-108927: Include new dir test/regrtestdata in the installation (GH-112765)Serhiy Storchaka2023-12-061-0/+3
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-112606: Use sem_clockwait with monotonic time when supported in ↵Matt Prodani2023-12-061-2/+11
| | | | parking_lot.c (gh-112733)
* gh-112769: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with non-int ↵Miro Hrončok2023-12-052-12/+20
| | | | | | suffix (GH-112771) zlib-ng defines the version as "1.3.0.zlib-ng".
* gh-101100: Properly document frame object attributes (#112735)Alex Waygood2023-12-0512-49/+88
|
* Minor stylistic edit to the grouper recipe (gh112759)Jurjen N. E. Bos2023-12-051-2/+2
|
* bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766)Zackery Spytz2023-12-053-2/+56
| | | | | | | * Ignore os.close() errors when ignore_errors is True. * Pass os.close() errors to the error handler if specified. * os.close no longer retried after error. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-112328: [Enum] Make some private attributes public. (GH-112514)Ethan Furman2023-12-055-117/+301
| | | | | | | | | | | | | * [Enum] Make some private attributes public. - ``_EnumDict`` --> ``EnumDict`` - ``EnumDict._member_names`` --> ``EnumDict.member_names`` - ``Enum._add_alias_`` - ``Enum._add_value_alias_`` --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-94692: Only catch OSError in shutil.rmtree() (#112756)Serhiy Storchaka2023-12-053-19/+22
| | | | | Previously a symlink attack resistant version of shutil.rmtree() could ignore or pass to the error handler arbitrary exception when invalid arguments were provided.
* gh-110190: Fix ctypes structs with array on Arm (#112604)Diego Russo2023-12-054-20/+193
| | | | | | | | Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate.
* gh-105323: Remove `WITH_APPLE_EDITLINE` to use the same declaration for all ↵Tian Gao2023-12-054-36/+2
| | | | editline (gh-112513)
* bpo-43153: Don't mask `PermissionError` with `NotADirectoryError` during ↵Ken Jin2023-12-053-2/+41
| | | | | | tempdirectory cleanup (GH-29940) Co-authored-by: andrei kulakov <andrei.avk@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-112535: Add comment for ppc32/64 registers (gh-112746)Donghee Na2023-12-051-0/+2
|
* gh-101100: Fix many easily solvable Sphinx nitpicks in the datamodel docs ↵Alex Waygood2023-12-052-29/+37
| | | | (#112737)
* gh-81441: shutil.rmtree() FileNotFoundError race condition (GH-14064)Jeffrey Kintscher2023-12-054-11/+97
| | | | | | | Ignore missing files and directories while enumerating directory entries in shutil.rmtree(). Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-62897: Update PyUnicode C API parameter names (GH-12680)Rune Tynan2023-12-051-91/+91
| | | | | Standardize PyUnicode C API parameter names across the documentation. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-112535: Update _Py_ThreadId() to support PowerPC (gh-112624)Donghee Na2023-12-051-0/+16
|
* gh-82300: Add track parameter to multiprocessing.shared_memory (#110778)pan3242023-12-054-23/+106
| | | | | | | | | | Add a track parameter to shared memory to allow resource tracking via the side-launched resource tracker process to be disabled on platforms that use it (POSIX). This allows people who do not want automated cleanup at process exit because they are using the shared memory with processes not participating in Python's resource tracking to use the shared_memory API. Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> Co-authored-by: Antoine Pitrou <pitrou@free.fr> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Minor refactoring of Object/abstract.c (UNARY_FUNC macro and more cases for ↵Sergey B Kirpichev2023-12-051-90/+25
| | | | | | | BINARY_FUNC) (GH-112145) * Use BINARY_FUNC macro for some remaining ops * Add UNARY_FUNC macro to define unary PyNumber_* functions
* gh-102130: Support tab completion in cmd for Libedit. (GH-107748)Constantin Hong2023-12-055-1/+51
| | | | | --- Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* gh-112736: Refactor del-safe symbol handling in subprocess (#112738)Russell Keith-Magee2023-12-052-24/+25
| | | | | Refactor delete-safe symbol handling in subprocess. Only module globals are force-cleared during interpreter finalization, using a class reference instead of individually listing the constants everywhere is simpler.
* GH-112727: Speed up `pathlib.Path.absolute()` (#112728)Barney Gale2023-12-042-6/+15
| | | | | | Use `_from_parsed_parts()` to create a pre-joined/pre-parsed path, rather than passing multiple arguments to `with_segments()` Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-112334: Restore subprocess's use of `vfork()` & fix `extra_groups=[]` ↵Gregory P. Smith2023-12-043-23/+38
| | | | | | | | | | | | | | | | | | | | | behavior (#112617) Restore `subprocess`'s intended use of `vfork()` by default for performance on Linux; also fixes the behavior of `extra_groups=[]` which was unintentionally broken in 3.12.0: Fixed a performance regression in 3.12's :mod:`subprocess` on Linux where it would no longer use the fast-path ``vfork()`` system call when it could have due to a logic bug, instead falling back to the safe but slower ``fork()``. Also fixed a security bug introduced in 3.12.0. If a value of ``extra_groups=[]`` was passed to :mod:`subprocess.Popen` or related APIs, the underlying ``setgroups(0, NULL)`` system call to clear the groups list would not be made in the child process prior to ``exec()``. The security issue was identified via code inspection in the process of fixing the first bug. Thanks to @vain for the detailed report and analysis in the initial bug on Github. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-112535: Add test on _Py_ThreadId() (#112709)Victor Stinner2023-12-046-8/+75
| | | Add also test.support.Py_GIL_DISABLED constant.
* gh-112671: Fixing typo in the Macro Docs (GH-112715)Amioplk2023-12-041-1/+1
| | | Replace Py_T_STRING_INLINE with Py_T_STRING_INPLACE
* gh-105967: Work around a macOS bug, limit zlib C library crc32 API calls to ↵Gregory P. Smith2023-12-043-10/+30
| | | | | | | | | 1gig (#112615) Work around a macOS bug, limit zlib crc32 calls to 1GiB. Without this, `zlib.crc32` and `binascii.crc32` could produce incorrect results on multi-gigabyte inputs depending on the macOS version's Apple supplied zlib implementation.
* gh-103363: Add follow_symlinks argument to `pathlib.Path.owner()` and ↵Kamil Turek2023-12-045-24/+93
| | | | `group()` (#107962)
* gh-74690: Avoid a costly type check where possible in ↵Alex Waygood2023-12-043-6/+37
| | | | `_ProtocolMeta.__subclasscheck__` (#112717)
* gh-112516: Update bundled pip version to 23.3.1 (gh-112517)Thomas Bininda2023-12-043-1/+2
|