]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Julien Palard [Mon, 9 May 2022 21:10:19 +0000 (23:10 +0200)]
Doc: Update py2app link. (#91585)
See: https://mail.python.org/archives/list/docs@python.org/thread/KDVFGNGGUGGPVRZT7WZYHHWXCRS2GEN7/
Erlend Egeberg Aasland [Mon, 9 May 2022 18:32:21 +0000 (20:32 +0200)]
gh-92171: Update Tcl/Tk download links in macOS installer script (GH-92179)
Pablo Galindo Salgado [Mon, 9 May 2022 17:38:38 +0000 (18:38 +0100)]
gh-91731: Add macro compatibility for static_assert for old libcs (GH-92559)
slateny [Mon, 9 May 2022 16:40:51 +0000 (09:40 -0700)]
gh-86019: Add table for Windows installer options (GH-91809)
Ken Jin [Mon, 9 May 2022 13:45:13 +0000 (21:45 +0800)]
gh-91345: Talk about ``sys._getframe`` compatibility in 3.11 whatsnew (GH-92552)
Victor Stinner [Mon, 9 May 2022 12:26:30 +0000 (14:26 +0200)]
What's New in Python 3.12: move C API at the end (#92555)
* Separate Build and C API changes in two sections
* Add sub-sections to the C API changes
Victor Stinner [Mon, 9 May 2022 10:40:56 +0000 (12:40 +0200)]
What's New in Python 3.11: move C API changes (#92390)
Move C API changes to the C API > Porting to Python 3.11 section.
Victor Stinner [Mon, 9 May 2022 10:35:59 +0000 (12:35 +0200)]
Enhance PyConfig documentation (#92394)
Erlend Egeberg Aasland [Mon, 9 May 2022 09:00:20 +0000 (11:00 +0200)]
gh-90005: Cleanup after GH-31698 (#91642)
Erlend Egeberg Aasland [Mon, 9 May 2022 08:06:03 +0000 (10:06 +0200)]
CODEOWNERS: Add Erlend Aasland as sqlite3 code owner (#92535)
Signed-off-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Raymond Hettinger [Mon, 9 May 2022 07:08:41 +0000 (02:08 -0500)]
Fix inconsistent return type for statistics median_grouped() gh-92531 (#92533)
Ma Lin [Mon, 9 May 2022 02:58:55 +0000 (10:58 +0800)]
bpo-38056: overhaul Error Handlers section in codecs documentation (#15732)
* Some handlers were wrongly described as text-encoding only, but actually they can also be used in text-decoding.
* Add more description to each handler.
* Add two REPL examples.
* Add indexes for Error Handler's name.
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Rafael Fontenelle [Sun, 8 May 2022 23:21:19 +0000 (20:21 -0300)]
bpo-39229: fix formatting in library/functions.rst (#17857)
Missing reference of auditing event presents error when building translated documentation
Godefroid Chapelle [Sun, 8 May 2022 23:20:42 +0000 (01:20 +0200)]
pdb docs: workaround for double semicolon in strings (#17011)
see https://github.com/gotcha/ipdb/issues/172
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
David CARLIER [Sun, 8 May 2022 23:19:41 +0000 (00:19 +0100)]
gh-91968: Add socket constants SO_USER_COOKIE/SO_RTABLE from BSD (#91967)
Those are somewhat equivalent to Linux' SO_MARK.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
slateny [Sun, 8 May 2022 19:30:38 +0000 (12:30 -0700)]
gh-77521: Add link to builtin module names in modules tutorial (#92438)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Ken Jin [Sun, 8 May 2022 16:44:55 +0000 (00:44 +0800)]
Use percentage over factor for 3.11 whatsnew performance (GH-92496)
Gregory P. Smith [Sun, 8 May 2022 16:20:34 +0000 (09:20 -0700)]
gh-90622: Do not spawn ProcessPool workers on demand via fork method. (#91598)
Do not spawn ProcessPool workers on demand when they spawn via fork.
This avoids potential deadlocks in the child processes due to forking from
a multithreaded process.
Serhiy Storchaka [Sun, 8 May 2022 16:19:29 +0000 (19:19 +0300)]
gh-91760: More strict rules for numerical group references and group names in RE (GH-91792)
Only sequence of ASCII digits is now accepted as a numerical reference.
The group name in bytes patterns and replacement strings can now only
contain ASCII letters and digits and underscore.
Davide Rizzo [Sun, 8 May 2022 16:14:55 +0000 (18:14 +0200)]
gh-80856: doc: reveal doctest directives (#92318)
* Doc: Reveal doctest directives.
* Fix whitespace.
Co-authored-by: Julien Palard <julien@palard.fr>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Ezio Melotti [Sun, 8 May 2022 16:02:27 +0000 (18:02 +0200)]
Fix typo in whatsnew (GH-92488)
Automerge-Triggered-By: GH:ezio-melotti
Oleg Iarygin [Sun, 8 May 2022 15:44:54 +0000 (18:44 +0300)]
Fix the `versionadded` for asyncio.StreamWriter.start_tls() (#92378)
Alex Waygood [Sun, 8 May 2022 15:36:38 +0000 (16:36 +0100)]
gh-92417: `logging` docs: Remove warning that only applies to Python <3.2 (#92425)
Serhiy Storchaka [Sun, 8 May 2022 15:32:32 +0000 (18:32 +0300)]
gh-91162: Fix substitution of unpacked tuples in generic aliases (GH-92335)
Serhiy Storchaka [Sun, 8 May 2022 15:23:08 +0000 (18:23 +0300)]
Fix What's New for 3.12 (GH-92482)
Alex Waygood [Sun, 8 May 2022 15:22:32 +0000 (16:22 +0100)]
`typing.Text`: tweak deprecation notice (#92405)
https://github.com/python/cpython/pull/92351/files#r866869469
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Ken Jin [Sun, 8 May 2022 15:05:30 +0000 (23:05 +0800)]
Update What's New in 3.11 faster cpython figures and contributors (GH-92401)
Serhiy Storchaka [Sun, 8 May 2022 14:49:09 +0000 (17:49 +0300)]
bpo-45046: Support context managers in unittest (GH-28045)
Add methods enterContext() and enterClassContext() in TestCase.
Add method enterAsyncContext() in IsolatedAsyncioTestCase.
Add function enterModuleContext().
slateny [Sun, 8 May 2022 14:35:32 +0000 (07:35 -0700)]
gh-77630: Change Charset to charset (GH-92439)
Marc Mueller [Sun, 8 May 2022 14:24:54 +0000 (16:24 +0200)]
Add __class_getitem__ to csv.DictReader and csv.DictWriter (#92393)
Serhiy Storchaka [Sun, 8 May 2022 14:10:11 +0000 (17:10 +0300)]
bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)
I suppose it is a remnants of very old code written when str, int, list, dict, etc
were functions and not classes.
Dong-hee Na [Sun, 8 May 2022 13:33:53 +0000 (22:33 +0900)]
gh-89474: Improve Semaphore/BoundedSemaphore.release() for multiple thread waiting (GH-92447)
Alex Waygood [Sun, 8 May 2022 13:23:22 +0000 (14:23 +0100)]
gh-92417: `stdtypes` docs: delete discussion of Python 2 differences (GH-92423)
Given that 2.7 has now been end-of-life for two and a half years,
I don't think we need such a detailed explanation here anymore of
the differences between Python 2 and Python 3.
Matthew Rahtz [Sun, 8 May 2022 13:21:28 +0000 (14:21 +0100)]
gh-92261: Disallow iteration of Union (and other special forms) (GH-92262)
Hugo van Kemenade [Sun, 8 May 2022 13:19:16 +0000 (16:19 +0300)]
GH-92431: Fix footnotes in Doc/c-api/exceptions.rst (GH-92432)
* Remove redundant footnote ref: the footnote has been removed
* Fix footnote ref to match footnote
* Convert footnotes into reST footnotes: will error if missing
Alex Waygood [Sun, 8 May 2022 13:17:23 +0000 (14:17 +0100)]
gh-92417: `doctest` docs: remove references to Python <3.6 (GH-92420)
Alex Waygood [Sun, 8 May 2022 13:16:52 +0000 (14:16 +0100)]
gh-92417: `json` docs: `dict` is ordered on all supported Python versions (GH-92422)
Alex Waygood [Sun, 8 May 2022 13:16:19 +0000 (14:16 +0100)]
gh-92417: `asyncio` docs: `asyncio.run()` is available on all supported Python versions (GH-92419)
Alex Waygood [Sun, 8 May 2022 13:15:38 +0000 (14:15 +0100)]
gh-92417: `typing` docs: `from __future__ import annotations` can be used in all supported Python versions (GH-92418)
Dong-hee Na [Sun, 8 May 2022 12:50:40 +0000 (21:50 +0900)]
gh-92448: Update the documentation builder to render the GitHub issue. (GH-92449)
Dong-hee Na [Sun, 8 May 2022 12:44:12 +0000 (21:44 +0900)]
Update CPyhton configuration for 3.12 (#92451)
* Update CPyhton configuration for 3.12
* Fix PC/pyconfig.h
* Add expect failure
Pablo Galindo [Sun, 8 May 2022 03:01:20 +0000 (04:01 +0100)]
Add the 3.11 branch to the CI files
Pablo Galindo [Sun, 8 May 2022 02:48:31 +0000 (03:48 +0100)]
Update the SOURCE_URI in pyspecific.py to point to the new branch
Pablo Galindo [Sun, 8 May 2022 02:43:47 +0000 (03:43 +0100)]
Merge remote-tracking branch 'upstream/main'
Pablo Galindo [Sun, 8 May 2022 02:40:52 +0000 (03:40 +0100)]
Python 3.12.0a0
Serhiy Storchaka [Sat, 7 May 2022 18:21:11 +0000 (21:21 +0300)]
gh-88279: Fix compiler warning for using deprecated PySys_SetArgvEx (#92428)
Erlend Egeberg Aasland [Sat, 7 May 2022 04:23:13 +0000 (06:23 +0200)]
gh-92308: Add Pending Removal section to 3.11 What's New (#92309)
* gh-92308: Add Pending Removal section to 3.11 What's New
* Use compact list; drop attributions
* Add short text, and also missing PyUnicode_InternImmortal
* Fix formatting
* markup fix
* Update Doc/whatsnew/3.11.rst
Co-authored-by: Victor Stinner <vstinner@python.org>
* Apply suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Pablo Galindo [Fri, 6 May 2022 22:55:59 +0000 (23:55 +0100)]
Update the SOURCE_URI in pyspecific.py to point to the new branch
Pablo Galindo [Fri, 6 May 2022 22:52:22 +0000 (23:52 +0100)]
Python 3.11.0b1
Brandt Bucher [Fri, 6 May 2022 17:57:08 +0000 (10:57 -0700)]
gh-90997: Move `CACHE` handling into `_unpack_opargs` (#92409)
* Move CACHE handling into _unpack_opargs
* Remove auto-added import
* blurb add
larryhastings [Fri, 6 May 2022 17:09:35 +0000 (10:09 -0700)]
gh-92203: Add closure support to exec(). (#92204)
Add a closure keyword-only parameter to exec(). It can only be specified when exec-ing a code object that uses free variables. When specified, it must be a tuple, with exactly the number of cell variables referenced by the code object. closure has a default value of None, and it must be None if the code object doesn't refer to any free variables.
Victor Stinner [Fri, 6 May 2022 14:18:56 +0000 (16:18 +0200)]
gh-90978: test_ssl of test_asyncio uses LONG_TIMEOUT (#92402)
On slow buildbot workers, some test_ssl tests fail randomly because
of short timeout (30 seconds). Use support.LONG_TIMEOUT instead which
is longer and also adjusted (by regrtest --timeout option) on
buildbot workers known to be slow.
Brandt Bucher [Fri, 6 May 2022 14:18:09 +0000 (07:18 -0700)]
gh-90997: Show cached inline values in `dis` output (#92360)
gophra [Fri, 6 May 2022 13:39:16 +0000 (21:39 +0800)]
gh-92368: Fix missing possessive apostrophe (#92397)
* Fix missing possessive apostrophe
Victor Stinner [Fri, 6 May 2022 12:40:08 +0000 (14:40 +0200)]
gh-91321: Fix _PyObject_EXTRA_INIT for C++ (#92396)
In C++, the _PyObject_EXTRA_INIT macro now uses nullptr, rather than
0, to initialize the _ob_next and _ob_prev members of the PyObject
structure.
Fix test_cppext failure when Python is built with
./configure --with-trace-refs.
Serhiy Storchaka [Fri, 6 May 2022 12:32:10 +0000 (15:32 +0300)]
Fix What's New: use :gh: instead of :issue: (#92395)
Serhiy Storchaka [Fri, 6 May 2022 10:50:38 +0000 (13:50 +0300)]
gh-91827: Add method info_pathlevel() in tkinter (GH-91829)
slateny [Fri, 6 May 2022 10:28:09 +0000 (03:28 -0700)]
Add source for character mappings (#92014)
Alex Waygood [Fri, 6 May 2022 10:15:18 +0000 (11:15 +0100)]
gh-92332: Docs-only deprecation of `typing.Text` (GH-92351)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Christian Heimes [Fri, 6 May 2022 10:08:36 +0000 (12:08 +0200)]
gh-84461: Skip network require tests on Emscripten (GH-92383)
Alex Waygood [Fri, 6 May 2022 09:53:00 +0000 (10:53 +0100)]
Enum docs: Remove unnecessary apostrophes (#92382)
Replace "it's" with "its".
Matt Wozniski [Fri, 6 May 2022 09:37:08 +0000 (05:37 -0400)]
Document the lifetime of `PyUnicode_AsUTF8String` (#92325)
The current wording implied this, but didn't state it explicitly.
Raymond Hettinger [Fri, 6 May 2022 07:57:53 +0000 (02:57 -0500)]
GH-89519: Deprecate classmethod descriptor chaining (#92379)
Hugo van Kemenade [Fri, 6 May 2022 07:18:22 +0000 (10:18 +0300)]
Don't apply 'stale' label to issues (#91501)
Ethan Furman [Fri, 6 May 2022 07:16:22 +0000 (00:16 -0700)]
gh-78157: [Enum] nested classes will not be members in 3.13 (GH-92366)
- add member() and nonmember() functions
- add deprecation warning for internal classes in enums not
becoming members in 3.13
Co-authored-by: edwardcwang
Gregory P. Smith [Fri, 6 May 2022 07:04:53 +0000 (00:04 -0700)]
gh-90622: Prevent max_tasks_per_child use with a fork mp_context. (#91587)
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.
Inada Naoki [Fri, 6 May 2022 05:48:36 +0000 (14:48 +0900)]
gh-87901: Add encoding to os.popen (GH-92374)
Mariusz Felisiak [Fri, 6 May 2022 04:59:32 +0000 (06:59 +0200)]
bpo-46907: Update macOS installer to SQLite 3.38.4. (GH-32148)
Inada Naoki [Fri, 6 May 2022 04:58:58 +0000 (13:58 +0900)]
NEWS: Reorder items by section (GH-92373)
They caused duplicated sections.
Tim Peters [Fri, 6 May 2022 04:14:09 +0000 (23:14 -0500)]
Issues/88027: A potential double free in list_sort_impl (#92367)
merge_freemem(): set keys to NULL do it's harmless to call this again.
Alexey Izbyshev [Fri, 6 May 2022 04:01:15 +0000 (07:01 +0300)]
gh-92112: Fix crash triggered by an evil custom `mro()` (#92113)
Michael Droettboom [Fri, 6 May 2022 03:59:45 +0000 (23:59 -0400)]
gh-92356: Fix regression in ctypes function call overhead (#92357)
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.
Hai Shi [Fri, 6 May 2022 03:32:35 +0000 (11:32 +0800)]
update argparse's doc of append action. (#92344)
Victor Stinner [Fri, 6 May 2022 03:24:29 +0000 (05:24 +0200)]
gh-88279: Deprecate PySys_SetArgvEx() (#92363)
Deprecate the following C functions:
* PySys_SetArgv()
* PySys_SetArgvEx()
* PySys_SetPath()
Victor Stinner [Fri, 6 May 2022 02:53:00 +0000 (04:53 +0200)]
gh-57684: Document safe path in What's New in Python 3.11 (#92362)
Mention also -P and PYTHONSAFEPATH in the Security Considerations
page.
Victor Stinner [Fri, 6 May 2022 01:41:24 +0000 (03:41 +0200)]
gh-57684: Update tests for PYTHONSAFEPATH=1 (#92358)
Fix tests failing with the PYTHONSAFEPATH=1 env var.
Enhance also -P help in Python usage (python --help).
Paul Ganssle [Fri, 6 May 2022 00:31:24 +0000 (18:31 -0600)]
gh-80010: Expand fromisoformat to include most of ISO-8601 (#92177)
This expands `fromisoformat` to cover most of the common uses of ISO 8601. We may expand the scope more in the future.
Victor Stinner [Thu, 5 May 2022 23:34:11 +0000 (01:34 +0200)]
gh-57684: Add -P cmdline option and PYTHONSAFEPATH env var (#31542)
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.
Gregory P. Smith [Thu, 5 May 2022 23:22:32 +0000 (16:22 -0700)]
gh-82616: Add process_group support to subprocess.Popen (#23930)
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>
Christian Heimes [Thu, 5 May 2022 23:10:37 +0000 (01:10 +0200)]
gh-70363: Emscripten cannot fstat renamed spool file (GH-92354)
cibofo [Thu, 5 May 2022 22:39:02 +0000 (01:39 +0300)]
gh-91996: Add an HTTPMethod StrEnum to http (GH-91997)
* Add HTTPMethod enum to http
Create a StrEnum for the 9 common HTTP methods.
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Christian Heimes [Thu, 5 May 2022 22:08:43 +0000 (00:08 +0200)]
gh-92135: test_cppext requires subprocess (GH-92349)
Christian Heimes [Thu, 5 May 2022 22:07:53 +0000 (00:07 +0200)]
gh-64783: Don't check value of SIG_DFL and SIG_IGN (#92350)
Christian Heimes [Thu, 5 May 2022 19:24:16 +0000 (21:24 +0200)]
gh-92345: Import rlcompleter before sys.path is extended (#92346)
``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``.
Serhiy Storchaka [Thu, 5 May 2022 17:16:06 +0000 (20:16 +0300)]
gh-87390: Fix starred tuple equality and pickling (GH-92337)
Gregory P. Smith [Thu, 5 May 2022 16:48:17 +0000 (09:48 -0700)]
minor hashlib doc example cleanup. (#92340)
Closes #85465
Alexey Izbyshev [Thu, 5 May 2022 16:46:19 +0000 (19:46 +0300)]
gh-92301: subprocess: Prefer close_range() to procfs-based fd closing (#92303)
#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.
Irit Katriel [Thu, 5 May 2022 16:39:33 +0000 (12:39 -0400)]
gh-92118: Add test for traceback when exception is modified by (Async)ExitStack.__exit__ (GH-92339)
Soumendra Ganguly [Thu, 5 May 2022 16:04:44 +0000 (11:04 -0500)]
bpo-41818: Add os.login_tty() for *nix. (#29658)
* 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>
Vlad Hoi [Thu, 5 May 2022 13:40:01 +0000 (16:40 +0300)]
bpo-43827: Make arguments to abc.ABCMeta.__new__ pos-only (#25385)
To avoid conflicts with `__init__subclass__`.
Géry Ogam [Thu, 5 May 2022 13:37:26 +0000 (15:37 +0200)]
bpo-43857: Improve the AttributeError message when deleting a missing attribute (#25424)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Robert Howlett [Thu, 5 May 2022 09:33:35 +0000 (10:33 +0100)]
gh-92047: Py_GetVersion multi-digit minor version (GH-92047) (#92048)
Victor Stinner [Thu, 5 May 2022 09:31:59 +0000 (11:31 +0200)]
gh-89653: PEP 670: Convert PyCFunction macros to functions (#92302)
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.
Raymond Hettinger [Thu, 5 May 2022 08:01:07 +0000 (03:01 -0500)]
Clean-up and simplify median_grouped(). Vastly improve its docstring. (#92324)
DjMorgul [Thu, 5 May 2022 05:32:49 +0000 (07:32 +0200)]
Allow translating argument error messages (#17169)
Michael J. Sullivan [Thu, 5 May 2022 04:00:21 +0000 (21:00 -0700)]
bpo-46764: Fix wrapping bound method with @classmethod (#31367)
Sebastian Rittau [Thu, 5 May 2022 00:14:07 +0000 (02:14 +0200)]
gh-92223: Remove pre-Python 3.7 alternative in asyncio docs (#92224)
Irit Katriel [Wed, 4 May 2022 18:40:47 +0000 (14:40 -0400)]
gh-92118: fix traceback of exceptions propagated from inside a contextlib.contextmanager (GH-92202)
Mark Shannon [Wed, 4 May 2022 15:31:21 +0000 (09:31 -0600)]
GH-92239: Make sure that PEP 523 is supported, even when specializing first. (GH-92245)
Serhiy Storchaka [Wed, 4 May 2022 14:06:50 +0000 (17:06 +0300)]
gh-92107: Add tests that subscription works on arbitrary named tuple types (GH-92304)