summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.12.5v3.12.5Thomas Wouters2024-08-0674-147/+739
|
* [3.12] gh-122744: Bump bundled pip to 24.2 (#122747)Pradyun Gedam2024-08-061-0/+1
| | | | | (cherry picked from commit 5b8a6c5186be299d96dd483146dc6ea737ffdfe7) Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
* [3.12] gh-119577: Adjust DeprecationWarning when testing element truth ↵Gregory P. Smith2024-08-061-0/+4
| | | | | | | | | | | | | values in Element tree (GH-119762) (#120190) gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762) Adjust DeprecationWarning when testing element truth values in ElementTree, we're planning to go with the more natural True return rather than a disruptive harder to code around exception raise, and are deferring the behavior change for a few more releases. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* [3.12] gh-120104: IDLE: Fix padding in config and search dialogs (GH-120107) ↵Miss Islington (bot)2024-08-061-0/+1
| | | | | | | (#122741) (cherry picked from commit 4b66b6b7d6e65f9eb2d61435b9b37ffeb7bb00fb) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-121650: Encode newlines in headers, and verify headers are sound ↵Petr Viktorin2024-08-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-122233) (#122599) * gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) - Encode header parts that contain newlines Per RFC 2047: > [...] these encoding schemes allow the > encoding of arbitrary octet values, mail readers that implement this > decoding should also ensure that display of the decoded data on the > recipient's terminal will not cause unwanted side-effects It seems that the "quoted-word" scheme is a valid way to include a newline character in a header value, just like we already allow undecodable bytes or control characters. They do need to be properly quoted when serialized to text, though. - Verify that email headers are well-formed This should fail for custom fold() implementations that aren't careful about newlines. Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 097633981879b3c9de9a1dd120d3aa585ecc2384) * Document changes as made in 3.12.5
* [3.12] gh-122573: Require Python 3.10 or newer for Windows builds ↵Gregory P. Smith2024-08-061-0/+1
| | | | | | | | | | (GH-122574) (#122677) gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574) Match statements in tooling require a more recent Python. `Tools/cases_generator/*.py` Co-authored-by: Jonathan Protzenko <protz@microsoft.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-83505: Add markdown mimetype mapping (GH-17995) (#118594)Miss Islington (bot)2024-08-061-0/+1
| | | | | | gh-83505: Add markdown mimetype mapping (GH-17995) (cherry picked from commit b6f0ab5b1cb6d779efe4867d83a60e8d66c48dee) Co-authored-by: Ryan Batchelder <ryanbatch@gmail.com>
* [3.12] gh-122334: Fix crash when importing ssl after re-initialization ↵neonene2024-08-021-0/+1
| | | | | | | | | (GH-122481) (#122495) Fix crash when importing ssl after re-initialization The current METH_FASTCALL|METH_KEYWORDS functions in a non-builtin module can cause segfaults after restarting the main interpreter, invoking _PyArg_UnpackKeywords() with an insufficiently cleared _PyArg_Parser struct. This patch fixes the invalidation of the static argument parsers.
* [3.12] gh-121723: Relax constraints on queue objects for ↵Miss Islington (bot)2024-08-021-0/+3
| | | | | `logging.handlers.QueueHandler`. (GH-122154) (GH-122604) (cherry picked from commit fb864c76cd5e450e789a7b4095832e118cc49a39)
* [3.12] gh-87320: In the code module, handle exceptions raised in ↵Serhiy Storchaka2024-07-311-0/+3
| | | | | | | | | sys.excepthook (GH-122456) (GH-122515) Before, the exception caused by calling non-default sys.excepthook in code.InteractiveInterpreter bubbled up to the caller, ending the REPL. (cherry picked from commit bd3d31f380cd451a4ab6da5fbfde463fed95b5b5) Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
* [3.12] GH-122482: Make About IDLE direct discussion to DPO (GH-122483) (#122486)Miss Islington (bot)2024-07-301-0/+2
| | | | | | | | | | | GH-122482: Make About IDLE direct discussion to DPO (GH-122483) Currently, idle-dev@python.org and idle-dev mailing list serve to collect spam (90+%). Change About IDLE to direct discussions to discuss.python.org. Users are already doing so. (cherry picked from commit 29c04dfa2718dd25ad8b381a1027045b312f9739) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-122208: Don't delivery PyDict_EVENT_ADDED until it can't fail ↵Dino Viehland2024-07-301-0/+1
| | | | | (#122327) Don't delivery PyDict_EVENT_ADDED until it can't fail
* [3.12] gh-121474: Add threading.Barrier parties arg sanity check. ↵Miss Islington (bot)2024-07-301-0/+2
| | | | | | | (GH-121480) (GH-122443) (cherry picked from commit d27a53fc02a87e76066fc4e15ff1fff3922a482d) Co-authored-by: Clinton <pygeek@users.noreply.github.com>
* [3.12] gh-122400: Handle ValueError in filecmp (GH-122401) (GH-122442)Miss Islington (bot)2024-07-301-0/+3
| | | | | (cherry picked from commit 3a9b2aae615165a40614db9aaa8b90c55ff0c7f9) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] gh-122133: Authenticate socket connection for `socket.socketpair()` ↵Miss Islington (bot)2024-07-291-0/+5
| | | | | | | | | | fallback (GH-122134) (GH-122425) Authenticate socket connection for `socket.socketpair()` fallback when the platform does not have a native `socketpair` C API. We authenticate in-process using `getsocketname` and `getpeername` (thanks to Nathaniel J Smith for that suggestion). (cherry picked from commit 78df1043dbdce5c989600616f9f87b4ee72944e5) Co-authored-by: Seth Michael Larson <seth@python.org> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Revert "[3.12] gh-120713: Normalize year with century for datetime.strftime ↵Serhiy Storchaka2024-07-291-2/+0
| | | | | (GH-120820) (GH-121145)" (GH-122409) This reverts commit 027902b56f2176c571e5e244c3c23dc7247b67dc.
* [3.12] gh-122311: Fix some error messages in pickle (GH-122386) (GH-122388)Miss Islington (bot)2024-07-291-0/+1
| | | | | (cherry picked from commit 3b034d26eb8480f8d12ae11f42d038d24cf8498a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-122300: Preserve AST nodes for format specifiers with single ↵Pablo Galindo Salgado2024-07-271-0/+2
| | | | | elements (GH-122308) (#122363) (cherry picked from commit db2d8b6db1b56c2bd3802b86f9b76da33e8898d7)
* [3.12] gh-122170: Handle ValueError raised by os.stat() in linecache ↵Miss Islington (bot)2024-07-271-0/+2
| | | | | | | (GH-122176) (GH-122349) (cherry picked from commit 7a6d4ccf0ec16e09f0d8b21c5a0c591e5e3e45f7) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` ↵Miss Islington (bot)2024-07-271-0/+2
| | | | | | | | (GH-122338) (#122345) gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (GH-122338) (cherry picked from commit c08696286f52d286674f264eecf7b33a335a890b) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* [3.12] gh-82951: Fix serializing by name in pickle protocols < 4 (GH-122149) ↵Miss Islington (bot)2024-07-251-0/+3
| | | | | | | | | | (GH-122265) Serializing objects with complex __qualname__ (such as unbound methods and nested classes) by name no longer involves serializing parent objects by value in pickle protocols < 4. (cherry picked from commit dc07f65a53baf60d9857186294d3d7ba92d5606d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-122029: Log call events in sys.setprofile when it's a method with ↵Miss Islington (bot)2024-07-231-0/+1
| | | | | | | | | | c function (GH-122072) (GH-122206) gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072) Log call events in sys.setprofile when it is a method with a C function. (cherry picked from commit e91ef13861e88c27aed51a24e58d1dcc855a01dc) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] gh-121957: Emit audit events for python -i and python -m asyncio ↵Łukasz Langa2024-07-221-0/+3
| | | | (GH-122117)
* [3.12] gh-122026: Fix identification of mismatched parentheses inside ↵Pablo Galindo Salgado2024-07-201-0/+2
| | | | | | | f-strings (GH-122028) (#122062) (cherry picked from commit 2009e25e26040dca32696e70f91f13665350e7fd) Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* [3.12] gh-121130: Fix f-string format specifiers with debug expressions ↵Pablo Galindo Salgado2024-07-201-0/+2
| | | | (GH-121150) (#122063)
* [3.12] gh-120930: Remove extra blank occuring in wrapped encoded words in ↵Miss Islington (bot)2024-07-191-0/+2
| | | | | | | | email headers (GH-121747) (GH-121964) gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747) (cherry picked from commit cecaceea31f32f01b5617989e3dc8b2077f53f89) Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
* [3.12] gh-59022: Added tests for `pkgutil.extend_path` (GH-121673) (GH-121950)Miss Islington (bot)2024-07-191-0/+1
| | | | | | | This adds tests for the documented behaviour of `pkgutil.extend_path` regarding different argument types as well as for `*.pkg` files. (cherry picked from commit 8f2532168b4630e413a42ccb5e458708808702ea) Co-authored-by: Andreas Stocker <andreas@stocker.co.it>
* [3.12] gh-121905: Consistently use "floating-point" instead of "floating ↵Serhiy Storchaka2024-07-197-7/+7
| | | | | point" (GH-121907) (GH-122013) (cherry picked from commit 1a0c7b9ba48a2dffb70bb0c7327abae1d3e87356)
* [3.12] gh-120289: Disallow disable() and clear() in external timer to ↵Miss Islington (bot)2024-07-181-0/+2
| | | | | | | | prevent use-after-free (GH-120297) (#121989) gh-120289: Disallow disable() and clear() in external timer to prevent use-after-free (GH-120297) (cherry picked from commit 1ab17782832bb1b6baa915627aead3e3516a0894) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz ↵Miss Islington (bot)2024-07-171-0/+2
| | | | | | | | | | | | | (GH-121876) (#121912) gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876) Problem occurred when attribute xyz could not be pickled. Since this is not trivial to selectively fix, block all attributes (other than 'width'). IDLE does not access them and they are private implementation details. (cherry picked from commit 58753f33e47fe48906883dc010771f68c13b7e52) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-121160: Add some tests for readline.set_history_length (GH-121326) ↵Miss Islington (bot)2024-07-161-0/+2
| | | | | | | (GH-121857) (cherry picked from commit 263c7e611bb24715e513d457a3477a61fff15162) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] gh-119189: Fix the power operator for Fraction (GH-119242) (GH-119835)Miss Islington (bot)2024-07-162-0/+4
| | | | | | | | When using the ** operator or pow() with Fraction as the base and an exponent that is not rational, a float, or a complex, the fraction is no longer converted to a float. (cherry picked from commit b9965ef282d6662145d2e05b080c811132ce6fde) Co-authored-by: Joshua Herman <30265+zitterbewegung@users.noreply.github.com>
* [3.12] gh-121657: Display correct error message for yield from outsid… ↵Kirill Podoprigora2024-07-151-0/+2
| | | | | | | | (GH-121769) (cherry picked from commit 178e44de8f023be7a5dc400044ab61983b191f24) Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] gh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` ↵Miss Islington (bot)2024-07-141-0/+1
| | | | | | | (GH-121750) (GH-121753) (cherry picked from commit 26dfb2771236bfd96cdaa1081103f75141ecff47) Co-authored-by: Dominic H <dom@dominic.sk>
* [3.12] gh-120012: clarify the behaviour of `multiprocessing.Queue.empty` on ↵Miss Islington (bot)2024-07-141-0/+3
| | | | | | | closed queues. (GH-120102) (#120470) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.12] NEWS: Fix Sphinx warnings and increase threshold for new news nits ↵Hugo van Kemenade2024-07-1327-78/+79
| | | | | | | (GH-121482) (#121514) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-99242 Ignore error when running regression tests under certain ↵Miss Islington (bot)2024-07-131-0/+3
| | | | | | | | | conditions. (GH-121663) (GH-121670) gh-99242 Ignore error when running regression tests under certain conditions. (GH-121663) (cherry picked from commit 0759cecd9d945dfbac2226febaba51f41195555c) Co-authored-by: Bas Bloemsaat <bas@bloemsaat.com> Co-authored-by: Kevin Diem <kg.diem@gmail.com>
* [3.12] gh-117482: Fix Builtin Types Slot Wrappers (gh-121632)Eric Snow2024-07-111-0/+2
| | | | | | | When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter). This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't. This change fixes that by preserving the original data from the static type struct and checking that. (cherry picked from commit 5250a031332eb9499d5fc190d7287642e5a144b9, AKA gh-121602) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the ↵Miss Islington (bot)2024-07-101-0/+1
| | | | | | | | free_list to be reused (gh-121428) (#121566) GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428) (cherry picked from commit 9585a1a2a251aaa15baf6579e13dd3be0cb05f1f) Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
* [3.12] gh-121018: Fix typo in NEWS entry (GH-121510) (#121516)Sam Gross2024-07-081-3/+3
| | | (cherry picked from commit 218edaf0ffe6ef38349047f378649f93d280e23e)
* [3.12] gh-121084: Fix test_typing random leaks (GH-121360) (#121372)Miss Islington (bot)2024-07-041-0/+3
| | | | | | | | | | gh-121084: Fix test_typing random leaks (GH-121360) Clear typing ABC caches when running tests for refleaks (-R option): call _abc_caches_clear() on typing abstract classes and their subclasses. (cherry picked from commit 5f660e8e2ca3acfb89ccbdd990f072149b6baa6a) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-117983: Defer import of threading for lazy module loading ↵Miss Islington (bot)2024-07-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-120233) (GH-121350) gh-117983: Defer import of threading for lazy module loading (GH-120233) As noted in gh-117983, the import importlib.util can be triggered at interpreter startup under some circumstances, so adding threading makes it a potentially obligatory load. Lazy loading is not used in the stdlib, so this removes an unnecessary load for the majority of users and slightly increases the cost of the first lazily loaded module. An obligatory threading load breaks gevent, which monkeypatches the stdlib. Although unsupported, there doesn't seem to be an offsetting benefit to breaking their use case. For reference, here are benchmarks for the current main branch: ``` ❯ hyperfine -w 8 './python -c "import importlib.util"' Benchmark 1: ./python -c "import importlib.util" Time (mean ± σ): 9.7 ms ± 0.7 ms [User: 7.7 ms, System: 1.8 ms] Range (min … max): 8.4 ms … 13.1 ms 313 runs ``` And with this patch: ``` ❯ hyperfine -w 8 './python -c "import importlib.util"' Benchmark 1: ./python -c "import importlib.util" Time (mean ± σ): 8.4 ms ± 0.7 ms [User: 6.8 ms, System: 1.4 ms] Range (min … max): 7.2 ms … 11.7 ms 352 runs ``` Compare to: ``` ❯ hyperfine -w 8 './python -c pass' Benchmark 1: ./python -c pass Time (mean ± σ): 7.6 ms ± 0.6 ms [User: 5.9 ms, System: 1.6 ms] Range (min … max): 6.7 ms … 11.3 ms 390 runs ``` This roughly halves the import time of importlib.util. (cherry picked from commit 94f50f8ee6872007d46c385f7af253497273255a) Co-authored-by: Chris Markiewicz <effigies@gmail.com>
* [3.12] gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228) ↵Miss Islington (bot)2024-07-011-0/+3
| | | | | | | | | | | (#121231) gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228) Call getpwnam() to get pw_dir, since it can be different than getpwall() pw_dir. (cherry picked from commit 02cb5fdee391670d63b2fc0a92ca9b36a32ac95a) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-121188: Sanitize invalid XML characters in regrtest (GH-121195) ↵Miss Islington (bot)2024-07-011-0/+3
| | | | | | | | | | | | (#121205) gh-121188: Sanitize invalid XML characters in regrtest (GH-121195) When creating the JUnit XML file, regrtest now escapes characters which are invalid in XML, such as the chr(27) control character used in ANSI escape sequences. (cherry picked from commit af8c3d7a26d605099f5b3406a8d33ecddb77e8fb) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-121101: Document -Wall option (an alias for -Walways) (GH-121102) ↵Miss Islington (bot)2024-06-291-0/+1
| | | | | | | | (#121147) gh-121101: Document -Wall option (an alias for -Walways) (GH-121102) (cherry picked from commit 0a1e8ff9c15675fdc4d07fa6c59f83808bf00798) Co-authored-by: Wim Jeantine-Glenn <jump@wimglenn.com>
* [3.12] gh-120713: Normalize year with century for datetime.strftime ↵Serhiy Storchaka2024-06-291-0/+2
| | | | | | | (GH-120820) (GH-121145) (cherry picked from commit 6d34938dc8163f4a4bcc68069a1645a7ab76e935) Co-authored-by: blhsing <blhsing@gmail.com>
* [3.12] gh-120868: Fix breaking change in `logging.config` when using ↵Miss Islington (bot)2024-06-281-0/+1
| | | | | `QueueHandler` (GH-120872) (GH-121077) (cherry picked from commit 7d9c68513d112823a9a6cdc7453b998b2c24eb4c)
* [3.12] gh-121018: Fix more cases of exiting in argparse when ↵Serhiy Storchaka2024-06-281-2/+3
| | | | | | | | | | exit_on_error=False (GH-121056) (GH-121129) * parse_intermixed_args() now raises ArgumentError instead of calling error() if exit_on_error is false. * Internal code now always raises ArgumentError instead of calling error(). It is then caught at the higher level and error() is called if exit_on_error is true. (cherry picked from commit 81a654a3425eaa05a51342509089533c1f623f1b)
* [3.12] gh-121096: Ignore dlopen() leaks in Valgrind suppression file ↵Miss Islington (bot)2024-06-281-0/+43
| | | | | | | | (GH-121097) (#121123) gh-121096: Ignore dlopen() leaks in Valgrind suppression file (GH-121097) (cherry picked from commit 6e63d84e43fdce3a5bdb899b024cf947d4e48900) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-105623 Fix performance degradation in logging RotatingFileHandler ↵Miss Islington (bot)2024-06-281-0/+2
| | | | | | | | | | | | | (GH-105887) (GH-121116) The check for whether the log file is a real file is expensive on NFS filesystems. This commit reorders the rollover condition checking to not do the file type check if the expected file size is less than the rotation threshold. (cherry picked from commit e9b4ec614b66d11623b80471409c16a109f888d5) Co-authored-by: Craig Robson <craig@zhatt.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>