summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-99069: Consolidate checks for static_assert (#94766)Joshua Root2023-04-052-13/+17
| | | | | | | | | | | | | | | | | | | | Several platforms don't define the static_assert macro despite having compiler support for the _Static_assert keyword. The macro needs to be defined since it is used unconditionally in the Python code. So it should always be safe to define it if undefined and not in C++11 (or later) mode. Hence, remove the checks for particular platforms or libc versions, and just define static_assert anytime it needs to be defined but isn't. That way, all platforms that need the fix will get it, regardless of whether someone specifically thought of them. Also document that certain macOS versions are among the platforms that need this. The C2x draft (currently expected to become C23) makes static_assert a keyword to match C++. So only define the macro for up to C17. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-102899: Fix doc link for getting filesystem error handler (#102901)Olivier Gayot2023-04-051-1/+1
|
* gh-89058: remove skip from test_no_hang_on_context_chain_cycle2 (#102903)Irit Katriel2023-04-051-1/+0
|
* gh-86094: Add support for Unicode Path Extra Field in ZipFile (gh-102566)Yeojin Kim2023-04-054-13/+67
|
* gh-100408: Fix a traceback in multiprocessing example (#100409)Serhiy Storchaka2023-04-051-4/+4
|
* gh-74690: typing: Call `_get_protocol_attrs` and `_callable_members_only` at ↵Alex Waygood2023-04-051-11/+14
| | | | protocol class creation time, not during `isinstance()` checks (#103160)
* gh-81762: Clarify and simplify description of print's flush param (#103264)C.A.M. Gerlach2023-04-051-2/+3
|
* gh-74690: typing: Simplify and optimise `_ProtocolMeta.__instancecheck__` ↵Alex Waygood2023-04-051-11/+3
| | | | (#103159)
* gh-103193: Micro-optimise helper functions for `inspect.getattr_static` ↵Alex Waygood2023-04-052-4/+5
| | | | (#103195)
* gh-103167: Fix `-Wstrict-prototypes` warnings by using `(void)` for ↵Nikita Sobolev2023-04-057-16/+16
| | | | functions with no args (GH-103168)
* gh-66897: Upgrade HTTP CONNECT to protocol HTTP/1.1 (#8305)Michael Handler2023-04-055-21/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-22708: Upgrade HTTP CONNECT to protocol HTTP/1.1 (GH-NNNN) Use protocol HTTP/1.1 when sending HTTP CONNECT tunnelling requests; generate Host: headers if one is not already provided (required by HTTP/1.1), convert IDN domains to punycode in HTTP CONNECT requests. * Refactor tests to pass under -bb (fix ByteWarnings); missed some lines >80. * Use consistent 'tunnelling' spelling in Lib/http/client.py * Lib/test/test_httplib: Remove remnant of obsoleted test. * Use dict.copy() not copy.copy() * fix version changed * Update Lib/http/client.py Co-authored-by: bgehman <bgehman@users.noreply.github.com> * Switch to for/else: syntax, as suggested * Don't use for: else: * Sure, fine, w/e * Oops * 1nm to the left --------- Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: bgehman <bgehman@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-101525: Disable peephole optimization process of BOLT (gh-103187)Dong-hee Na2023-04-052-2/+2
| | | Co-authored-by: Dong-hee Na <donghee.na@linecorp.com>
* gh-102660: Fix is_core_module() (gh-103257)Eric Snow2023-04-041-1/+13
| | | | | In gh-102744 we added is_core_module() (in Python/import.c), which relies on get_core_module_dict() (also added in that PR). The problem is that_PyImport_FixupBuiltin(), which ultimately calls is_core_module(), is called on the builtins module before interp->builtins_copyis set. Consequently, the builtins module isn't considered a "core" module while it is getting "fixed up" and its module def m_copy erroneously gets set. Under isolated interpreters this causes problems since sys and builtins are allowed even though they are still single-phase init modules. (This was discovered while working on gh-101660.) The solution is to stop relying on get_core_module_dict() in is_core_module().
* Improve some grammar in the socket docs (#103254)Tim Burke2023-04-041-4/+4
|
* GH-75586: Make shutil.which() on Windows more consistent with the OS (GH-103179)Charles Machalow2023-04-047-54/+233
|
* gh-103207: Add instructions to the macOS installer welcome display on how to ↵Ned Deily2023-04-042-5/+36
| | | | workaround the macOS 13 Ventura “The installer encountered an error” failure. (GH-103251)
* 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/