summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
Commit message (Collapse)AuthorAgeFilesLines
* bpo-28254: Add a C-API for controlling the GC state (GH-25687)scoder2021-04-281-0/+7
| | | | | | | | Add new C-API functions to control the state of the garbage collector: PyGC_Enable(), PyGC_Disable(), PyGC_IsEnabled(), corresponding to the functions in the gc module. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-41486: Faster bz2/lzma/zlib via new output buffering (GH-21740)Ma Lin2021-04-281-0/+6
| | | | | | | | | Faster bz2/lzma/zlib via new output buffering. Also adds .readall() function to _compression.DecompressReader class to take best advantage of this in the consume-all-output at once scenario. Often a 5-20% speedup in common scenarios due to less data copying. Contributed by Ma Lin.
* bpo-43766: Implement PEP 647 (User-Defined Type Guards) in typing.py (#25282)Ken Jin2021-04-271-0/+10
|
* bpo-43762: Add audit events for loading of sqlite3 extensions (GH-25246)Erlend Egeberg Aasland2021-04-261-0/+8
|
* bpo-38490: statistics: Add covariance, Pearson's correlation, and simple ↵Tymoteusz Wołodźko2021-04-251-0/+8
| | | | | linear regression (#16813) Co-authored-by: Tymoteusz Wołodźko <twolodzko+gitkraken@gmail.com
* bpo-39529: Deprecate creating new event loop in asyncio.get_event_loop() ↵Serhiy Storchaka2021-04-251-0/+13
| | | | | | (GH-23554) asyncio.get_event_loop() emits now a deprecation warning when it creates a new event loop. In future releases it will became an alias of asyncio.get_running_loop().
* bpo-42737: annotations with complex targets no longer causes any runtime ↵Batuhan Taskaya2021-04-251-0/+4
| | | | effects (GH-23952)
* bpo-31870: Add a timeout parameter to ssl.get_server_certificate() (GH-22270)Zackery Spytz2021-04-241-0/+6
|
* bpo-39950: add `pathlib.Path.hardlink_to()` method that supersedes ↵Barney Gale2021-04-231-0/+9
| | | | | | | | | | | `link_to()` (GH-18909) The argument order of `link_to()` is reversed compared to what one may expect, so: a.link_to(b) Might be expected to create *a* as a link to *b*, in fact it creates *b* as a link to *a*, making it function more like a "link from". This doesn't match `symlink_to()` nor the documentation and doesn't seem to be the original author's intent. This PR deprecates `link_to()` and introduces `hardlink_to()`, which has the same argument order as `symlink_to()`.
* bpo-43914: Highlight invalid ranges in SyntaxErrors (#25525)Pablo Galindo2021-04-231-0/+25
| | | | | | | | | | | | | | | | | To improve the user experience understanding what part of the error messages associated with SyntaxErrors is wrong, we can highlight the whole error range and not only place the caret at the first character. In this way: >>> foo(x, z for z in range(10), t, w) File "<stdin>", line 1 foo(x, z for z in range(10), t, w) ^ SyntaxError: Generator expression must be parenthesized becomes >>> foo(x, z for z in range(10), t, w) File "<stdin>", line 1 foo(x, z for z in range(10), t, w) ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Generator expression must be parenthesized
* bpo-43868: Remove PyOS_ReadlineFunctionPointer from the stable ABI list ↵Petr Viktorin2021-04-231-0/+6
| | | | | | | | | | | (GH-25442) The inclusion of PyOS_ReadlineFunctionPointer in python3dll.c was a mistake. According to PEP 384: > functions expecting FILE* are not part of the ABI, to avoid depending > on a specific version of the Microsoft C runtime DLL on Windows. https://bugs.python.org/issue43868
* bpo-37751: Document codecs.lookup() change in What's New in Python 3.9 ↵Hai Shi2021-04-231-0/+6
| | | | (GH-23096)
* bpo-28724: Doc: Move socket.send_fds and socket.recv_fds docs to right ↵Saiyang Gou2021-04-221-1/+1
| | | | section (GH-22608)
* doc: Sync some missing 3.10 changes with the What's New (GH-25503)Batuhan Taskaya2021-04-211-1/+27
| | | Automerge-Triggered-By: GH:isidentical
* Fix typo in whatsnew/3.10.rst (GH-25498)JunWei Song2021-04-211-2/+2
|
* bpo-43859: Improve the error message for IndentationError exceptions (GH-25431)Pablo Galindo2021-04-211-0/+17
|
* bpo-38605: Revert making 'from __future__ import annotations' the default ↵Pablo Galindo2021-04-211-16/+0
| | | | | | (GH-25490) This reverts commits 044a1048ca93d466965afc027b91a5a9eb9ce23c and 1be456ae9d53bb1cba2b24fc86175c282d1c2169, adapting the code to changes that happened after it.
* Small changes to the section about SyntaxErrors in the 3.10 What's New ↵Pablo Galindo2021-04-171-58/+70
| | | | document (GH-25461)
* bpo-43669: PEP 644: Require OpenSSL 1.1.1 or newer (GH-23014)Christian Heimes2021-04-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | - Remove HAVE_X509_VERIFY_PARAM_SET1_HOST check - Update hashopenssl to require OpenSSL 1.1.1 - multissltests only OpenSSL > 1.1.0 - ALPN is always supported - SNI is always supported - Remove deprecated NPN code. Python wrappers are no-op. - ECDH is always supported - Remove OPENSSL_VERSION_1_1 macro - Remove locking callbacks - Drop PY_OPENSSL_1_1_API macro - Drop HAVE_SSL_CTX_CLEAR_OPTIONS macro - SSL_CTRL_GET_MAX_PROTO_VERSION is always defined now - security level is always available now - get_num_tickets is available with TLS 1.3 - X509_V_ERR MISMATCH is always available now - Always set SSL_MODE_RELEASE_BUFFERS - X509_V_FLAG_TRUSTED_FIRST is always available - get_ciphers is always supported - SSL_CTX_set_keylog_callback is always available - Update Modules/Setup with static link example - Mention PEP in whatsnew - Drop 1.0.2 and 1.1.0 from GHA tests
* Improve the section with SyntaxError message improvements to the What's New ↵Pablo Galindo2021-04-161-2/+91
| | | | of 3.10 (GH-25428)
* Fix typo in 3.10's What's New documentation (GH-25409)Zackery Spytz2021-04-141-1/+1
| | | "occured" -> "occurred"
* bpo-38530: Offer suggestions on NameError (GH-25397)Pablo Galindo2021-04-141-0/+17
| | | | | | | | | | | When printing NameError raised by the interpreter, PyErr_Display will offer suggestions of simmilar variable names in the function that the exception was raised from: >>> schwarzschild_black_hole = None >>> schwarschild_black_hole Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'schwarschild_black_hole' is not defined. Did you mean: schwarzschild_black_hole?
* Fix typo in the What's New for 3.10 (GH-25396)Pablo Galindo2021-04-141-1/+1
|
* bpo-43712 : fileinput: Add encoding parameter (GH-25272)Inada Naoki2021-04-141-0/+11
|
* bpo-38530: Offer suggestions on AttributeError (#16856)Pablo Galindo2021-04-141-2/+22
| | | | | | | | | When printing AttributeError, PyErr_Display will offer suggestions of similar attribute names in the object that the exception was raised from: >>> collections.namedtoplo Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'collections' has no attribute 'namedtoplo'. Did you mean: namedtuple?
* bpo-43080: pprint for dataclass instances (GH-24389)Lewis Gaul2021-04-131-0/+6
| | | * Added pprint support for dataclass instances which don't have a custom __repr__.
* bpo-43785: Update bz2 document (GH-25351)Inada Naoki2021-04-131-0/+5
|
* bpo-43774: Add more links to configure options (GH-25363)Victor Stinner2021-04-122-14/+15
|
* bpo-43723: Deprecate camelCase aliases from threading (GH-25174)Jelle Zijlstra2021-04-121-0/+21
| | | | | | The snake_case names have existed since Python 2.6, so there is no reason to keep the old camelCase names around. One similar method, threading.Thread.isAlive, was already removed in Python 3.9 (bpo-37804).
* bpo-43682: Make staticmethod objects callable (GH-25117)Victor Stinner2021-04-111-0/+1
| | | Static methods (@staticmethod) are now callable as regular functions.
* bpo-43783: Add ParamSpecArgs/Kwargs (GH-25298)Jelle Zijlstra2021-04-111-2/+4
|
* Fix typo about line number in the 3.10 What's New document (GH-25328)Antti Haapala2021-04-111-1/+1
| | | This was a typo copied from PEP 626.
* bpo-43753: Add Py_Is() and Py_IsNone() functions (GH-25227)Victor Stinner2021-04-101-0/+7
| | | | | | | Add the Py_Is(x, y) function to test if the 'x' object is the 'y' object, the same as "x is y" in Python. Add also the Py_IsNone(), Py_IsTrue(), Py_IsFalse() functions to test if an object is, respectively, the None singleton, the True singleton or the False singleton.
* bpo-43682: @staticmethod inherits attributes (GH-25268)Victor Stinner2021-04-091-0/+6
| | | | | | | | | | Static methods (@staticmethod) and class methods (@classmethod) now inherit the method attributes (__module__, __name__, __qualname__, __doc__, __annotations__) and have a new __wrapped__ attribute. Changes: * Add a repr() method to staticmethod and classmethod types. * Add tests on the @classmethod decorator.
* bpo-43774: Document configure options (GH-25283)Victor Stinner2021-04-085-11/+12
| | | | | | Add Doc/using/configure.rst documentation to document configure, preprocessor, compiler and linker options. Add a new section about the "Python debug build".
* bpo-43755: Update docs to reflect that lambda is not allowed in `comp_if` ↵Saiyang Gou2021-04-061-0/+4
| | | | since 3.9 (GH-25231)
* bpo-42135: Deprecate implementations of find_module() and find_loader() ↵Brett Cannon2021-04-061-0/+33
| | | | (GH-25169)
* bpo-41870: Update What's News 3.10 about vectorcall (#25219)Dong-hee Na2021-04-061-0/+4
| | | | | | | | | | | * bpo-41870: Update What's News 3.10 about vectorcall * update * Update Doc/whatsnew/3.10.rst Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-43672: raise ImportWarning when calling find_loader() (GH-25119)Brett Cannon2021-04-021-1/+7
|
* bpo-31956: Add start and stop parameters to array.index() (GH-25059)Zackery Spytz2021-04-021-0/+7
| | | Co-Authored-By: Anders Lorentsen <Phaqui@gmail.com>
* bpo-43688: Support the limited C API in debug mode (GH-25131)Victor Stinner2021-04-021-0/+12
| | | | | | | | | | | | | The limited C API is now supported if Python is built in debug mode (if the Py_DEBUG macro is defined). In the limited C API, the Py_INCREF() and Py_DECREF() functions are now implemented as opaque function calls, rather than accessing directly the PyObject.ob_refcnt member, if Python is built in debug mode and the Py_LIMITED_API macro targets Python 3.10 or newer. It became possible to support the limited C API in debug mode because the PyObject structure is the same in release and debug mode since Python 3.8 (see bpo-36465). The limited C API is still not supported in the --with-trace-refs special build (Py_TRACE_REFS macro).
* Fix typos in 3.10 "What's new" (GH-25104)Don Kirkby2021-04-011-4/+4
|
* bpo-40066: Enum: modify `repr()` and `str()` (GH-22392)Ethan Furman2021-03-311-0/+8
| | | | | | | | | * Enum: streamline repr() and str(); improve docs - repr() is now ``enum_class.member_name`` - stdlib global enums are ``module_name.member_name`` - str() is now ``member_name`` - add HOW-TO section for ``Enum`` - change main documentation to be an API reference
* bpo-42134: Raise ImportWarning when calling find_module() in the import ↵Brett Cannon2021-03-301-0/+9
| | | | system (GH-25044)
* bpo-43510: Implement PEP 597 opt-in EncodingWarning. (GH-19481)Inada Naoki2021-03-291-0/+24
| | | | | | | | | | | See [PEP 597](https://www.python.org/dev/peps/pep-0597/). * Add `-X warn_default_encoding` and `PYTHONWARNDEFAULTENCODING`. * Add EncodingWarning * Add io.text_encoding() * open(), TextIOWrapper() emits EncodingWarning when encoding is omitted and warn_default_encoding is enabled. * _pyio.TextIOWrapper() uses UTF-8 as fallback default encoding used when failed to import locale module. (used during building Python) * bz2, configparser, gzip, lzma, pathlib, tempfile modules use io.text_encoding(). * What's new entry
* bpo-42136: Deprecate module_repr() as found in importlib (GH-25022)Brett Cannon2021-03-261-0/+6
|
* "exists" -> "exist" in What's New 3.10 (GH-25019)blopblopy2021-03-251-1/+1
|
* bpo-42137: have ModuleType.__repr__ prefer __spec__ over module_repr() ↵Brett Cannon2021-03-241-0/+6
| | | | | (GH-24953) This is to work towards the removal of the use of module_repr() in Python 3.12 (documented as deprecated since 3.4).
* bpo-43244: Remove the pyarena.h header (GH-25007)Victor Stinner2021-03-241-0/+11
| | | | | | | | | | | | | | | | | | Remove the pyarena.h header file with functions: * PyArena_New() * PyArena_Free() * PyArena_Malloc() * PyArena_AddPyObject() These functions were undocumented, excluded from the limited C API, and were only used internally by the compiler. Add pycore_pyarena.h header. Rename functions: * PyArena_New() => _PyArena_New() * PyArena_Free() => _PyArena_Free() * PyArena_Malloc() => _PyArena_Malloc() * PyArena_AddPyObject() => _PyArena_AddPyObject()
* bpo-43244: Remove parser_interface.h header file (GH-25001)Victor Stinner2021-03-241-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Remove parser functions using the "struct _mod" type, because the AST C API was removed: * PyParser_ASTFromFile() * PyParser_ASTFromFileObject() * PyParser_ASTFromFilename() * PyParser_ASTFromString() * PyParser_ASTFromStringObject() These functions were undocumented and excluded from the limited C API. Add pycore_parser.h internal header file. Rename functions: * PyParser_ASTFromFileObject() => _PyParser_ASTFromFile() * PyParser_ASTFromStringObject() => _PyParser_ASTFromString() These functions are no longer exported (replace PyAPI_FUNC() with extern). Remove also _PyPegen_run_parser_from_file() function. Update test_peg_generator to use _PyPegen_run_parser_from_file_pointer() instead.