summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-101819: Port _io.PyBytesIOBuffer_Type to heap type (#104264)Erlend E. Aasland2023-05-074-51/+29
|
* gh-100370: fix OverflowError in sqlite3.Connection.blobopen for 32-bit ↵Erlend E. Aasland2023-05-074-9/+36
| | | | builds (#103902)
* gh-101819: Adapt _io.PyWindowsConsoleIO_Type to heap type (#104197)Erlend E. Aasland2023-05-074-70/+51
|
* gh-101819: Port _io.PyIncrementalNewlineDecoder_Type to heap type (#104249)Erlend E. Aasland2023-05-074-48/+42
|
* Re-enable commented-out test in test_generators.py (#104130)ymki43602023-05-071-5/+4
|
* gh-104018: remove unused format "z" handling in string formatfloat() (#104107)John Belmonte2023-05-074-8/+0
| | | This is a cleanup overlooked in PR #104033.
* gh-97696: Use `PyObject_CallMethodNoArgs` and inline is_loop_running check ↵Itamar Ostricher2023-05-071-18/+5
| | | | in `_asyncio` (#104255)
* gh-103886: Improve `builtins.__doc__` (#104179)Tomas R2023-05-061-2/+9
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-104254: Document the optional keyword-only "context" argument to Task ↵Itamar Ostricher2023-05-061-4/+8
| | | | | constructor (#104251) (This was added in 3.11. It was already documented for `create_task()`, but not for `Task()`.)
* gh-101640: Make argparse _print_message catch any write error (#101802)Oleg Iarygin2023-05-063-3/+37
| | | | | | * In particular, don't exit when trying to print to stderr = None. * Add tests Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-99113: Make Sure the GIL is Acquired at the Right Places (gh-104208)Eric Snow2023-05-064-40/+113
| | | This is a pre-requisite for a per-interpreter GIL. Without it this change isn't strictly necessary. However, there is no real downside otherwise.
* gh-99113: Add a check for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104206)Eric Snow2023-05-065-2/+99
| | | Py_MOD_PER_INTERPRETER_GIL_SUPPORTED is a new supported value for Py_mod_multiple_interpreters, added in gh-104205.
* gh-101819: Remove unused 'locale_module' from _io state (#104246)Erlend E. Aasland2023-05-062-5/+0
| | | | The locale module reference was introduced by 932ff8368 in 2013, and rendered unused by 710e82630 (gh-23050) in 2020.
* GH-103548: Improve performance of `pathlib.Path.[is_]absolute()` (GH-103549)Barney Gale2023-05-062-1/+14
| | | | Improve performance of `pathlib.Path.absolute()` and `cwd()` by joining paths only when necessary. Also improve performance of `PurePath.is_absolute()` on Posix by skipping path parsing and normalization.
* gh-90953: Emit deprecation warnings for `ast` features deprecated in Python ↵Alex Waygood2023-05-064-135/+472
| | | | | | | 3.8 (#104199) `ast.Num`, `ast.Str`, `ast.Bytes`, `ast.Ellipsis` and `ast.NameConstant` now all emit deprecation warnings on import, access, instantation or `isinstance()` checks. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-104144: Optimize gather to finish eagerly when all futures complete ↵Itamar Ostricher2023-05-062-1/+15
| | | | eagerly (#104138)
* Rewrite the turtledemo makeGraphFrame method (#104224)Terry Jan Reedy2023-05-061-10/+14
| | | | | | | Replace `self._canvas` and `self.scanvas`, both bound to `canvas`, with `self.canvas, which is accessed in other methods. Replace `_s_` with `screen` and `_s_._canvas` with `canvas`. Add a comment explaining the unorthodox use of function turtle.Screen and singleton class turtle._Screen.
* gh-65772: Clean-up turtle module (#104218)Terry Jan Reedy2023-05-062-40/+22
| | | | | | | | | | | | | | | | | | | | | | | * Remove the unused, private, and undocumented name `_ver` and the commented-out `print` call. * Don't add math functions to `__all__`. Beginners should learn to `import math` to access them. * Gregor Lindel, who wrote this version of turtle, dropped plans to implement turtle on another toolkit at least a decade ago. Drop `_dot` code preparing for this, but add a hint comment. * `_Screen` is meant to be a singleton class. To enforce that, it needs either a `__new__` that returns the singleton or `else...raise` in `__iter__`. Merely removing the `if` clauses as suggested might break something if a user were to call `_Screen` directly. Leave the code alone until a problem is evident. * Turtledemo injects into _Screen both _root and _canvas, configured as it needs them to be. Making _canvas an `__init__` option would require skipping some but not all of the lines under 'if _Screen._canvas is None:`. Leave working code alone.
* gh-104233: Fix "unused variable" warning in `ceval_gil.c` (#104234)Nikita Sobolev2023-05-061-0/+2
|
* GH-97950: Use new-style index directive ('builtin') (#104164)Adam Turner2023-05-0623-77/+77
| | | | | | | | | | | | | * Uncomment builtin removal in pairindextypes * Use new-style index directive ('builtin') - C API * Use new-style index directive ('builtin') - Extending * Use new-style index directive ('builtin') - Library * Use new-style index directive ('builtin') - Reference * Use new-style index directive ('builtin') - Tutorial
* gh-102215: importlib documentation cleanupsSam Morris2023-05-062-10/+10
|
* gh-101819: Prepare to modernize the _io extension (#104178)Victor Stinner2023-05-069-37/+92
| | | | | | | | | | | | | | | | | | | | | * Add references to static types to _PyIO_State: * PyBufferedIOBase_Type * PyBytesIOBuffer_Type * PyIncrementalNewlineDecoder_Type * PyRawIOBase_Type * PyTextIOBase_Type * Add the defining class to methods: * _io.BytesIO.getbuffer() * _io.FileIO.close() * Add get_io_state_by_cls() function. * Add state parameter to _textiowrapper_decode() * _io_TextIOWrapper___init__() now sets self->state before calling _textiowrapper_set_decoder(). Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-97696: Remove redundant #include (#104216)Jacob Bower2023-05-051-1/+0
| | | | | Remove "#include cpython/context.h"` from `_asynciomodule.c`. It's already included in `Python.h`.
* gh-104144: Skip scheduling a done callback if a TaskGroup task completes ↵Itamar Ostricher2023-05-052-2/+9
| | | | | eagerly (#104140) Co-authored-by: Carl Meyer <carl@oddbird.net>
* gh-99113: Add PyInterpreterConfig.own_gil (gh-104204)Eric Snow2023-05-0511-19/+80
| | | | | We also add PyInterpreterState.ceval.own_gil to record if the interpreter actually has its own GIL. Note that for now we don't actually respect own_gil; all interpreters still share the one GIL. However, PyInterpreterState.ceval.own_gil does reflect PyInterpreterConfig.own_gil. That lie is a temporary one that we will fix when the GIL really becomes per-interpreter.
* gh-104146: Remove unused var 'parser_body_declarations' from clinic.py (#104214)Erlend E. Aasland2023-05-051-3/+1
|
* gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)Eric Snow2023-05-0599-4/+144
| | | Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
* gh-104108: Add the Py_mod_multiple_interpreters Module Def Slot (gh-104148)Eric Snow2023-05-055-22/+122
| | | I'll be adding a value to indicate support for per-interpreter GIL in gh-99114.
* gh-99113: Share the GIL via PyInterpreterState.ceval.gil (gh-104203)Eric Snow2023-05-055-40/+65
| | | In preparation for a per-interpreter GIL, we add PyInterpreterState.ceval.gil, set it to the shared GIL for each interpreter, and use that rather than using _PyRuntime.ceval.gil directly. Note that _PyRuntime.ceval.gil is still the actual GIL.
* GH-100479: Add `pathlib.PurePath.with_segments()` (GH-103975)Barney Gale2023-05-055-47/+108
| | | | | Add `pathlib.PurePath.with_segments()`, which creates a path object from arguments. This method is called whenever a derivative path is created, such as from `pathlib.PurePath.parent`. Subclasses may override this method to share information between path objects. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-69152: Add _proxy_response_headers attribute to HTTPConnection (#26152)Alexey Namyotkin2023-05-053-11/+24
| | | | | | | Add _proxy_response_headers attribute to HTTPConnection (#26152) --------- Co-authored-by: Senthil Kumaran <senthil@python.org>
* gh-103533: Use PEP 669 APIs for cprofile (GH-103534)Tian Gao2023-05-054-73/+200
|
* GH-96803: Add three C-API functions to make _PyInterpreterFrame less opaque ↵Mark Shannon2023-05-059-8/+48
| | | | for users of PEP 523. (GH-96849)
* gh-64595: Argument Clinic: Touch source file if any output file changed ↵Erlend E. Aasland2023-05-052-9/+17
| | | | (#104152)
* gh-64631: Test exception messages in cloned Argument Clinic funcs (#104167)Erlend E. Aasland2023-05-053-1/+353
|
* gh-68395: Avoid naming conflicts by mangling variable names in Argument ↵Erlend E. Aasland2023-05-052-1/+181
| | | | | Clinic (#104065) Add all internally used variable names to CLINIC_PREFIXED_ARGS.
* gh-64658: Expand Argument Clinic return converter docs (#104175)Erlend E. Aasland2023-05-051-13/+28
|
* GH-103092: port `_asyncio` freelist to module state (#104196)Kumar Aditya2023-05-051-27/+25
|
* gh-104051: fix crash in test_xxtestfuzz with -We (#104052)Irit Katriel2023-05-051-3/+10
|
* gh-104190: fix ubsan crash (#104191)sunmy20192023-05-051-1/+1
|
* gh-104106: Add gcc fallback of mkfifoat/mknodat for macOS (gh-104129)Dong-hee Na2023-05-052-4/+13
|
* GH-104142: Fix _Py_RefcntAdd to respect immortality (GH-104143)Brandt Bucher2023-05-043-18/+30
|
* gh-104112: link from cached_property docs to method-caching FAQ (#104113)Carl Meyer2023-05-041-12/+4
| | | Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-68968: Correcting message display issue with assertEqual (#103937)Michael Blahay2023-05-044-11/+87
|
* GH-103899: Provide a hint when accidentally calling a module (GH-103900)Brandt Bucher2023-05-043-6/+73
|
* gh-103963: fix 'make regen-opcode' in out-of-tree builds (#104177)Carl Meyer2023-05-043-3/+5
|
* gh-102500: Add PEP 688 and 698 to the 3.12 release highlights (#104174)Hugo van Kemenade2023-05-041-2/+6
|
* GH-81079: Add case_sensitive argument to `pathlib.Path.glob()` (GH-102710)Barney Gale2023-05-044-17/+51
| | | | | | This argument allows case-sensitive matching to be enabled on Windows, and case-insensitive matching to be enabled on Posix. Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* gh-91896: Deprecate collections.abc.ByteString (#102096)Shantanu2023-05-046-8/+49
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-99593: Add tests for Unicode C API (part 2) (#99868)Serhiy Storchaka2023-05-043-60/+944
| | | | | Add tests for lower-level functions. Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>