summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-101100: Fix Sphinx nitpicks in `library/tempfile.rst` (#112886)Alex Waygood2023-12-092-24/+29
| | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-112867: fix for WITH_PYMALLOC_RADIX_TREE=0 (GH-112885)Neil Schemenauer2023-12-092-0/+3
| | | | The _obmalloc_usage structure is only defined if the obmalloc radix tree is enabled.
* gh-110109: Fix installed buildbots now `pathlib` is a package (#112901)Alex Waygood2023-12-091-0/+1
|
* GH-110109: Move pathlib ABCs to new `pathlib._abc` module. (#112881)Barney Gale2023-12-093-511/+518
| | | | | | | | | | | Move `_PurePathBase` and `_PathBase` to a new `pathlib._abc` module, and drop the underscores from the class names. Tests are mostly left alone in this commit, but they'll be similarly split in a subsequent commit. The `pathlib._abc` module will be published as an independent PyPI package (similar to how `zipfile._path` is published as `zipp`), to be refined and stabilised prior to its possible addition to the standard library.
* gh-112720: Move instruction formatting from the dis.Instruction class to a ↵Irit Katriel2023-12-092-205/+232
| | | | new class dis.InstructionFormatter. Add the ArgResolver class. (#112722)
* gh-112334: Regression test that vfork is used when expected. (#112734)Gregory P. Smith2023-12-094-15/+101
| | | | | | | | | Regression test that vfork is used when expected by subprocess. This is written integration test style, it uses strace if it is present and appears to work to find out what system call actually gets used in different scenarios. Test coverage is added for the default behavior and that of each of the specific arguments that must disable the use of vfork. obviously not an entire test matrix, but it covers the most important aspects. If there are ever issues with this test being flaky or failing on new platforms, rather than try and adapt it for all possible platforms, feel free to narrow the range it gets tested on when appropriate. That is not likely to reduce coverage.
* gh-112758: Updated pathlib documentation for PurePath.match (#112814)Taylor Packard2023-12-081-0/+3
|
* gh-112540: Support zero inputs in geometric_mean() (gh-112880)Raymond Hettinger2023-12-083-9/+35
|
* GH-110109: Add `pathlib._PurePathBase` (#110670)Barney Gale2023-12-083-53/+115
| | | | | Add private `pathlib._PurePathBase` class: a private superclass of both `PurePath` and `_PathBase`. Unlike `PurePath`, it does not define any of these special methods: `__fspath__`, `__bytes__`, `__reduce__`, `__hash__`, `__eq__`, `__lt__`, `__le__`, `__gt__`, `__ge__`. Its initializer and path joining methods accept only strings, not os.PathLike objects more broadly. This is important for supporting *virtual paths*: user subclasses of `_PathBase` that provide access to archive files, FTP servers, etc. In these classes, the above methods should be implemented by users only as appropriate, with due consideration for the hash/equality of any backing objects, such as file objects or sockets.
* gh-112278: In _wmi, treat initialization timeout separately from connection ↵AN Long2023-12-081-12/+34
| | | | timeout (GH-112878)
* gh-112779: Check 1-byte atomics in configure (gh-112819)Sam Gross2023-12-082-8/+28
|
* gh-112535: Update _Py_ThreadId() to support s390/s390x (gh-112751)Donghee Na2023-12-081-0/+4
|
* gh-112302: Annotate SBOM file as generated in .gitattributes (#112854)Seth Michael Larson2023-12-081-0/+1
| | | Annotate SBOM file as generated in .gitattributes
* gh-101100: Improve documentation for attributes on instance methods (#112832)Alex Waygood2023-12-086-41/+76
|
* gh-101100: Fix Sphinx nits in `library/contextlib.rst` (#112870)Alex Waygood2023-12-082-8/+7
|
* gh-101100: Fix Sphinx nitpicks in `library/shelve.rst` (#112836)Alex Waygood2023-12-082-5/+5
|
* GH-111485: Factor out opcode ID generator from the main cases generator. ↵Mark Shannon2023-12-087-72/+203
| | | | (GH-112831)
* gh-110820: Make sure processor specific defines are correct for Universal 2 ↵Ronald Oussoren2023-12-082-1/+13
| | | | | | | | | | build on macOS (#112828) * gh-110820: Make sure processor specific defines are correct for Universal 2 build on macOS A number of processor specific defines are different for x86-64 and arm64, and need to be adjusted in pymacconfig.h. * remove debug stuf
* Add a versionchanged directive for gh-94692 (GH-112846)Serhiy Storchaka2023-12-081-0/+2
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-112675: Move path joining tests into `test_posixpath` and `test_ntpath` ↵Barney Gale2023-12-073-106/+96
| | | | | | | | | | | (#112676) In `test_pathlib`, the `check_drive_root_parts` test methods evaluated both joining and parsing/normalisation of paths. This dates from a time when pathlib implemented both functions itself, but nowadays path joining is done with `posixpath.join()` and `ntpath.join()`. This commit moves the joining-related test cases into `test_posixpath` and `test_ntpath`.
* gh-101100: Silence Sphinx warnings when `ntpath` or `posixpath` are ↵Alex Waygood2023-12-074-5/+8
| | | | referenced (#112833)
* gh-112826: Add a "What's New" Entry About _thread._is_main_interpreter ↵Eric Snow2023-12-072-0/+19
| | | | | | | (gh-112853) As of gh-112661, the threading module expects the _thread module to have a _is_main_interpreter(), which is used in the internal threading._shutdown(). This change causes a problem for anyone that replaces the _thread module with a custom one (only if they don't provide _is_main_interpreter()). They need to be sure to add it for 3.13+, thus this PR is adding a note in "What's New". This also forward-ports the "What's New" entry from 3.12 (gh-112850). Note that we do not also forward-port the fix in that PR. The fix is there only due to a regression from 3.12.0. There is no regression in 3.13+.
* gh-111924: Use PyMutex for Runtime-global Locks. (gh-112207)Sam Gross2023-12-0718-241/+97
| | | | | This replaces some usages of PyThread_type_lock with PyMutex, which does not require memory allocation to initialize. This simplifies some of the runtime initialization and is also one step towards avoiding changing the default raw memory allocator during initialize/finalization, which can be non-thread-safe in some circumstances.
* gh-112538: Add internal-only _PyThreadStateImpl "wrapper" for PyThreadState ↵Sam Gross2023-12-077-17/+54
| | | | | | | | (gh-112560) Every PyThreadState instance is now actually a _PyThreadStateImpl. It is safe to cast from `PyThreadState*` to `_PyThreadStateImpl*` and back. The _PyThreadStateImpl will contain fields that we do not want to expose in the public C API.
* gh-110017: Disable test_signal.test_stress_modifying_handlers on macOS (#112834)Ronald Oussoren2023-12-072-0/+3
| | | | | Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple.
* gh-112278: Disable WMI queries on Windows after they time out (GH-112658)AN Long2023-12-073-15/+44
|
* gh-79325: Fix recursion error in TemporaryDirectory cleanup on Windows ↵Serhiy Storchaka2023-12-073-2/+21
| | | | (GH-112762)
* 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>