summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'main' of https://github.com/python/cpython into mainThomas Wouters2023-04-043-0/+42
|\
| * bpo-44844: Enable detection of Microsoft Edge browser in webbrowser module ↵Steve Dower2023-04-043-0/+42
| | | | | | | | (GH-29908)
* | Post 3.12.0a7Thomas Wouters2023-04-041-1/+1
| |
* | Python 3.12.0a7v3.12.0a7Thomas Wouters2023-04-0476-224/+822
|/
* Fix a compiler warning in _xxsubinterpretermodule.c (#103245)T. Wouters2023-04-041-1/+1
| | | | | | | Fix a (correct) warning about potential uses of uninitialized memory in _xxsubinterpreter. Unlike newly allocated PyObject structs or global structs, stack-allocated structs are not initialised, and a few places in the code expect the _sharedexception struct data to be either NULL or initialised.
* gh-103092: Isolate `_pickle` module (#102982)Erlend E. Aasland2023-04-045-669/+703
| | | | Co-authored-by: Mohamed Koubaa <koubaa.m@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-103056: [Enum] use staticmethod decorator for _gnv_ (GH-103231)Ethan Furman2023-04-042-0/+4
| | | _gnv_ --> _generate_next_value_
* Specify more settings for the C extension of VS Code for dev containers ↵Brett Cannon2023-04-031-0/+6
| | | | | (GH-103229) Should help with auto-complete.
* gh-100062: Remove error code tables from _ssl and err_names_to_codes (GH-100063)David Benjamin2023-04-032-15/+0
| | | | | | | | | | Prior to https://github.com/python/cpython/pull/25300, the make_ssl_data.py script used various tables, exposed in _ssl, to update the error list. After that PR, this is no longer used. Moreover, the err_names_to_codes map isn't used at all. Clean those up. This gets them out of the way if, in the future, OpenSSL provides an API to do what the code here is doing directly. (https://github.com/openssl/openssl/issues/19848)
* gh-98298, gh-74730: [Enum] update docs (GH-103163)Ethan Furman2023-04-033-30/+34
| | | | fix FlagBoundary statements add warning about reloading modules and enum identity
* gh-103215: Remove redundant if stmt from `enum.EnumType._find_data_type_` ↵Sadra Barikbin2023-04-031-2/+0
| | | | (GH-103222)
* gh-101100: Use list of 'dirty' docs, with warnings, instead of a clean list ↵Hugo van Kemenade2023-04-033-371/+332
| | | | | | (#103191) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-76846, GH-85281: Call `__new__()` and `__init__()` on pathlib subclasses ↵Barney Gale2023-04-033-68/+107
| | | | | | | | | (GH-102789) Fix an issue where `__new__()` and `__init__()` were not called on subclasses of `pathlib.PurePath` and `Path` in some circumstances. Paths are now normalized on-demand. This speeds up path construction, `p.joinpath(q)`, and `p / q`. Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* gh-101865: Deprecate `co_lnotab` from code objects as per PEP 626 (#101866)Nikita Sobolev2023-04-035-1/+22
| | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* GH-103182: use vectorcall in `_asyncio` instead of variadic calling APIs ↵Kumar Aditya2023-04-031-22/+17
| | | | (#103175)
* gh-102038: Skip a sometimes unnecessary stat in site.py (#102039)Shantanu2023-04-022-9/+13
|
* gh-102994: Profile docs has typo in example (#103074)Nouran Ali2023-04-021-1/+1
|
* gh-103109: Document ignore_warnings() test support helper (#103110)Charlie Zhao2023-04-022-1/+16
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* bpo-4080: unittest durations (#12271)Giampaolo Rodola2023-04-0212-34/+227
|
* fix typo in _ssl.c (GH-103192)Ikko Eltociear Ashimine2023-04-021-1/+1
| | | | | seperated -> separated Automerge-Triggered-By: GH:AlexWaygood
* gh-102433: Use `inspect.getattr_static` in ↵Alex Waygood2023-04-025-7/+142
| | | | `typing._ProtocolMeta.__instancecheck__` (#103034)
* GH-102456: Fix docstring and getopt options for base64 (gh-102457)Partha P. Mukherjee2023-04-021-2/+2
|
* gh-102192: deprecate _PyErr_ChainExceptions (#102935)Irit Katriel2023-04-013-1/+9
|
* gh-102192: use PyErr_SetHandledException instead of the legacy ↵Irit Katriel2023-04-012-2/+2
| | | | PyErr_SetExcInfo (#103157)
* Add missing variables to `bytecodes.c` (GH-103153)Brett Cannon2023-03-312-224/+270
| | | The code works without this change, but it does cause C tooling to complain less about undeclared variables.
* gh-74690: Micro-optimise `typing._get_protocol_attrs` (#103152)Alex Waygood2023-03-311-8/+12
| | | Improve performance of `isinstance()` checks against runtime-checkable protocols
* gh-102549: [Enum] fail enum creation when data type raises in __init__ ↵Ethan Furman2023-03-313-14/+32
| | | | (GH-103149)
* gh-101659: Clean Up the General Import Tests for Subinterpreters (gh-103151)Eric Snow2023-03-311-44/+106
| | | | | This involves 3 changes: some general cleanup, checks to match the kind of module, and switch from testing against sys to _imp. This is a precursor to gh-103150, though the changes are meant to stand on their own.
* gh-100227: Fix Cleanup of the Extensions Cache (gh-103150)Eric Snow2023-03-311-1/+1
| | | | | Decref the key in the right interpreter in _extensions_cache_set(). This is a follow-up to gh-103084. I found the bug while working on gh-101660.
* gh-74690: typing: Don't unnecessarily call `_get_protocol_attrs` twice in ↵Alex Waygood2023-03-311-10/+21
| | | | | `_ProtocolMeta.__instancecheck__` (#103141) Speed up `isinstance()` calls against runtime-checkable protocols
* gh-87092: move CFG related code from compile.c to flowgraph.c (#103021)Irit Katriel2023-03-3114-2399/+2484
|
* gh-102871: Remove obsolete browsers from webbrowser (#102872)James De Bias2023-03-315-117/+29
|
* GH-84783: Mention Author for GH-101264 (make slices hashable) (#103146)Furkan Onder2023-03-312-2/+2
| | | | | | Will Bradshaw contributed original patch on bpo-40603. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Quote literal tokens in standard format specifier grammar (GH-102902)Petr Viktorin2023-03-311-1/+1
| | | Reported by Damian Dureck: https://mail.python.org/archives/list/docs@python.org/thread/UZTWBJIXC3MBKTHXVTIBPGDPKBNWZ5LN/
* gh-101100: Expand list of clean docs (GH-103135)Hugo van Kemenade2023-03-312-0/+357
| | | | | | | | | | | Follow on from https://github.com/python/cpython/pull/103116. Expand list of clean docs files from 3 to 181. These files have no Sphinx warnings, and their presence in this list means that any new warnings introduced will fail the build. The list was created by subtracting the list of files with warnings from a list of all files. I tested with all of those, but found that `touch`ing two clean files (https://github.com/python/cpython/blob/main/Doc/includes/wasm-notavail.rst and https://github.com/python/cpython/blob/main/Doc/whatsnew/changelog.rst) caused a cascade effect and resulted in a number of dirty files being rebuilt too, and failing the build. So those two have been omitted. Automerge-Triggered-By: GH:hugovk
* gh-102799: use exception instance instead of sys.exc_info() (#102885)Irit Katriel2023-03-317-17/+16
|
* Minor docs improvements fix for `codeop` (#103123)gaogaotiantian2023-03-301-7/+7
|
* gh-102110: Add all tools description missed (GH-102625)Missoupro2023-03-302-3/+32
| | | | | Added missing descriptions of some tools. Automerge-Triggered-By: GH:hugovk
* Add IPv6 into to the docstring for socket.getsockname (#102961)Brian Haley2023-03-301-1/+2
| | | Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
* gh-101100: Fix Sphinx warning in gc.rst and refactor docs clean list (#103116)Hugo van Kemenade2023-03-304-3/+32
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-103085: Fix python locale.getencoding not to emit deprecation warning ↵Jeong, YunWon2023-03-302-1/+4
| | | | (gh-103086)
* gh-103099: Link mypy docs from typing.rst (#103100)Shantanu2023-03-301-1/+8
|
* gh-100227: Make the Global PyModuleDef Cache Safe for Isolated Interpreters ↵Eric Snow2023-03-295-59/+274
| | | | | | | | | | | | | | | | | | | | | | | (gh-103084) Sharing mutable (or non-immortal) objects between interpreters is generally not safe. We can work around that but not easily. There are two restrictions that are critical for objects that break interpreter isolation. The first is that the object's state be guarded by a global lock. For now the GIL meets this requirement, but a granular global lock is needed once we have a per-interpreter GIL. The second restriction is that the object (and, for a container, its items) be deallocated/resized only when the interpreter in which it was allocated is the current one. This is because every interpreter has (or will have, see gh-101660) its own object allocator. Deallocating an object with a different allocator can cause crashes. The dict for the cache of module defs is completely internal, which simplifies what we have to do to meet those requirements. To do so, we do the following: * add a mechanism for re-using a temporary thread state tied to the main interpreter in an arbitrary thread * add _PyRuntime.imports.extensions.main_tstate` * add _PyThreadState_InitDetached() and _PyThreadState_ClearDetached() (pystate.c) * add _PyThreadState_BindDetached() and _PyThreadState_UnbindDetached() (pystate.c) * make sure the cache dict (_PyRuntime.imports.extensions.dict) and its items are all owned by the main interpreter) * add a placeholder using for a granular global lock Note that the cache is only used for legacy extension modules and not for multi-phase init modules. https://github.com/python/cpython/issues/100227
* GH-89987: Shrink the BINARY_SUBSCR caches (GH-103022)Brandt Bucher2023-03-2914-250/+272
|
* gh-90110: Bring the whitelists up to date. (gh-103114)Eric Snow2023-03-292-2/+3
| | | https://github.com/python/cpython/issues/90110
* GH-102973: add a dev container (GH-102975)Brett Cannon2023-03-294-0/+102
| | | | | | On content update, builds `python` and the docs. Also adds a Dockerfile that should include everything but autoconf 2.69 that's necessary to build CPython and the entire stdlib on Fedora. Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Dusty Phillips <dusty@phillips.codes>
* gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output ↵Bernhard Wagner2023-03-292-0/+2
| | | | | | | (#103113) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Éric <merwok@netwok.org>
* gh-103068: Check condition expression of breakpoints for pdb (#103069)gaogaotiantian2023-03-293-13/+45
| | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Artem Mukhin <ortem00@gmail.com>
* gh-102582: Fix invalid JSON in Doc/howto/logging-cookbook.rst (GH-102635)Matěj Cepl2023-03-291-10/+14
|
* gh-103054: typing: Improve `Callable` type substitution tests (#103055)Nikita Sobolev2023-03-291-0/+42
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>