summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* GH-87695: Fix OSError from `pathlib.Path.glob()` (GH-104292)Barney Gale2023-05-103-2/+13
| | | | Fix issue where `pathlib.Path.glob()` raised `OSError` when it encountered a symlink to an overly long path.
* gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202)Sebastian Berg2023-05-1012-198/+44
| | | | | | | | | | This PR removes `_Py_dg_stdnan` and `_Py_dg_infinity` in favour of using the standard `NAN` and `INFINITY` macros provided by C99. This change has the side-effect of fixing a bug on MIPS where the hard-coded value used by `_Py_dg_stdnan` gave a signalling NaN rather than a quiet NaN. --------- Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* gh-104010: Separate and improve docs for `typing.get_origin` and ↵chgnrdv2023-05-101-9/+22
| | | | | | | | | `typing.get_args` (#104013) * separate documentation and examples for both functions * add examples demonstrating behaviour with unsupported types * document return value of `get_origin` for `ParamSpecArgs` and `ParamSpecKwargs` instances Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-101819: Adapt _io._BufferedIOBase_Type methods to Argument Clinic (#104355)Erlend E. Aasland2023-05-102-44/+236
| | | | Make sure the defining class is passed to all methods, so we can easily fetch module state from them in the future.
* gh-103960: Dark mode: invert image brightness (#103983)Hugo van Kemenade2023-05-103-0/+3
|
* gh-104252: Immortalize Py_EMPTY_KEYS (gh-104253)Eric Snow2023-05-103-14/+27
| | | This was missed in gh-19474. It matters for with a per-interpreter GIL since PyDictKeysObject.dk_refcnt breaks isolation and leads to races.
* gh-101819: Clean up _io windows console io after gh-104197 (#104354)Erlend E. Aasland2023-05-103-3/+3
|
* gh-101819: Harden _io init (#104352)Erlend E. Aasland2023-05-101-3/+4
| | | Fix potential refleak if PyModule_AddObject() fails.
* gh-103247: clear the module cache in a test in ↵sunmy20192023-05-101-9/+10
| | | | test_importlib/extensions/test_loader.py (GH-104226)
* gh-103848: Adds checks to ensure that bracketed hosts found by urlsplit are ↵JohnJamesUtley2023-05-103-1/+43
| | | | | | | | | of IPv6 or IPvFuture format (#103849) * Adds checks to ensure that bracketed hosts found by urlsplit are of IPv6 or IPvFuture format --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-74895: adjust tests to work on Solaris (#104326)Jakub Kulík2023-05-091-6/+6
| | | Solaris is unusual here, but apparently everyone is happy when SOCK_STREAM is explicitly specified.
* gh-101819: Refactor _io in preparation for module isolation (#104334)Erlend E. Aasland2023-05-093-42/+80
| | | | | | | | | | - Replace query with parameter in bufferediobase_unsupported() - Replace query with parameter in iobase_unsupported() - Hide delegate: Add method wrapper for _PyIOBase_check_seekable - Hide delegate: Add method wraper for _PyIOBase_check_readable - Hide delegate: Add method wraper for _PyIOBase_check_writable - Replace query with parameter in _PyIOBase_check_seekable() - Replace query with parameter in _PyIOBase_check_readable() - Replace query with parameter in _PyIOBase_check_writable()
* gh-90953: Don't use deprecated AST nodes in clinic.py (#104322)Alex Waygood2023-05-091-9/+3
|
* gh-102327: Extend docs for "url" and "headers" parameters to ↵David Foster2023-05-091-2/+18
| | | | | | | | | | | HTTPConnection.request() Added example on how to use the HTTPConnection object for making GET request. Original issue: https://github.com/python/cpython/issues/102327 --------- Co-authored-by: Éric <earaujo@caravan.coop>
* gh-104328: Fix typo in ``typing.Generic`` multiple inheritance error message ↵Kirill Podoprigora2023-05-091-1/+1
| | | | (#104335)
* gh-97696 Add documentation for get_coro() behavior with eager tasks (#104304)Jacob Bower2023-05-091-0/+11
|
* gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)Carl Meyer2023-05-0927-695/+1243
| | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-99889: Fix directory traversal security flaw in uu.decode() (#104096)Sam Carroll2023-05-093-1/+38
| | | | | | | | | * Fix directory traversal security flaw in uu.decode() * also check absolute paths and os.altsep * Add a regression test. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
* gh-104184: fix building --with-pydebug --enable-pystats (#104217)Carl Meyer2023-05-091-1/+1
|
* gh-104139: Add itms-services to uses_netloc urllib.parse. (#104312)Gregory P. Smith2023-05-093-15/+23
| | | | Teach unsplit to retain the `"//"` when assembling `itms-services://?action=generate-bugs` style [Apple Platform Deployment](https://support.apple.com/en-gb/guide/deployment/depce7cefc4d/web) URLs.
* gh-104240: return code unit metadata from codegen (#104300)Irit Katriel2023-05-094-6/+50
|
* gh-104276: Make `_struct.unpack_iterator` type use type flag instead of ↵chgnrdv2023-05-091-7/+1
| | | | custom constructor (#104277)
* gh-97696: Move around and update the whatsnew entry for asyncio eager task ↵Itamar Ostricher2023-05-091-5/+5
| | | | factory (#104298)
* gh-103193: Fix refleaks in `test_inspect` and `test_typing` (#104320)Alex Waygood2023-05-091-0/+7
|
* require-pr-label.yml: Add missing "permissions:" (#104309)Sebastian Pipping2023-05-091-0/+4
|
* gh-90656: Add platform triplets for 64-bit LoongArch (LA64) (#30939)Zhang Na2023-05-094-0/+43
| | | | Signed-off-by: Zhang Na <zhangna@loongson.cn> Co-authored-by: WANG Xuerui <git@xen0n.name>
* gh-104180: Read SOCKS proxies from macOS System Configuration (#104181)samschott2023-05-092-0/+7
| | | | | | | | read SOCKS proxies from macOS System Configuration in ``urllib.request``. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-97696 Remove unnecessary check for eager_start kwarg (#104188)Jacob Bower2023-05-091-4/+17
| | | | Instead, add docstring to create_eager_task_factory.
* GH-104308: socket.getnameinfo should release the GIL (#104307)Nathaniel J. Smith2023-05-082-0/+3
| | | | | | | | | * socket.getnameinfo should release the GIL * 📜🤖 Added by blurb_it. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-104310: Add importlib.util.allowing_all_extensions() (gh-104311)Eric Snow2023-05-084-0/+163
| | | (I'll be adding docs for this separately.)
* gh-99113: A Per-Interpreter GIL! (gh-104210)Eric Snow2023-05-087-52/+24
| | | | | This is the culmination of PEP 684 (and of my 8-year long multi-core Python project)! Each subinterpreter may now be created with its own GIL (via Py_NewInterpreterFromConfig()). If not so configured then the interpreter will share with the main interpreter--the status quo since subinterpreters were added decades ago. The main interpreter always has its own GIL and subinterpreters from Py_NewInterpreter() will always share with the main interpreter.
* GH-104284: Fix documentation gettext build (#104296)Adam Turner2023-05-081-10/+10
|
* gh-89550: Buffer GzipFile.write to reduce execution time by ~15% (#101251)Arjun2023-05-082-5/+37
| | | | | | | | Use `io.BufferedWriter` to buffer gzip writes. --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-104223: Fix issues with inheriting from buffer classes (#104227)Jelle Zijlstra2023-05-086-13/+334
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-99108: fix typo in Modules/Setup (#104293)Jonathan Protzenko2023-05-081-1/+1
| | | case sensitive filename
* GH-104145: Use fully-qualified cross reference types for the bisect module ↵Adam Turner2023-05-081-10/+12
| | | | (#104172)
* gh-103193: Improve `getattr_static` test coverage (#104286)Alex Waygood2023-05-081-0/+29
|
* Trim trailing whitespace and test on CI (#104275)Hugo van Kemenade2023-05-0813-12/+44
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-102500: Remove mention of bytes shorthand (#104281)Shantanu2023-05-081-6/+3
| | | | | | | The bytes shorthand was removed in PEP 688: https://peps.python.org/pep-0688/#no-special-meaning-for-bytes I also remove the reference to `collections.abc.ByteString`, since that object is deprecated (#91896) and has different semantics (#102092)
* gh-97696: Improve and fix documentation for asyncio eager tasks (#104256)Itamar Ostricher2023-05-082-2/+20
|
* gh-99108: Replace SHA3 implementation HACL* version (#103597)Jonathan Protzenko2023-05-0721-434/+1204
| | | | | | | | | | | Replaces our built-in SHA3 implementation with a verified one from the HACL* project. This implementation is used when OpenSSL does not provide SHA3 or is not present. 3.11 shiped with a very slow tiny sha3 implementation to get off of the <=3.10 reference implementation that wound up having serious bugs. This brings us back to a reasonably performing built-in implementation consistent with what we've just replaced our other guaranteed available standard hash algorithms with: code from the HACL* project. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-104273: Remove redundant len() calls in argparse function (#104274)Burak Saler2023-05-071-3/+4
|
* gh-64660: Don't hardcode Argument Clinic return converter result variable ↵Erlend E. Aasland2023-05-071-9/+14
| | | | name (#104200)
* gh-104265 Disallow instantiation of `_csv.Reader` and `_csv.Writer` (#104266)chgnrdv2023-05-073-3/+14
|
* GH-102613: Improve performance of `pathlib.Path.rglob()` (GH-104244)Barney Gale2023-05-073-18/+45
| | | | | | | | | | Stop de-duplicating results in `_RecursiveWildcardSelector`. A new `_DoubleRecursiveWildcardSelector` class is introduced which performs de-duplication, but this is used _only_ for patterns with multiple non-adjacent `**` segments, such as `path.glob('**/foo/**')`. By avoiding the use of a set, `PurePath.__hash__()` is not called, and so paths do not need to be stringified and case-normalised. Also merge adjacent '**' segments in patterns.
* gh-103650: Fix perf maps address format (#103651)Arthur Pastel2023-05-073-4/+11
|
* GH-89812: Churn `pathlib.Path` methods (GH-104243)Barney Gale2023-05-071-303/+303
| | | | | | | | | | | | | | | Re-arrange `pathlib.Path` methods in source code. No other changes. The methods are arranged as follows: 1. `stat()` and dependants (`exists()`, `is_dir()`, etc) 2. `open()` and dependants (`read_text()`, `write_bytes()`, etc) 3. `iterdir()` and dependants (`glob()`, `walk()`, etc) 4. All other `Path` methods This patch prepares the ground for a new `_AbstractPath` class, which will support the methods in groups 1, 2 and 3 above. By churning the methods here, subsequent patches will be easier to review and less likely to break things.
* gh-104240: make _PyCompile_CodeGen support different compilation modes (#104241)Irit Katriel2023-05-079-15/+43
|
* gh-103193: cache calls to `inspect._shadowed_dict` in ↵Alex Waygood2023-05-073-5/+32
| | | | | `inspect.getattr_static` (#104267) Co-authored-by: Carl Meyer <carl@oddbird.net>
* GH-100479: Fix pathlib test failure on WASI (#104215)Barney Gale2023-05-071-1/+2
|