summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.11.0rc2v3.11.0rc2Pablo Galindo2022-09-1140-82/+404
|
* GH-96678: Fix undefined behavior in ceval.c (GH-96708)Miss Islington (bot)2022-09-101-0/+1
| | | | | (cherry picked from commit 50a70a083d34305a52fac4f5901bff2ead152d68) Co-authored-by: Mark Shannon <mark@hotpy.org>
* Fix possible NULL pointer dereference in _PyThread_CurrentFrames (GH-96584)Miss Islington (bot)2022-09-101-0/+1
| | | | | (cherry picked from commit 88a7f661ca02c0eb76b8f19234b8293b70f171e2) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.11] GH-96636: Remove all uses of NOTRACE_DISPATCH (GH-96643) (#96688)Mark Shannon2022-09-091-0/+3
| | | | | Co-authored-by: Brandt Bucher <brandtbucher@gmail.com> (cherry picked from commit aa3b4cf779b3dddb84e094879b91703354910d8c)
* [3.11] io: Add missing f (#96701)Jelle Zijlstra2022-09-091-0/+1
|
* gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict ↵Miss Islington (bot)2022-09-081-0/+2
| | | | | | | (GH-96353) (cherry picked from commit b9634ac776c24bc4d4a57859d884a94cdfe16043) Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
* [3.11] gh-68163: Correct conversion of Rational instances to float ↵Miss Islington (bot)2022-09-081-0/+1
| | | | | | (GH-25619) (#96556) Co-authored-by: Mark Dickinson <dickinsm@gmail.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.11] GH-96569: Avoid undefined behavior (#96616)Mark Shannon2022-09-081-0/+1
| | | Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* gh-96652: Fix faulthandler chained signal without sigaction() (GH-96666)Miss Islington (bot)2022-09-081-0/+3
| | | | | | | | Fix the faulthandler implementation of faulthandler.register(signal, chain=True) if the sigaction() function is not available: don't call the previous signal handler if it's NULL. (cherry picked from commit c580a81af91af4b9df85e466f8b48c3c9c86c3df) Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-96268: Fix loading invalid UTF-8 (GH-96270)Miss Islington (bot)2022-09-071-0/+2
| | | | | | | | This makes tokenizer.c:valid_utf8 match stringlib/codecs.h:decode_utf8. It also fixes an off-by-one error introduced in 3.10 for the line number when the tokenizer reports bad UTF8. (cherry picked from commit 8bc356a7dd50cbdb46d10b8c7e457832431f5d9e) Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* gh-96577: Fixes buffer overrun in _msi module (GH-96633)Miss Islington (bot)2022-09-071-0/+1
| | | | | (cherry picked from commit 4114bcc9ef7595a07196bcecf9c7d6d39f57f64d) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-96641: Do not expose `KeyWrapper` in `_functoolsmodule.c` (gh-96642)Miss Islington (bot)2022-09-071-0/+1
| | | | | (cherry picked from commit 2fd7246e97c8cc09b4e3f22933693f9d68f08163) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-96611: Fix error message for invalid UTF-8 in mid-multiline string (GH-96623)Miss Islington (bot)2022-09-061-0/+2
| | | | | (cherry picked from commit 05692c67c51b78a5a5a7bb61d646519025e38015) Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* GH-96572: fix use after free in trace refs build mode (GH-96618)Miss Islington (bot)2022-09-061-0/+1
| | | | | (cherry picked from commit 67444902a0f10419a557d0a2d3b8675c31b075a9) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.11] GH-96612: Skip incomplete frames in tracemalloc traces. (GH-96613) ↵Mark Shannon2022-09-061-0/+1
| | | | | | | (#96617) (cherry picked from commit 95e271b2266b8f2e7b60ede86ccf3ede4a7f83eb) Co-authored-by: Mark Shannon <mark@hotpy.org>
* [3.11] gh-92986: Fix ast.unparse when ImportFrom.level is None (GH-92992) ↵Batuhan Taskaya2022-09-061-0/+1
| | | | | | | | | | | | (GH-96593) This doesn't happen naturally, but is allowed by the ASDL and compiler. We don't want to change ASDL for backward compatibility reasons (GH-57645, GH-92987) (cherry picked from commit 200c9a8da0e2b892c476807e986009c01327e781) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-96559: Fixes Windows launcher handling of defaults using old-style tags, ↵Miss Islington (bot)2022-09-051-0/+3
| | | | | | | and adds What's New section (GH-96595) (cherry picked from commit 80a9bd2e94b1759a7669fa811ed3526eb137c92d) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-95778: Correctly pre-check for int-to-str conversion (GH-96537)Miss Islington (bot)2022-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converting a large enough `int` to a decimal string raises `ValueError` as expected. However, the raise comes _after_ the quadratic-time base-conversion algorithm has run to completion. For effective DOS prevention, we need some kind of check before entering the quadratic-time loop. Oops! =) The quick fix: essentially we catch _most_ values that exceed the threshold up front. Those that slip through will still be on the small side (read: sufficiently fast), and will get caught by the existing check so that the limit remains exact. The justification for the current check. The C code check is: ```c max_str_digits / (3 * PyLong_SHIFT) <= (size_a - 11) / 10 ``` In GitHub markdown math-speak, writing $M$ for `max_str_digits`, $L$ for `PyLong_SHIFT` and $s$ for `size_a`, that check is: $$\left\lfloor\frac{M}{3L}\right\rfloor \le \left\lfloor\frac{s - 11}{10}\right\rfloor$$ From this it follows that $$\frac{M}{3L} < \frac{s-1}{10}$$ hence that $$\frac{L(s-1)}{M} > \frac{10}{3} > \log_2(10).$$ So $$2^{L(s-1)} > 10^M.$$ But our input integer $a$ satisfies $|a| \ge 2^{L(s-1)}$, so $|a|$ is larger than $10^M$. This shows that we don't accidentally capture anything _below_ the intended limit in the check. <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org> (cherry picked from commit b126196838bbaf5f4d35120e0e6bcde435b0b480) Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* no-issue: Fix typo in 3.11.0a7.rst (gh-96547)Miss Islington (bot)2022-09-041-1/+1
| | | | | | accross -> across (cherry picked from commit 6adb89f50a0b032e0264cb3cd400a71c0fe6e0f8) Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
* [3.11] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96500)Gregory P. Smith2022-09-021-0/+14
| | | | | | | | | | | | | | | | | | Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds. This PR comes fresh from a pile of work done in our private PSRT security response team repo. This backports https://github.com/python/cpython/pull/96499 aka 511ca9452033ef95bc7d7fc404b8161068226002 Signed-off-by: Christian Heimes [Red Hat] <christian@python.org> Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org> Reviews via the private PSRT repo via many others (see the NEWS entry in the PR). <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).
* GH-74116: Allow multiple drain waiters for asyncio.StreamWriter (GH-94705) ↵Miss Islington (bot)2022-08-301-0/+1
| | | | | | | | | (#96395) (cherry picked from commit e5b2453e61ba5376831093236d598ef5f9f1de61) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-90467: StreamReaderProtocol - add strong reference to created task ↵Miss Islington (bot)2022-08-301-0/+2
| | | | | | | | | (GH-96323) (#96344) (cherry picked from commit e860e521ec0d84e175269aeb15cf24bd6053ad17) Co-authored-by: Kirill <iam@python273.pw> Co-authored-by: Kirill <iam@python273.pw>
* gh-96385: Correctly raise error on `[*T, *V]` substitution (GH-96386) (#96407)Miss Islington (bot)2022-08-301-0/+3
| | | | | | | (cherry picked from commit 75177358a62afeabd1d3aa0e9f395c2b9d4495ca) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-94682: Build and test with OpenSSL 1.1.1q (gh-94683)Miss Islington (bot)2022-08-291-0/+1
| | | | | (cherry picked from commit 873554ef84011773618911ffa698cea181cec9fd) Co-authored-by: Christian Heimes <christian@python.org>
* gh-90814: Correct NEWS wording re. optional C11 features (GH-96309) (GH-96384)Petr Viktorin2022-08-291-1/+2
| | | | | | | | | | | The previous wording of this entry suggests that CPython won't work if optional compiler features are enabled. That's not the case. The change is that we require C11 rather than C89. Note that PEP 7 does say "Python 3.11 and newer versions use C11 without optional features." It is correct there: that's not a guide for users who compile Python, but for CPython devs who must avoid the features.
* gh-95243: Mitigate the race condition in testSockName (GH-96173)Miss Islington (bot)2022-08-251-0/+3
| | | | | | | | | | | find_unused_port() has an inherent race condition, but we can't use bind_port() as that uses .getsockname() which this test is exercising. Try binding to unused ports a few times before failing. Signed-off-by: Ross Burton <ross.burton@arm.com> (cherry picked from commit df110126971d0271a977ce10779083b3e335b4da) Co-authored-by: Ross Burton <ross.burton@arm.com>
* gh-96175: add missing self._localName assignment in `xml.dom.minidom.Attr` ↵Miss Islington (bot)2022-08-231-0/+1
| | | | | | | | | | (GH-96176) X-Ref: https://github.com/python/typeshed/pull/8590GH-discussion_r951473977 Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 58f6953d6d3fe20d972bfa2f6e982206adcf1353) Co-authored-by: Kevin Kirsche <Kev.Kirsche+GitHub@gmail.com>
* GH-96187: Prevent _PyCode_GetExtra to return garbage for negative indexes ↵Miss Islington (bot)2022-08-231-0/+2
| | | | | | | (GH-96188) (cherry picked from commit 16ebae4cd4029205d932751f26c719c6cb8a6e92) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.11] gh-96159: Fix significant performance degradation in ↵Miss Islington (bot)2022-08-231-0/+1
| | | | | logging.TimedRotat… (GH-96182) (GH-96196) Co-authored-by: Duncan Grisby <duncan-github@grisby.org>
* gh-96046: Initialize ht_cached_keys in PyType_Ready() (GH-96047)Miss Islington (bot)2022-08-221-0/+4
| | | | | (cherry picked from commit 53e6a9a7254bdcd0538580ba7d799cd453e2dca5) Co-authored-by: Christian Heimes <christian@python.org>
* gh-96125: Fix sys.thread_info.name on pthread platforms (GH-96126) (#96128)Miss Islington (bot)2022-08-211-0/+2
| | | | | | | | Automerge-Triggered-By: GH:tiran (cherry picked from commit 822955c16654c22c10a993f5a94bbb68b857a150) Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Christian Heimes <christian@python.org>
* gh-96098: Clearly link concurrent.futures from threading & multiprocessing ↵Miss Islington (bot)2022-08-211-0/+3
| | | | | | | | | | docs (GH-96112) Clearly link concurrent.futures from threading & multiprocessing docs Also link directly to asyncio from the beginning of the threading docs. (cherry picked from commit bcc4cb0c7d5e0590928e74cae86b0a7938c0f74b) Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
* GH-96071: fix deadlock in PyGILState_Ensure (GH-96124) (#96129)Miss Islington (bot)2022-08-191-0/+1
| | | | | | | | Alternative of GH-96107 (cherry picked from commit e0d54a4a799dae4ebdd72a16bcf287ed62ae2972) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-95463: Remove backwards incompatible change regarding the ↵Miss Islington (bot)2022-08-191-0/+2
| | | | | | | | _MASK_UTF_FILENAME flags in bpo-28080 (GH-96072) Automerge-Triggered-By: GH:pablogsal (cherry picked from commit 9d066e2aa621125cd141b14df79955d74b7f258e) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.11] GH-95736: fix IsolatedAsyncioTestCase to initialize Runner bef… ↵Kumar Aditya2022-08-181-0/+1
| | | | | | (#96042) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (GH-95964)Miss Islington (bot)2022-08-181-0/+2
| | | | | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> (cherry picked from commit ab4d72954f3c3fe4bdf51dc6a9cf0ed38f210a68) Co-authored-by: Christian Heimes <christian@python.org>
* GH-95704: Don't suppress errors from tasks when TG is cancelled (GH-95761)Miss Islington (bot)2022-08-171-0/+2
| | | | | | | | | | | | | | | | When a task catches CancelledError and raises some other error, the other error should not silently be suppressed. Any scenario where a task crashes in cleanup upon cancellation will now result in an ExceptionGroup wrapping the crash(es) instead of propagating CancelledError and ignoring the side errors. NOTE: This represents a change in behavior (hence the need to change several tests). But it is only an edge case. Co-authored-by: Thomas Grainger <tagrain@gmail.com> (cherry picked from commit f51f54f39d384da63be622bcdc9cf4cfb43bad3d) Co-authored-by: Guido van Rossum <guido@python.org>
* GH-95899: fix asyncio.Runner to call set_event_loop only once (GH-95900) ↵Miss Islington (bot)2022-08-151-0/+1
| | | | | | | | (#96003) (cherry picked from commit 914f6367a0d015986dafa7a9d542e24192753b6b) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-95231: Disable md5 & crypt modules if FIPS is enabled (GH-94742)Miss Islington (bot)2022-08-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | If kernel fips is enabled, we get permission error upon doing `import crypt`. So, if kernel fips is enabled, disable the unallowed hashing methods. Python 3.9.1 (default, May 10 2022, 11:36:26) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import crypt Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.9/crypt.py", line 117, in <module> _add_method('MD5', '1', 8, 34) File "/usr/lib/python3.9/crypt.py", line 94, in _add_method result = crypt('', salt) File "/usr/lib/python3.9/crypt.py", line 82, in crypt return _crypt.crypt(word, salt) PermissionError: [Errno 1] Operation not permitted Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com> (cherry picked from commit 2fa03b1b0708d5d74630c351ec9abd2aac7550da) Co-authored-by: Shreenidhi Shedi <53473811+sshedi@users.noreply.github.com>
* GH-95818: Skip incomplete frames in `PyThreadState_GetFrame` (GH-95886) (#95890)Miss Islington (bot)2022-08-121-0/+1
| | | | | | | (cherry picked from commit 1b46d118e6e72daa64b98cafddb406c68b419efa) Co-authored-by: Mark Shannon <mark@hotpy.org> Co-authored-by: Mark Shannon <mark@hotpy.org>
* gh-94996: Disallow parsing pos only params with feature_version < (3, 8) ↵Miss Islington (bot)2022-08-121-0/+1
| | | | | | | (GH-94997) (cherry picked from commit b5e3ea286289fcad12be78480daf3756e350f69f) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-95605: Fix `float(s)` error message when `s` contains only whitespace ↵Miss Islington (bot)2022-08-111-0/+2
| | | | | | | | (GH-95665) (GH-95858) This PR fixes the error message from float(s) in the case where s contains only whitespace. (cherry picked from commit 97e9cfa75a80b54a0630b7371f35e368a12749d1) Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* gh-95876: Fix format string in pegen error location code (GH-95877)Miss Islington (bot)2022-08-111-0/+4
| | | | | (cherry picked from commit b4c857d0fd74abb1ede6fe083c4fa3ca728b2b83) Co-authored-by: Christian Heimes <christian@python.org>
* Python 3.11.0rc1v3.11.0rc1Pablo Galindo2022-08-0544-82/+436
|
* gh-95573: Reduce test data size in test_asyncio/test_ssl.py (GH-95668) ↵Miss Islington (bot)2022-08-051-0/+6
| | | | | | | | (GH-95705) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 3a9e1fda7ab30e04545d3eceea1f2ccd37fa1f15) Co-authored-by: Fantix King <fantix.king@gmail.com>
* gh-65802: IDLE - explain SaveAs and extensions (GH-95690) (GH-95692)Miss Islington (bot)2022-08-051-0/+1
| | | | | | | | File name extensions may or may not be shown for the current name and are added in an OS-dependent manner if not given for the new name. (cherry picked from commit 9890f86ae2001d19e7a18fee5b13aa0dd6069aef) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-95656: Enable the sqlite3 load extension API in Windows build (GH-95662)Miss Islington (bot)2022-08-041-0/+2
| | | | | (cherry picked from commit 6a5104f4fa83ed08fe31f712757dddabfede394c) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
* gh-95587: Fixes some upgrade detection issues in the Windows installer ↵Miss Islington (bot)2022-08-041-0/+2
| | | | | | | (GH-95631) (cherry picked from commit 5b6acbaa20aa8c80c0f10986bf6c755608664023) Co-authored-by: Steve Dower <steve.dower@python.org>
* GH-95289: Always call uncancel() when parent cancellation is requested ↵Miss Islington (bot)2022-08-041-0/+1
| | | | | | | | (GH-95602) Co-authored-by: Guido van Rossum <guido@python.org> (cherry picked from commit 2fef27589e44c91042c2598b5cad6c6ad0516d93) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-94936: C getters: co_varnames, co_cellvars, co_freevars (GH-95008)Miss Islington (bot)2022-08-041-0/+3
| | | | | (cherry picked from commit 42b102bbf9a9ae6fae8f6710202fb7afeeac277c) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>