summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.12] gh-111699: Move smtpd note to dedicated section in What's New Python ↵Miss Islington (bot)2023-11-303-1/+6
| | | | | | | | | 3.12 doc (GH-112544) (GH-112552) Relocate smtpd deprecation notice to it's own section rather than under 'locale' in docs for What's New in Python 3.12 doc (cherry picked from commit 1ff212debdc094c28928011cff9f4eea8de34d44) Co-authored-by: Matt Prodani <mp5908@nyu.edu>
* [3.12] IDLE: fix config_key htest (GH-112545) (#112546)Miss Islington (bot)2023-11-302-2/+2
| | | | | | Change 'Dialog' to 'Window' in two places to match the name of the config_key class being tested. (cherry picked from commit 81261fa67ff82b03c255733b0d1abbbb8a228187) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] [Enum] update class creation for RuntimeError changes (GH-111815) ↵Miss Islington (bot)2023-11-292-6/+9
| | | | | | | (GH-112526) (cherry picked from commit f9e6ce03953e9ee988d55324dc715b0ef2303cfb) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* [3.12] Add more C API tests (GH-112522) (GH-112525)Miss Islington (bot)2023-11-292-0/+119
| | | | | | | Add tests for PyObject_Str(), PyObject_Repr(), PyObject_ASCII() and PyObject_Bytes(). (cherry picked from commit e0449b9a7fffc0c0eed806bf4cbb8f1f65397bbb) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-112509: Fix keys being present in both required_keys and ↵Miss Islington (bot)2023-11-293-5/+63
| | | | | | | | optional_keys in TypedDict (GH-112512) (#112530) (cherry picked from commit 403886942376210662610627b01fea6acd77d331) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-110930: Correct book title by Alan D. Moore (GH-112490) (#112523)Miss Islington (bot)2023-11-291-2/+2
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-112503: Fix test_sys on WASI (gh-112505)Eric Snow2023-11-291-1/+13
| | | Skip tests if no interpreters module.gh-110713 added some tests that use the interpreters module but did not accommodated builds that don't support subinterpreters (incl. an interpreters module). We fix that here by catching ImportError and skipping tests as appropriate.
* [3.12] gh-105716: Fix Refleaks in test_interpreters (gh-112500)Eric Snow2023-11-281-7/+21
| | | gh-110707 (0122b4d) added some tests that didn't close file descriptors they created, leading to failures on the refleak buildbots. This closes the leaking file descriptors, resolving the failure.
* [3.12] gh-112431: Unconditionally call `hash -r` (GH-112432) (GH-112493)Miss Islington (bot)2023-11-281-10/+4
| | | | | | | | | | | | | | gh-112431: Unconditionally call `hash -r` (GH-112432) The `activate` script calls `hash -r` in two places to make sure the shell picks up the environment changes the script makes. Before that, it checks to see if the shell running the script is bash or zsh. `hash -r` is specified by POSIX and is not exclusive to bash and zsh. This guard prevents the script from calling `hash -r` in other `GH-!/bin/sh`-compatible shells like dash. (cherry picked from commit a194938f33a71e727e53490815bae874eece1460) Co-authored-by: James Morris <6653392+J-M0@users.noreply.github.com>
* [3.12] gh-109802: Increase test coverage for complexobject.c (GH-112452) ↵Miss Islington (bot)2023-11-283-0/+193
| | | | | | | (GH-112489) (cherry picked from commit f14d741daa1b9e5b9c9fc1edba93d0fa92b5ba8d) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.12] gh-112105: Make completer delims work on libedit (gh-112106) (gh-112487)Miss Islington (bot)2023-11-283-0/+37
| | | | | | gh-112105: Make completer delims work on libedit (gh-112106) (cherry picked from commit 2df26d83486b8f9ac6b7df2a9a4669508aa61983) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under ↵Miss Islington (bot)2023-11-281-1/+3
| | | | | | | | | | Py_LIMITED_API (gh-111707) (gh-111787) This should have been done in gh-104148. (A similar fix has already be done for that slot's value macros, and backported to 3.12. See gh-110968.) (cherry picked from commit 836e0a75d565ecb7e2485fee88dbe67e649a1d5f) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-109894: Fix initialization of static `MemoryError` in ↵Miss Islington (bot)2023-11-284-4/+16
| | | | | | | | | | | | | | | subinterpreter (gh-110911) (gh-111238) Fixes GH-109894 * set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call * allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init --------- (cherry picked from commit 47d3e2ed930a9f3d228aed4f62133737dae74cf7) Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* [3.12] gh-110310: Add a Per-Interpreter XID Registry for Heap Types ↵Eric Snow2023-11-284-405/+506
| | | | | | | | | | | | | | | (gh-110311) (gh-110714) We do the following: * add a per-interpreter XID registry (PyInterpreterState.xidregistry) * put heap types there (keep static types in _PyRuntimeState.xidregistry) * clear the registries during interpreter/runtime finalization * avoid duplicate entries in the registry (when _PyCrossInterpreterData_RegisterClass() is called more than once for a type) * use Py_TYPE() instead of PyObject_Type() in _PyCrossInterpreterData_Lookup() The per-interpreter registry helps preserve isolation between interpreters. This is important when heap types are registered, which is something we haven't been doing yet but I will likely do soon. (cherry-picked from commit 80dc39e1dc2abc809f448cba5d2c5b9c1c631e11)
* [3.12] gh-105716: Support Background Threads in Subinterpreters Consistently ↵Eric Snow2023-11-2811-150/+385
| | | | | | | | | (gh-109921) (gh-110707) The existence of background threads running on a subinterpreter was preventing interpreters from getting properly destroyed, as well as impacting the ability to run the interpreter again. It also affected how we wait for non-daemon threads to finish. We add PyInterpreterState.threads.main, with some internal C-API functions. (cherry-picked from commit 1dd9dee45d2591b4e701039d1673282380696849)
* [3.12] gh-109793: Allow Switching Interpreters During Finalization ↵Eric Snow2023-11-287-34/+118
| | | | | (gh-109794) (gh-110705) Essentially, we should check the thread ID rather than the thread state pointer.
* [3.12] gh-112414: Add additional unit tests for calling `repr()` on a ↵Miss Islington (bot)2023-11-282-4/+30
| | | | | | | | | namespace package (GH-112475) (#112480) gh-112414: Add additional unit tests for calling `repr()` on a namespace package (GH-112475) (cherry picked from commit cf2054059c08ef1c5546f24874191f341dc94eb9) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] Docs: fix markup for `importlib.machinery.NamespaceLoader` ↵Miss Islington (bot)2023-11-281-1/+1
| | | | | | | | (GH-112479) (#112481) Docs: fix markup for `importlib.machinery.NamespaceLoader` (GH-112479) (cherry picked from commit 2e632fa07d13a58be62f59be4e656ad58b378f9b) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-106931: Intern Statically Allocated Strings Globally (gh-107272) ↵Eric Snow2023-11-2711-4113/+4251
| | | | | | | | | (gh-110713) We tried this before with a dict and for all interned strings. That ran into problems due to interpreter isolation. However, exclusively using a per-interpreter cache caused some inconsistency that can eliminate the benefit of interning. Here we circle back to using a global cache, but only for statically allocated strings. We also use a more-basic _Py_hashtable_t for that global cache instead of a dict. Ideally we would only have the global cache, but the optional isolation of each interpreter's allocator means that a non-static string object must not outlive its interpreter. Thus we would have to store a copy of each such interned string in the global cache, tied to the main interpreter. (cherry-picked from commit b72947a8d26915156323ccfd04d273199ecb870c)
* [3.12] Correct documentation for AF_PACKET (GH-112339) (#112477)Miss Islington (bot)2023-11-271-2/+1
| | | | | | | | | | | | Correct documentation for AF_PACKET (GH-112339) Protocol in the address tuple should *not* be in the network-byte-order, because it is converted internally[1]. [1] https://github.com/python/cpython/blob/89ddea4886942b0c27a778a0ad3f0d5ac5f518f0/Modules/socketmodule.cGH-L2144 network byte order doesn't make sense for a python level int anyways. It's a fixed size C serialization concept. (cherry picked from commit 562d7149c6944fb9e4c7be80664b2f2d5a12a3ea) Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
* [3.12] gh-105699: Revert gh-107783 "Re-enable the Multiple-Interpreters ↵Eric Snow2023-11-271-0/+1
| | | | | | | | | Stress Tests" (gh-112474) Revert "[3.12] gh-105699: Re-enable the Multiple-Interpreters Stress Tests (gh-107572) (#107783)" This reverts commit a4aac7d3eafc413ae75f26ca1a1246bdba23c7fb. The stress tests are still failing on FreeBSD.
* [3.12] gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994) (gh-110701)Eric Snow2023-11-277-26487/+26702
| | | | | | | This change makes sure sys.path[0] is set properly for subinterpreters. Before, it wasn't getting set at all. This change does not address the broader concerns from gh-109853. (cherry-picked from commit a040a32ea2f13f16172394d3e3e3f80f47f25a68)
* [3.12] gh-76785: Use Pending Calls When Releasing Cross-Interpreter Data ↵Eric Snow2023-11-274-61/+96
| | | | | | (gh-109556) (gh-112288) This fixes some crashes in the _xxinterpchannels module, due to a race between interpreters. (cherry picked from commit fd7e08a6f35581e1189b9bf12feb51f7167a86c5)
* [3.12] gh-105699: Re-enable the Multiple-Interpreters Stress Tests ↵Miss Islington (bot)2023-11-271-1/+0
| | | | | | | | | | (gh-107572) (#107783) We had disabled them due to crashes they exposed, which have since been fixed. (cherry picked from commit f9e3ff1ea4b2c8b787360409d55f2037652b7456) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: T. Wouters <thomas@python.org>
* [3.12] gh-68166: Tkinter: Add tests and examples for element_create() ↵Miss Islington (bot)2023-11-273-3/+203
| | | | | | | | | | (GH-111453) (GH-111857) * Remove mention of "vsapi" element type from the documentation. * Add tests for element_create() and other ttk.Style methods. * Add examples for element_create() in the documentation. (cherry picked from commit 005d1e8fc81539c60c6b21ebba34de3edd5bb232) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-112388: Fix an error that was causing the parser to try to ↵Miss Islington (bot)2023-11-273-0/+7
| | | | | | | | | overwrite tokenizer errors (GH-112410) (#112466) gh-112388: Fix an error that was causing the parser to try to overwrite tokenizer errors (GH-112410) (cherry picked from commit 2c8b19174274c183eb652932871f60570123fe99) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] gh-112387: Fix error positions for decoded strings with backwards ↵Miss Islington (bot)2023-11-273-0/+10
| | | | | | | | | tokenize errors (GH-112409) (#112468) gh-112387: Fix error positions for decoded strings with backwards tokenize errors (GH-112409) (cherry picked from commit 45d648597b1146431bf3d91041e60d7f040e70bf) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] bpo-41422: Visit the Pickler's and Unpickler's memo in tp_traverse ↵Miss Islington (bot)2023-11-272-0/+17
| | | | | | | | (GH-21664) (GH-112464) (cherry picked from commit 967f2a3052c2d22e31564b428a9aa8cc63dc2a9f) Co-authored-by: kale-smoothie <34165060+kale-smoothie@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-112438: Fix support of format units with the "e" prefix in nested ↵Miss Islington (bot)2023-11-274-6/+40
| | | | | | | tuples in PyArg_Parse (gh-112439) (GH-112460) (cherry picked from commit 4eea1e82369fbf7a795d1956e7a8212a1b58009f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-84443: SSLSocket.recv_into() now support buffer protocol with ↵Miss Islington (bot)2023-11-273-4/+32
| | | | | | | | | | itemsize != 1 (GH-20310) (GH-112458) It is also no longer use __len__(). (cherry picked from commit 812360fddda86d7aff5823f529ab720f57ddc411) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] GH-101100: Fix reference warnings for ``socket`` methods (GH-110114) ↵Miss Islington (bot)2023-11-273-17/+17
| | | | | | | (#112455) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Move What's New In Python 3.12 entries to the right section ↵Miss Islington (bot)2023-11-271-7/+8
| | | | | | | | | | (GH-112447) (#112450) Move What's New In Python 3.12 entries to the right section (GH-112447) Jython and ctypes removals are unrelated to C API Removals. (cherry picked from commit d44ee42cd7c9a40e1d7096b95476fe47156f571f) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442) (#112444)Miss Islington (bot)2023-11-271-1/+1
| | | | | | Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442) (cherry picked from commit fb79e1ed4a985a487a02bb8585cc1bd2933dfa7c) Co-authored-by: Tom Levy <tomlevy93@gmail.com>
* [3.12] gh-112414: Fix `AttributeError` when calling `repr()` on a namespace ↵Miss Islington (bot)2023-11-274-3/+16
| | | | | | | | package imported with a custom loader (GH-112425) (#112440) gh-112414: Fix `AttributeError` when calling `repr()` on a namespace package imported with a custom loader (GH-112425) (cherry picked from commit 0622839cfedacbb48eba27180fd0f0586fe97771) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct ↵Mark Dickinson2023-11-274-48/+53
| | | | | | | | | | | | | | (GH-112424) (#112426) * [3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct. (GH-112424) Revert commit c8c0afc7137ab9f22bf59d591084948ca967c97c (PR GH-94532), which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`. This caused issues with code in the wild that subclasses `struct.Struct`.. (cherry picked from commit 9fe60340d7e8dc22b3aec205c557bc69a1b2d18c) Co-authored-by: Mark Dickinson <dickinsm@gmail.com> * Remove unrelated test
* [3.12] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112420)Hugo van Kemenade2023-11-268-18/+24
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-112331: Fix reference manual description of attribute lookup ↵Miss Islington (bot)2023-11-251-6/+12
| | | | mechanics (gh-112375) (#112412)
* [3.12] Descriptor HowTo: Sync the error-messages with the C code. Add ↵Miss Islington (bot)2023-11-251-3/+40
| | | | tests. (gh-112403) (gh-112411)
* [3.12] gh-101100 : Fix Sphinx warnings in `library/doctest.rst` (GH-112399) ↵Miss Islington (bot)2023-11-253-22/+30
| | | | | | | (#112402) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-94722: fix DocTest.__eq__ for case of no line number on one side ↵Miss Islington (bot)2023-11-253-2/+23
| | | | | | | | (GH-112385) (#112400) gh-94722: fix DocTest.__eq__ for case of no line number on one side (GH-112385) (cherry picked from commit fbb9027a037ff1bfaf3f596df033ca45743ee980) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] gh-101100: Define `_tkinter` module to fix references (GH-112382) ↵Miss Islington (bot)2023-11-251-0/+3
| | | | | | | | | | (#112392) gh-101100: Define `_tkinter` module to fix references (GH-112382) Define _tkinter module to fix references (cherry picked from commit 6b961b8ceaba372b78d03feaceb4837bf7236694) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-101100: Define `test.regrtest` module to fix references ↵Miss Islington (bot)2023-11-251-0/+3
| | | | | | | | | | (GH-112381) (#112390) gh-101100: Define `test.regrtest` module to fix references (GH-112381) Define test.regrtest module to fix references (cherry picked from commit d525d01e2794e7e736527eaa7ee309ca1252f5bd) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-59254: mention in open() doc that line buffering is for writing ↵Miss Islington (bot)2023-11-241-1/+1
| | | | | | | | (GH-112318) (#112378) gh-59254: mention in open() doc that line buffering is for writing (GH-112318) (cherry picked from commit fafae08cc7caa25f2bd6b29106b50ef76c3e296f) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] Remove bogus annotations from the descriptor howto guide (GH-112349) ↵Miss Islington (bot)2023-11-231-3/+3
| | | | | | | | (#112352) Remove bogus annotations from the descriptor howto guide (GH-112349) (cherry picked from commit d9fc15222e96942e30ea8b0561dec5c82ecb4663) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* [3.12] GH-109052: Use the base opcode when comparing code objects (GH-112329)Tian Gao2023-11-233-2/+22
|
* [3.12] Fix docstring and var name of itertools recipe (GH-112113) (#112310)Miss Islington (bot)2023-11-221-3/+3
| | | | | | | | | Fix docstring and var name of itertools recipe (GH-112113) `prepend()` works with arbitrary iterables, not only iterators. In fact, the example given uses a `list`, which is iterable, but not an iterator. (cherry picked from commit 6c47eaccfa2550c140a24bc6e520d968731d9689) Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
* [3.12] GH-111963: Clarify sys.monitoring.free_tool_id's limitations (GH-112304)Miss Islington (bot)2023-11-211-0/+7
| | | | (cherry picked from commit 46500c42f09a8342efde48ad74327d5225158ff3) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] gh-110950: add upstream Tk fixes to macOS installer. (GH-111041) ↵Miss Islington (bot)2023-11-217-2/+206
| | | | | | | | | | | | | | | | | | | | | (#112294) Add upstream Tk patches for three problems affecting tkinter users: - Update macOS installer to include a fix accepted by upstream Tcl/Tk for a crash encountered after the first :meth:`tkinter.Tk` instance is destroyed. (gh-92603) - Update macOS installer to include an upstream Tcl/Tk fix for the ``ttk::ThemeChanged`` error encountered in Tkinter. (gh-71383) - Update macOS installer to include an upstream Tcl/Tk fix for the ``Secure coding is not enabled for restorable state!`` warning encountered in Tkinter on macOS 14 Sonoma. (gh-110950) (cherry picked from commit d67f947c72af8a215db2fd285e5de9b1e671fde1) Co-authored-by: Christopher Chavez <chrischavez@gmx.us> Co-authored-by: Ned Deily <nad@python.org>
* [3.12] gh-112243: Don't include comments in f-string debug expressions ↵Pablo Galindo Salgado2023-11-203-5/+53
| | | | | (GH-112284) (#112285) (cherry picked from commit d59feb5dbe5395615d06c30a95e6a6a9b7681d4d)
* [3.12] gh-73561: Omit interface scope from IPv6 when used as Host header ↵Miss Islington (bot)2023-11-193-2/+27
| | | | | | | | | | | | | | | | (GH-93324) (#112272) gh-73561: Omit interface scope from IPv6 when used as Host header (GH-93324) Omit the `@interface_scope` from an IPv6 address when used as Host header by `http.client`. --------- (cherry picked from commit ce1096f974d3158a92e050f9226700775b8db398) [Google LLC] Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>