summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.12.rst
Commit message (Collapse)AuthorAgeFilesLines
* gh-97681: Remove Tools/demo/ directory (#97682)Victor Stinner2022-10-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the Tools/demo/ directory which contained old demo scripts. A copy can be found in the old-demos project: https://github.com/gvanrossum/old-demos Remove the following old demo scripts: * beer.py * eiffel.py * hanoi.py * life.py * markov.py * mcast.py * queens.py * redemo.py * rpython.py * rpythond.py * sortvisu.py * spreadsheet.py * vector.py Changes: * Remove a reference to the redemo.py script in the regex howto documentation. * Remove a reference to the removed Tools/demo/ directory in the curses documentation. * Update PC/layout/ to remove the reference to Tools/demo/ directory.
* gh-96348: Deprecate the 3-arg signature of coroutine.throw and ↵Ofey Chan2022-09-301-0/+5
| | | | generator.throw (GH-96428)
* gh-96670: Raise SyntaxError when parsing NULL bytes (#97594)Pablo Galindo Salgado2022-09-271-0/+6
|
* gh-96512: Update int_max_str docs to say 3.11 (#96942)Gregory P. Smith2022-09-191-11/+0
| | | | It was unknown if it'd be before 3.11.0 when creating the original changes. It's in 3.11rc2, so 3.11 it is.
* fixes gh-96841: replace Mercurial with VCS (#96879)Benjamin Peterson2022-09-161-2/+2
|
* gh-89536: Use ThinLTO policy if possible (gh-96766)Dong-hee Na2022-09-161-0/+4
|
* GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257)adphrost2022-09-151-0/+4
| | | | Co-authored-by: Andrew Frost <adfrost@fb.com> Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
* Revert accidental removal from 3.12 doc. (gh-96826)Benjamin Peterson2022-09-141-0/+70
|
* closes gh-96734: Update to Unicode 15.0.0. (GH-96809)Benjamin Peterson2022-09-131-70/+6
|
* gh-93503: Document the new tracing/profiling APIs in the What's new document ↵Pablo Galindo Salgado2022-09-131-0/+14
| | | | | (#96681) Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-90751: memoryview now supports half-float (#96738)Dong-hee Na2022-09-101-0/+3
| | | | Co-authored-by: Antoine Pitrou <antoine@python.org>
* Fix typo in 3.12 whatsnew (GH-96740)Maksym Medvied2022-09-101-1/+1
|
* gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)Gregory P. Smith2022-09-021-0/+11
| | | | | | | | | | | | | | | | 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. 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#). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.
* gh-90536: Add support for the BOLT post-link binary optimizer (gh-95908)Kevin Modzelewski2022-08-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for the BOLT post-link binary optimizer Using [bolt](https://github.com/llvm/llvm-project/tree/main/bolt) provides a fairly large speedup without any code or functionality changes. It provides roughly a 1% speedup on pyperformance, and a 4% improvement on the Pyston web macrobenchmarks. It is gated behind an `--enable-bolt` configure arg because not all toolchains and environments are supported. It has been tested on a Linux x86_64 toolchain, using llvm-bolt built from the LLVM 14.0.6 sources (their binary distribution of this version did not include bolt). Compared to [a previous attempt](https://github.com/faster-cpython/ideas/issues/224), this commit uses bolt's preferred "instrumentation" approach, as well as adds some non-PIE flags which enable much better optimizations from bolt. The effects of this change are a bit more dependent on CPU microarchitecture than other changes, since it optimizes i-cache behavior which seems to be a bit more variable between architectures. The 1%/4% numbers were collected on an Intel Skylake CPU, and on an AMD Zen 3 CPU I got a slightly larger speedup (2%/4%), and on a c6i.xlarge EC2 instance I got a slightly lower speedup (1%/3%). The low speedup on pyperformance is not entirely unexpected, because BOLT improves i-cache behavior, and the benchmarks in the pyperformance suite are small and tend to fit in i-cache. This change uses the existing pgo profiling task (`python -m test --pgo`), though I was able to measure about a 1% macrobenchmark improvement by using the macrobenchmarks as the training task. I personally think that both the PGO and BOLT tasks should be updated to use macrobenchmarks, but for the sake of splitting up the work this PR uses the existing pgo task. * Simplify the build flags * Add a NEWS entry * Update Makefile.pre.in Co-authored-by: Dong-hee Na <donghee.na92@gmail.com> * Update configure.ac Co-authored-by: Dong-hee Na <donghee.na92@gmail.com> * Add myself to ACKS * Add docs * Other review comments * fix tab/space issue * Make it more clear that --enable-bolt is experimental * Add link to bolt's github page Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* GH-95589: Dont crash when subclassing extension classes with multiple ↵Mark Shannon2022-08-171-0/+17
| | | | | | | inheritance (GH-96028) * Treat tp_weakref and tp_dictoffset like other opaque slots for multiple inheritance. * Document Py_TPFLAGS_MANAGED_DICT and Py_TPFLAGS_MANAGED_WEAKREF in what's new.
* gh-90385: Add pathlib.Path.walk what's new section (GH-95467)Stanislav Zmiev2022-08-111-0/+7
| | | Automerge-Triggered-By: GH:brettcannon
* gh-95504: Fix negative numbers in PyUnicode_FromFormat (GH-95848)Petr Viktorin2022-08-101-0/+3
| | | Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
* gh-95781: More strict format string checking in PyUnicode_FromFormatV() ↵Serhiy Storchaka2022-08-081-0/+6
| | | | | | | | | (GH-95784) An unrecognized format character in PyUnicode_FromFormat() and PyUnicode_FromFormatV() now sets a SystemError. In previous versions it caused all the rest of the format string to be copied as-is to the result string, and any extra arguments discarded.
* gh-93274: Expose receiving vectorcall in the Limited API (GH-95717)Petr Viktorin2022-08-081-3/+11
|
* gh-93243: Make smtpd private before porting its users (GH-93246)Oleg Iarygin2022-08-061-0/+12
| | | | | | | gh-93243 This PR is required to reduce diffs of the following porting (no need to either maintain documentation and tests consistent with each porting step, or try to port everything and remove smtpd in a single PR). Automerge-Triggered-By: GH:warsaw
* gh-94673: Add Per-Interpreter tp_subclasses for Static Builtin Types (gh-95301)Eric Snow2022-08-051-0/+10
|
* gh-93274: Make vectorcall safe on mutable classes & inherit it by default ↵Petr Viktorin2022-08-041-0/+9
| | | | (#95437)
* gh-95388: Deprecate creating immutable types with mutable bases (GH-95533)Petr Viktorin2022-08-041-0/+7
|
* gh-77617: Add sqlite3 command-line interface (#95026)Erlend Egeberg Aasland2022-08-011-0/+7
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-94673: Add Per-Interpreter tp_weaklist for Static Builtin Types (#95302)Eric Snow2022-07-291-0/+7
| | | | | | | | | | | | | | | * Store tp_weaklist on the interpreter state for static builtin types. * Factor out _PyStaticType_GET_WEAKREFS_LISTPTR(). * Add _PyStaticType_ClearWeakRefs(). * Add a comment about how _PyStaticType_ClearWeakRefs() loops. * Document the change. * Update Doc/whatsnew/3.12.rst * Fix a typo.
* gh-93963: Document importlib.abc deprecations (#94546)Hugo van Kemenade2022-07-251-0/+18
|
* gh-95112: Fix What's New 3.12 contribution note periods (#95118)Terry Jan Reedy2022-07-221-2/+2
| | | A couple, so far, are missing.
* gh-90016: Deprecate default sqlite3 adapters and converters (#94276)Erlend Egeberg Aasland2022-07-201-0/+6
| | | Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-93939: Build C extensions without setup.py (GH-94474)Christian Heimes2022-07-141-0/+6
| | | Combines GH-93940, GH-94452, and GH-94433
* gh-94309: Add typing.Hashable and typing.Sized for "What's New for Python ↵MonadChains2022-07-141-0/+3
| | | | | 3.12" (GH-94729) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* Fix heading levels for "Deprecated" section in What's New for 3.12 (GH-94762)Pradyun Gedam2022-07-121-2/+2
| | | | | | These headings were at the same level as the "Deprecated" heading, but likely intended to be a subheading within that section. Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
* gh-94199: Remove the ssl.wrap_socket() function (#94203)Victor Stinner2022-07-081-0/+9
| | | | | | | | Remove the ssl.wrap_socket() function, deprecated in Python 3.7: instead, create a ssl.SSLContext object and call its sl.SSLContext.wrap_socket() method. Any package that still uses ssl.wrap_socket() is broken and insecure. The function neither sends a SNI TLS extension nor validates server hostname. Code is subject to CWE-295 : Improper Certificate Validation.
* gh-94379: Remove zipimport find_loader() and find_module() methods (#94380)Victor Stinner2022-07-051-0/+5
| | | | | zipimport: Remove find_loader() and find_module() methods, deprecated in Python 3.10: use the find_spec() method instead. See PEP 451 for the rationale.
* gh-94383: Remove ElementTree.Element.copy() method (#94384)Victor Stinner2022-07-041-0/+6
| | | | | | xml.etree: Remove the ElementTree.Element.copy() method of the pure Python implementation, deprecated in Python 3.10, use the copy.copy() function instead. The C implementation of xml.etree has no copy() method, only a __copy__() method.
* gh-94352: shlex.split() no longer accepts None (#94353)Victor Stinner2022-07-041-0/+5
| | | | | shlex.split(): Passing None for s argument now raises an exception, rather than reading sys.stdin. The feature was deprecated in Python 3.9.
* gh-94216: add pseudo instructions to the dis/opcodes modules (GH-94241)Irit Katriel2022-07-011-0/+11
|
* gh-87995: Make MappingProxyType hashable (GH-94252)Serhiy Storchaka2022-06-281-0/+3
|
* gh-94199: Remove hashlib.pbkdf2_hmac() Python implementation (GH-94200)Victor Stinner2022-06-281-0/+6
| | | | | | | Remove the pure Python implementation of hashlib.pbkdf2_hmac(), deprecated in Python 3.10. Python 3.10 and newer requires OpenSSL 1.1.1 or newer (PEP 644), this OpenSSL version provides a C implementation of pbkdf2_hmac() which is faster.
* gh-94226: Remove the locale.format() function (#94229)Victor Stinner2022-06-261-0/+5
| | | | | | | Remove the locale.format() function, deprecated in Python 3.7: use locale.format_string() instead. Remove TestFormatPatternArg test case: it is irrelevant for locale.format_string() which accepts complex formats.
* Revert "bpo-45162: Revert "Remove many old deprecated unittest features"" ↵Serhiy Storchaka2022-06-261-0/+39
| | | | | | (GH-92556) This reverts commit b50322d20337ca468f2070eedb051a16ee1eba94.
* gh-94199: Remove ssl.match_hostname() function (#94224)Victor Stinner2022-06-251-0/+5
|
* gh-94196: Remove gzip.GzipFile.filename attribute (#94197)Victor Stinner2022-06-241-0/+6
| | | | | | gzip: Remove the filename attribute of gzip.GzipFile, deprecated since Python 2.6, use the name attribute instead. In write mode, the filename attribute added '.gz' file extension if it was not present.
* gh-94199: Remove ssl.RAND_pseudo_bytes() function (#94202)Victor Stinner2022-06-241-0/+4
| | | | Remove the ssl.RAND_pseudo_bytes() function, deprecated in Python 3.6: use os.urandom() or ssl.RAND_bytes() instead.
* gh-94169: Remove deprecated io.OpenWrapper (#94170)Victor Stinner2022-06-241-0/+6
| | | | | | Remove io.OpenWrapper and _pyio.OpenWrapper, deprecated in Python 3.10: just use :func:`open` instead. The open() (io.open()) function is a built-in function. Since Python 3.10, _pyio.open() is also a static method.
* gh-85308: argparse: Use filesystem encoding for arguments file (GH-93277)Inada Naoki2022-06-231-0/+6
|
* gh-89336: Remove configparser APIs that were deprecated for 3.12 (#92503)Gregory P. Smith2022-06-211-0/+10
| | | | | https://github.com/python/cpython/issue/89336: Remove configparser 3.12 deprecations. Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-77782: Deprecate global configuration variable (#93943)Victor Stinner2022-06-171-0/+29
| | | | | | | Deprecate global configuration variable like Py_IgnoreEnvironmentFlag: the Py_InitializeFromConfig() API should be instead. Fix declaration of Py_GETENV(): use PyAPI_FUNC(), not PyAPI_DATA().
* gh-92547: Amend What's New (#93872)Erlend Egeberg Aasland2022-06-161-0/+8
|
* GH-93429: Document `LOAD_METHOD` removal (GH-93803)Ken Jin2022-06-141-0/+9
|
* GH-92308 What's New: list pending removals in 3.13 and future versions (#92562)Hugo van Kemenade2022-06-061-0/+55
|