summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-78157: [Enum] nested classes will not be members in 3.13 (GH-92366)Ethan Furman2022-05-065-4/+219
| | | | | | | - add member() and nonmember() functions - add deprecation warning for internal classes in enums not becoming members in 3.13 Co-authored-by: edwardcwang
* gh-90622: Prevent max_tasks_per_child use with a fork mp_context. (#91587)Gregory P. Smith2022-05-064-11/+43
| | | | | Prevent `max_tasks_per_child` use with a "fork" mp_context to avoid deadlocks. Also defaults to "spawn" when no mp_context is supplied for safe convenience.
* gh-87901: Add encoding to os.popen (GH-92374)Inada Naoki2022-05-063-3/+9
|
* bpo-46907: Update macOS installer to SQLite 3.38.4. (GH-32148)Mariusz Felisiak2022-05-062-4/+4
|
* NEWS: Reorder items by section (GH-92373)Inada Naoki2022-05-066-214/+214
| | | They caused duplicated sections.
* Issues/88027: A potential double free in list_sort_impl (#92367)Tim Peters2022-05-061-1/+3
| | | merge_freemem(): set keys to NULL do it's harmless to call this again.
* gh-92112: Fix crash triggered by an evil custom `mro()` (#92113)Alexey Izbyshev2022-05-063-9/+29
|
* gh-92356: Fix regression in ctypes function call overhead (#92357)Michael Droettboom2022-05-062-0/+2
| | | | | | 38f331d introduced a delayed initialization routine to set up ctypes formattable (`_ctypes_init_fielddesc`), but inadvertently removed setting the `initialization` flag to 1 to avoid initting each time.
* update argparse's doc of append action. (#92344)Hai Shi2022-05-061-2/+4
|
* gh-88279: Deprecate PySys_SetArgvEx() (#92363)Victor Stinner2022-05-066-9/+32
| | | | | | | Deprecate the following C functions: * PySys_SetArgv() * PySys_SetArgvEx() * PySys_SetPath()
* gh-57684: Document safe path in What's New in Python 3.11 (#92362)Victor Stinner2022-05-062-0/+12
| | | | Mention also -P and PYTHONSAFEPATH in the Security Considerations page.
* gh-57684: Update tests for PYTHONSAFEPATH=1 (#92358)Victor Stinner2022-05-068-15/+33
| | | | | Fix tests failing with the PYTHONSAFEPATH=1 env var. Enhance also -P help in Python usage (python --help).
* gh-80010: Expand fromisoformat to include most of ISO-8601 (#92177)Paul Ganssle2022-05-066-178/+778
| | | This expands `fromisoformat` to cover most of the common uses of ISO 8601. We may expand the scope more in the future.
* gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542)Victor Stinner2022-05-0520-35/+174
| | | | | | | | | | | | Add the -P command line option and the PYTHONSAFEPATH environment variable to not prepend a potentially unsafe path to sys.path. * Add sys.flags.safe_path flag. * Add PyConfig.safe_path member. * Programs/_bootstrap_python.c uses config.safe_path=0. * Update subprocess._optim_args_from_interpreter_flags() to handle the -P command line option. * Modules/getpath.py sets safe_path to 1 if a "._pth" file is present.
* gh-82616: Add process_group support to subprocess.Popen (#23930)Gregory P. Smith2022-05-059-28/+73
| | | | | | | | One more thing that can help prevent people from using `preexec_fn`. Also adds conditional skips to two tests exposing ASAN flakiness on the Ubuntu 20.04 Address Sanitizer Github CI system. When that build is run on more modern systems the "problem" does not show up. It seems ASAN implementation related. Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-70363: Emscripten cannot fstat renamed spool file (GH-92354)Christian Heimes2022-05-051-0/+3
|
* gh-91996: Add an HTTPMethod StrEnum to http (GH-91997)cibofo2022-05-054-6/+80
| | | | | | | * Add HTTPMethod enum to http Create a StrEnum for the 9 common HTTP methods. Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* gh-92135: test_cppext requires subprocess (GH-92349)Christian Heimes2022-05-051-0/+1
|
* gh-64783: Don't check value of SIG_DFL and SIG_IGN (#92350)Christian Heimes2022-05-051-0/+3
|
* gh-92345: Import rlcompleter before sys.path is extended (#92346)Christian Heimes2022-05-053-3/+15
| | | | | | | | | | ``pymain_run_python()`` now imports ``readline`` and ``rlcompleter`` before sys.path is extended to include the current working directory of an interactive interpreter. Non-interactive interpreters are not affected. Also move imports of ``re`` and ``keyword`` module to top level so they are materialized early, too. The ``keyword`` module is trivial and the ``re`` is already imported via ``inspect`` -> ``linecache``.
* gh-87390: Fix starred tuple equality and pickling (GH-92337)Serhiy Storchaka2022-05-054-0/+31
|
* minor hashlib doc example cleanup. (#92340)Gregory P. Smith2022-05-051-8/+6
| | | Closes #85465
* gh-92301: subprocess: Prefer close_range() to procfs-based fd closing (#92303)Alexey Izbyshev2022-05-052-18/+72
| | | | | | | | #92301: subprocess: Prefer `close_range()` to procfs-based fd closing. `close_range()` is much faster for large number of file descriptors, e.g. 4 times faster for 1000 descriptors in a Linux 5.16-based environment. We prefer close_range() only if it's known to be async-signal-safe.
* gh-92118: Add test for traceback when exception is modified by ↵Irit Katriel2022-05-052-0/+43
| | | | (Async)ExitStack.__exit__ (GH-92339)
* bpo-41818: Add os.login_tty() for *nix. (#29658)Soumendra Ganguly2022-05-057-14/+184
| | | | | | * Add `os.login_tty(fd)` for Unix. Reviewed-by: Christian Heimes <christian@python.org> Signed-off-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* bpo-43827: Make arguments to abc.ABCMeta.__new__ pos-only (#25385)Vlad Hoi2022-05-054-1/+16
| | | To avoid conflicts with `__init__subclass__`.
* bpo-43857: Improve the AttributeError message when deleting a missing ↵Géry Ogam2022-05-054-5/+62
| | | | | attribute (#25424) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-92047: Py_GetVersion multi-digit minor version (GH-92047) (#92048)Robert Howlett2022-05-051-1/+1
|
* gh-89653: PEP 670: Convert PyCFunction macros to functions (#92302)Victor Stinner2022-05-051-24/+56
| | | | | | | | | | Convert the following macros to static inline functions: * PyCFunction_GET_CLASS() * PyCFunction_GET_FLAGS() * PyCFunction_GET_FUNCTION() * PyCFunction_GET_SELF() Limited C API version 3.11 no longer casts arguments.
* Clean-up and simplify median_grouped(). Vastly improve its docstring. (#92324)Raymond Hettinger2022-05-052-96/+54
|
* Allow translating argument error messages (#17169)DjMorgul2022-05-051-1/+1
|
* bpo-46764: Fix wrapping bound method with @classmethod (#31367)Michael J. Sullivan2022-05-053-8/+11
|
* gh-92223: Remove pre-Python 3.7 alternative in asyncio docs (#92224)Sebastian Rittau2022-05-051-16/+1
|
* gh-92118: fix traceback of exceptions propagated from inside a ↵Irit Katriel2022-05-043-0/+31
| | | | contextlib.contextmanager (GH-92202)
* GH-92239: Make sure that PEP 523 is supported, even when specializing first. ↵Mark Shannon2022-05-045-1/+74
| | | | (GH-92245)
* gh-92107: Add tests that subscription works on arbitrary named tuple types ↵Serhiy Storchaka2022-05-042-0/+26
| | | | (GH-92304)
* gh-92210: Move socket.__init__ to argument clinic (#92237)Joshua Herman2022-05-043-14/+92
| | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-89022: Improve sqlite3 exceptions related to binding params and API ↵Erlend Egeberg Aasland2022-05-045-20/+28
| | | | | | | | | | | | | misuse (#91572) * Map SQLITE_MISUSE to sqlite3.InterfaceError SQLITE_MISUSE implies misuse of the SQLite C API, which, if it happens, is _not_ a user error; it is an sqlite3 extension module error. * Raise better errors when binding parameters fail. Instead of always raising InterfaceError, guessing what went wrong, raise accurate exceptions with more accurate error messages.
* Use static inline function Py_EnterRecursiveCall() (#91988)Victor Stinner2022-05-0415-521/+524
| | | | | | | | | | | | | | | | Currently, calling Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() may use a function call or a static inline function call, depending if the internal pycore_ceval.h header file is included or not. Use a different name for the static inline function to ensure that the static inline function is always used in Python internals for best performance. Similar approach than PyThreadState_GET() (function call) and _PyThreadState_GET() (static inline function). * Rename _Py_EnterRecursiveCall() to _Py_EnterRecursiveCallTstate() * Rename _Py_LeaveRecursiveCall() to _Py_LeaveRecursiveCallTstate() * pycore_ceval.h: Rename Py_EnterRecursiveCall() to _Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() and _Py_LeaveRecursiveCall()
* gh-92036: Fix gc_fini_untrack() (#92037)Victor Stinner2022-05-042-0/+11
| | | | | | | | Fix a crash in subinterpreters related to the garbage collector. When a subinterpreter is deleted, untrack all objects tracked by its GC. To prevent a crash in deallocator functions expecting objects to be tracked by the GC, leak a strong reference to these objects on purpose, so they are never deleted and their deallocator functions are not called.
* Fix renamed "total" variable (#92287)Raymond Hettinger2022-05-041-2/+6
| | | | * Fix renamed "total" variable * Keep nan/inf handling consistent between versions
* Fix typo in Sorting howto (#92280)Carl Meyer2022-05-041-2/+2
| | | The phrase is usually "odds and ends," not "odd and ends."
* gh-67248: cmd: Sort miscellaneous help topics (#92254)Sam Denton2022-05-043-9/+34
| | | Closes #67248
* Compute from_sample() in a single pass over the data (#92284)Raymond Hettinger2022-05-041-18/+27
|
* gh-78214: marshal: Stabilize FLAG_REF usage (GH-8226)Inada Naoki2022-05-043-10/+17
| | | | | | | | | Use FLAG_REF always for interned strings. Refcounts of interned string is very unstable. When compiling same source, refcounts of interned string in the output may be 1 or >1. It makes FLAG_REF usage unstable. To help reproducible build, use FLAG_REF for interned string even if refcnt(obj)==1.
* bpo-47029: Fix BrokenPipeError in multiprocessing.Queue at garbage ↵Géry Ogam2022-05-032-12/+15
| | | | collection and explicit close (#31913)
* gh-80254: Disallow recursive usage of cursors in `sqlite3` converters (#29054)Erlend Egeberg Aasland2022-05-033-7/+65
| | | | Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Add more stats for freelist use and allocations. (GH-92211)Mark Shannon2022-05-039-0/+43
|
* GH-91173: disable frozen modules in debug builds (#92023)Kumar Aditya2022-05-033-25/+27
|
* gh-91928: Add `datetime.UTC` alias for `datetime.timezone.utc` (GH-91973)Kabir Kwatra2022-05-036-3/+23
| | | | | | | | | ### fixes #91928 `UTC` is now module attribute aliased to `datetime.timezone.utc`. You can now do the following: ```python from datetime import UTC ```