summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-96398: Fix mpicc check in configure.ac (#117857)Erlend E. Aasland2024-04-132-2/+2
|
* gh-68583: webbrowser: replace `getopt` with `argparse`, add long options ↵Hugo van Kemenade2024-04-134-55/+135
| | | | (#117047)
* gh-102247: http: support rfc9110 status codes (GH-117611)Michiel W. Beijen2024-04-136-78/+94
| | | | | | | | | | | | | | | | | | | | rfc9110 obsoletes the earlier rfc 7231. This document also includes some status codes that were previously only used for WebDAV and assigns more generic names to these status codes. ref: https://www.rfc-editor.org/rfc/rfc9110.html#name-changes-from-rfc-7231 - http.HTTPStatus.CONTENT_TOO_LARGE (413, previously REQUEST_ENTITY_TOO_LARGE) - http.HTTPStatus.URI_TOO_LONG (414, previously REQUEST_URI_TOO_LONG) - http.HTTPStatus.RANGE_NOT_SATISFYABLE (416, previously REQUEST_RANGE_NOT_SATISFYABLE) - http.HTTPStatus.UNPROCESSABLE_CONTENT (422, previously UNPROCESSABLE_ENTITY) The new constants are added to http.HTTPStatus and the old constant names are preserved for backwards compatibility. References in documentation to the obsoleted rfc 7231 are updated
* gh-117840: Fix indent to fix shlex syntax highlighting (#117843)Hugo van Kemenade2024-04-131-15/+15
|
* gh-114466: explicitly define heap invariant (#117778)Shantanu2024-04-131-2/+3
| | | | | I think the choice of wording in these docs is great and doesn't need to change. However, it could be useful to explicitly define this term / the cost of doing so seems relatively low.
* gh-96398: Detect GCC compatible compilers in configure (#117825)Erlend E. Aasland2024-04-132-1/+40
| | | | Introduce a cached variable $ac_cv_gcc_compat and set it to 'yes' if the C preprocessor defines the __GNUC__ macro.
* gh-94673: Clarify About Runtime State Related to Static Builtin Types ↵Eric Snow2024-04-122-1/+43
| | | | | | | | (gh-117761) Guido pointed out to me that some details about the per-interpreter state for the builtin types aren't especially clear. I'm addressing that by: * adding a comment explaining that state * adding some asserts to point out the relationship between each index and the interp/global runtime state
* GH-117727: Speed up `pathlib.Path.iterdir()` by using `os.scandir()` (#117728)Barney Gale2024-04-122-20/+8
| | | | | Replace use of `os.listdir()` with `os.scandir()`. Forgo setting `_drv`, `_root` and `_tail_cached`, as these usually aren't needed. Use `os.DirEntry.path` to set `_str`.
* GH-115060: Speed up `pathlib.Path.glob()` by not scanning literal parts ↵Barney Gale2024-04-124-11/+42
| | | | | | | | | (#117732) Don't bother calling `os.scandir()` to scan for literal pattern segments, like `foo` in `foo/*.py`. Instead, append the segment(s) as-is and call through to the next selector with `exists=False`, which signals that the path might not exist. Subsequent selectors will call `os.scandir()` or `os.lstat()` to filter out missing paths as needed.
* gh-115627: Fix ssl test_pha_required_nocert() (#117821)Victor Stinner2024-04-121-1/+5
| | | Accept also BrokenPipeError error message.
* gh-117739: Update definition of global interpreter lock for 3.13 (#117740)Savannah Ostrowski2024-04-121-6/+6
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-117376: Partial implementation of deferred reference counting (#117696)Sam Gross2024-04-129-21/+82
| | | | | This marks objects as using deferred refrence counting using the `ob_gc_bits` field in the free-threaded build and collects those objects during GC.
* gh-117764: Add more tests for signatures of builtins (GH-117816)Serhiy Storchaka2024-04-121-34/+265
| | | | | | | | | | | | Test signatures of all public builtins and methods of builtin classes in modules builtins, types, sys, and several other modules (either included in the list of standard builtin modules sys.builtin_module_names, or providing a public interface for such modules). Most builtins should have supported signatures, with few known exceptions. When more builtins will be converted to Argument Clinic or support of new signatures be implemented, they will be removed from the exception lists.
* gh-96398: Detect emcc and mpicc in compiler names in configure (#117819)Erlend E. Aasland2024-04-122-2/+12
| | | | - emcc defines __EMSCRIPTEN__ - mpicc doesn't define anything in particular; detect it using basename
* gh-117764: Add docstrings and signatures for the types of None, Ellipsis and ↵Serhiy Storchaka2024-04-124-6/+21
| | | | NotImplemented (GH-117813)
* gh-117764: Use Argument Clinic for signal.set_wakeup_fd() (GH-117777)Serhiy Storchaka2024-04-126-26/+106
|
* gh-117764: Fix and add signatures for many builtins (GH-117769)Serhiy Storchaka2024-04-1211-30/+45
|
* Fix version directive indents (#117719)Hugo van Kemenade2024-04-124-8/+8
|
* gh-117764: Add signatures for functions in the faulthandler module (GH-117771)Serhiy Storchaka2024-04-121-26/+35
|
* gh-117764: Add signature for functools.partial() (GH-117775)Serhiy Storchaka2024-04-121-2/+3
|
* gh-117764: Add signatures and improve docstrings in the _thread module ↵Serhiy Storchaka2024-04-121-46/+126
| | | | (GH-117772)
* gh-117752: Autoconf: fix PGO builds for 'make -C build' incantations (#117803)Erlend E. Aasland2024-04-122-8/+16
|
* gh-117764: Add signatures for some objects in the itertools module (GH-117774)Serhiy Storchaka2024-04-121-3/+6
|
* gh-117764: Add signatures in the atexit module (GH-117776)Serhiy Storchaka2024-04-121-5/+10
|
* gh-117764: Add signatures for __reduce__ and __reduce_ex__ in the _io module ↵Serhiy Storchaka2024-04-123-10/+10
| | | | | | (GH-117773) __reduce__() does not have parameters, __reduce_ex__() has a single parameter.
* gh-117764: Add signatures for some functions in the sys module (GH-117770)Serhiy Storchaka2024-04-122-35/+73
| | | Use Argument Clinic if possible.
* gh-117764: Add docstrings and signatures for the __replace__ methods (GH-117768)Serhiy Storchaka2024-04-124-6/+14
|
* gh-117431: Adapt bytes and bytearray .find() and friends to Argument Clinic ↵Erlend E. Aasland2024-04-128-164/+703
| | | | | | | | | | | | | | (#117502) This change gives a significant speedup, as the METH_FASTCALL calling convention is now used. The following bytes and bytearray methods are adapted: - count() - find() - index() - rfind() - rindex() Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* gh-117752: Autoconf: fix -fno-semantic-interposition check (#117789)Erlend E. Aasland2024-04-122-8/+8
| | | Force the compiler to issue an error if the flag is not supported.
* gh-117752: Autoconf: store all LLVM profile data in the build directory ↵Erlend E. Aasland2024-04-122-4/+4
| | | | | (#117790) This prevents spurious 'env changed' and llvm-profdata merge errors.
* gh-76785: Handle Legacy Interpreters Properly (gh-117490)Eric Snow2024-04-119-200/+454
| | | This is similar to the situation with threading._DummyThread. The methods (incl. __del__()) of interpreters.Interpreter objects must be careful with interpreters not created by interpreters.create(). The simplest thing to start with is to disable any method that modifies or runs in the interpreter. As part of this, the runtime keeps track of where an interpreter was created. We also handle interpreter "refcounts" properly.
* gh-117787: Autoconf: fix bashisms/semantic breakage of iOS checks (#117788)Eli Schwartz2024-04-112-2/+2
|
* gh-116738: Make _abc module thread-safe (#117488)Brett Simmers2024-04-113-115/+205
| | | | A collection of small changes aimed at making the `_abc` module safe to use in a free-threaded build.
* gh-117649: Fix file descriptor leak in (expected) failing test case (#117780)Sam Gross2024-04-111-0/+3
| | | | | The test case is currently expected to fail in the free-threaded build. However, it fails before it gets a chance to close the write end of the pipe.
* gh-117649: Raise ImportError for unsupported modules in free-threaded build ↵Sam Gross2024-04-119-32/+103
| | | | | | | | | | (#117651) The free-threaded build does not currently support the combination of single-phase init modules and non-isolated subinterpreters. Ensure that `check_multi_interp_extensions` is always `True` for subinterpreters in the free-threaded build so that importing these modules raises an `ImportError`.
* gh-111506: Error if the limited API is used in free-threaded build (#117762)Sam Gross2024-04-111-0/+5
| | | | Issue a build time error if both `Py_LIMITED_API` and `Py_GIL_DISABLED` are defined.
* gh-104269: Document `glob.glob` duplicates when using multiple `**` patterns ↵Tomas R2024-04-111-0/+8
| | | | (#105406)
* gh-117233: Detect support for several hashes at hashlib build time (GH-117234)Will Childs-Klein2024-04-112-10/+62
| | | | | | | | | | | | | | | | | | | | | | | Detect libcrypto BLAKE2, Shake, SHA3, and Truncated-SHA512 support at hashlib build time ## BLAKE2 While OpenSSL supports both "b" and "s" variants of the BLAKE2 hash function, other cryptographic libraries may lack support for one or both of the variants. This commit modifies `hashlib`'s C code to detect whether or not the linked libcrypto supports each BLAKE2 variant, and elides references to each variant's NID accordingly. In cases where the underlying libcrypto doesn't fully support BLAKE2, CPython's `./configure` script can be given the following flag to use CPython's interned BLAKE2 implementation: `--with-builtin-hashlib-hashes=blake2`. ## SHA3, Shake, & truncated SHA512. Detect BLAKE2, SHA3, Shake, & truncated SHA512 support in the OpenSSL-ish libcrypto library at build time. This helps allow hashlib's `_hashopenssl` to be used with libraries that do not to support every algorithm that upstream OpenSSL does. Such as AWS-LC & BoringSSL. Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* gh-117722: Fix Stream.readuntil with non-bytes buffer objects (#117723)Bruce Merry2024-04-115-14/+27
| | | | | | | | | | | | | gh-16429 introduced support for an iterable of separators in Stream.readuntil. Since bytes-like types are themselves iterable, this can introduce ambiguities in deciding whether the argument is an iterator of separators or a singleton separator. In gh-16429, only 'bytes' was considered a singleton, but this will break code that passes other buffer object types. Fix it by only supporting tuples rather than arbitrary iterables. Closes gh-117722.
* gh-101549: fix documentation of xml.etree.ElementInclude (#101550)Mikhail B2024-04-112-26/+22
| | | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* gh-115142: Skip ``test_capi/test_opt.py`` if ``_testinternalcapi`` is not ↵Kirill Podoprigora2024-04-111-2/+3
| | | | available (GH-117574)
* Fix markup of `win32_ver` in `platform.rst` (#116492)Nikita Sobolev2024-04-111-2/+2
|
* gh-117709: Add vectorcall support for str() with positional-only arguments ↵Erlend E. Aasland2024-04-113-0/+72
| | | | | | | | (#117746) Fall back to tp_call() for cases when arguments are passed by name. Co-authored-by: Donghee Na <donghee.na@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-113317: Add ParseArgsCodeGen class (#117707)Victor Stinner2024-04-114-846/+953
|
* gh-113317: Add Codegen class to Argument Clinic (#117626)Victor Stinner2024-04-118-180/+183
| | | | | | | | | | | * Move ifndef_symbols, includes and add_include() from Clinic to Codegen. Add a 'codegen' (Codegen) attribute to Clinic. * Remove libclinic.crenderdata module: move code to libclinic.codegen. * BlockPrinter.print_block(): remove unused 'limited_capi' argument. Remove also 'core_includes' parameter. * Add get_includes() methods. * Make Codegen.ifndef_symbols private. * Make Codegen.includes private. * Make CConverter.includes private.
* gh-117711: Only check for 'test/wheeldata' when it's actually used (#117712)Karolina Surma2024-04-111-0/+4
| | | | | | | It's possible to build Python with option `--with-wheel-pkg-dir` pointing to a custom wheel directory. Don't include the directory in the test set if the wheels are used from a different location. Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* gh-117606: Truncate extremely long error message in `test_exceptions` (#117670)Nice Zombies2024-04-111-1/+2
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-76785: Add More Tests to test_interpreters.test_api (gh-117662)Eric Snow2024-04-1118-418/+2012
| | | In addition to the increase test coverage, this is a precursor to sorting out how we handle interpreters created directly via the C-API.
* GH-117586: Speed up `pathlib.Path.walk()` by working with strings (#117726)Barney Gale2024-04-114-71/+52
| | | | | | | | | | | Move `pathlib.Path.walk()` implementation into `glob._Globber`. The new `glob._Globber.walk()` classmethod works with strings internally, which is a little faster than generating `Path` objects and keeping them normalized. The `pathlib.Path.walk()` method converts the strings back to path objects. In the private pathlib ABCs, our existing subclass of `_Globber` ensures that `PathBase` instances are used throughout. Follow-up to #117589.
* GH-117586: Speed up `pathlib.Path.glob()` by working with strings (#117589)Barney Gale2024-04-104-195/+269
| | | | | | | | | | | | Move pathlib globbing implementation into a new private class: `glob._Globber`. This class implements fast string-based globbing. It's called by `pathlib.Path.glob()`, which then converts strings back to path objects. In the private pathlib ABCs, add a `pathlib._abc.Globber` subclass that works with `PathBase` objects rather than strings, and calls user-defined path methods like `PathBase.stat()` rather than `os.stat()`. This sets the stage for two more improvements: - GH-115060: Query non-wildcard segments with `lstat()` - GH-116380: Unify `pathlib` and `glob` implementations of globbing. No change to the implementations of `glob.glob()` and `glob.iglob()`.