summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
Commit message (Collapse)AuthorAgeFilesLines
* Docs: Remove duplicate `TraversableResources` reference (#101068)scrazzz2023-01-161-1/+0
|
* gh-100160: Restore and deprecate implicit creation of an event loop (GH-100410)Serhiy Storchaka2023-01-132-25/+5
| | | | | | | | | | Partially revert changes made in GH-93453. asyncio.DefaultEventLoopPolicy.get_event_loop() now emits a DeprecationWarning and creates and sets a new event loop instead of raising a RuntimeError if there is no current event loop set. Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
* gh-87447: Fix walrus comprehension rebind checking (#100581)Nikita Sobolev2023-01-081-0/+7
| | | | Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* GH-100485: Tweaks to sumprod() (GH-100857)Raymond Hettinger2023-01-081-0/+6
|
* gh-100700: Remove Date and Release fields in past whatsnews (GH-100728)Zachary Ware2023-01-033-6/+1
|
* gh-94172: Update docs for params removed in 3.12 (#100431)Hugo van Kemenade2022-12-281-3/+5
| | | | Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
* gh-99482: remove `jython` compatibility parts from stdlib and tests (#99484)Nikita Sobolev2022-12-231-0/+3
|
* Fix typo in 3.12 What's New (#100449)Shantanu2022-12-231-1/+1
|
* gh-100344: Add C implementation for `asyncio.current_task` (#100345)Itamar Ostricher2022-12-221-0/+3
| | | Co-authored-by: pranavtbhat
* gh-94912: Added marker for non-standard coroutine function detection (#99247)Carlton Gibson2022-12-181-0/+6
| | | | | This introduces a new decorator `@inspect.markcoroutinefunction`, which, applied to a sync function, makes it appear async to `inspect.iscoroutinefunction()`.
* Docs: Use `PY_VERSION_HEX` for version comparison (#100179)Hugo van Kemenade2022-12-171-1/+1
|
* gh-99087: Add missing newline for prompts in docs (GH-98993)Stanley2022-12-093-0/+5
| | | Add newline for prompts so copying to REPL does not cause errors.
* gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#100070)Victor Stinner2022-12-071-0/+5
| | | | | | | | | | | | | | The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate their arguments once. If an argument has side effects, these side effects are no longer duplicated. Use temporary variables to avoid duplicating side effects of macro arguments. If available, use _Py_TYPEOF() to avoid type punning. Otherwise, use memcpy() for the assignment to prevent a miscompilation with strict aliasing caused by type punning. Add _Py_TYPEOF() macro: __typeof__() on GCC and clang. Add test_py_clear() and test_py_setref() unit tests to _testcapi.
* gh-93453: No longer create an event loop in get_event_loop() (#98440)Serhiy Storchaka2022-12-061-0/+12
| | | | | | | | | | | | | | | asyncio.get_event_loop() now always return either running event loop or the result of get_event_loop_policy().get_event_loop() call. The latter should now raise an RuntimeError if no current event loop was set instead of creating and setting a new event loop. It affects also a number of asyncio functions and constructors which call get_event_loop() implicitly: ensure_future(), shield(), gather(), etc. DeprecationWarning is no longer emitted if there is no running event loop but the current event loop was set. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-100008: Document Python build requirements (#100009)Victor Stinner2022-12-051-1/+1
| | | | Document also configure --without-freelists option added to Python 3.11.
* bpo-15999: Accept arbitrary values for boolean parameters. (#15609)Serhiy Storchaka2022-12-031-0/+4
| | | builtins and extension module functions and methods that expect boolean values for parameters now accept any Python object rather than just a bool or int type. This is more consistent with how native Python code itself behaves.
* GH-91054: Add code object watchers API (GH-99859)Itamar Ostricher2022-12-021-0/+4
| | | | | | * Add API to allow extensions to set callback function on creation and destruction of PyCodeObject Co-authored-by: Ye11ow-Flash <janshah@cs.stonybrook.edu>
* gh-99127: Allow some features of syslog to the main interpreter only (gh-99128)Dong-hee Na2022-11-291-0/+9
|
* whatsnew-3.10: Mention PEP 647 in the Release highlights section. (#99853)Yilei "Dolee" Yang2022-11-291-1/+2
| | | | | Mention PEP 647 in the Release highlights section. Also re-ordered the list so it matches the order in the details sections below.
* Revert "gh-98724: Fix Py_CLEAR() macro side effects" (#99737)Victor Stinner2022-11-241-5/+0
| | | | | Revert "gh-98724: Fix Py_CLEAR() macro side effects (#99100)" This reverts commit c03e05c2e72f3ea5e797389e7d1042eef85ad37a.
* gh-99547: Add isjunction methods for checking if a path is a junction (GH-99548)Charles Machalow2022-11-221-0/+12
|
* gh-47146: Soft-deprecate structmember.h, expose its contents via Python.h ↵Petr Viktorin2022-11-221-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-99014) The ``structmember.h`` header is deprecated, though it continues to be available and there are no plans to remove it. There are no deprecation warnings. Old code can stay unchanged (unless the extra include and non-namespaced macros bother you greatly). Specifically, no uses in CPython are updated -- that would just be unnecessary churn. The ``structmember.h`` header is deprecated, though it continues to be available and there are no plans to remove it. Its contents are now available just by including ``Python.h``, with a ``Py`` prefix added if it was missing: - `PyMemberDef`, `PyMember_GetOne` and`PyMember_SetOne` - Type macros like `Py_T_INT`, `Py_T_DOUBLE`, etc. (previously ``T_INT``, ``T_DOUBLE``, etc.) - The flags `Py_READONLY` (previously ``READONLY``) and `Py_AUDIT_READ` (previously all uppercase) Several items are not exposed from ``Python.h``: - `T_OBJECT` (use `Py_T_OBJECT_EX`) - `T_NONE` (previously undocumented, and pretty quirky) - The macro ``WRITE_RESTRICTED`` which does nothing. - The macros ``RESTRICTED`` and ``READ_RESTRICTED``, equivalents of `Py_AUDIT_READ`. - In some configurations, ``<stddef.h>`` is not included from ``Python.h``. It should be included manually when using ``offsetof()``. The deprecated header continues to provide its original contents under the original names. Your old code can stay unchanged, unless the extra include and non-namespaced macros bother you greatly. There is discussion on the issue to rename `T_PYSSIZET` to `PY_T_SSIZE` or similar. I chose not to do that -- users will probably copy/paste that with any spelling, and not renaming it makes migration docs simpler. Co-Authored-By: Alexander Belopolsky <abalkin@users.noreply.github.com> Co-Authored-By: Matthias Braun <MatzeB@users.noreply.github.com>
* gh-99284: [ctypes] remove `_use_broken_old_ctypes_structure_semantics_` ↵Nikita Sobolev2022-11-191-0/+4
| | | | | (GH-99285) It was untested and undocumented. No code has been found in the wild that ever used it.
* GH-99388: add `loop_factory` parameter to `asyncio.run` (#99462)Kumar Aditya2022-11-141-0/+5
|
* gh-99289: Add COMPILEALL_OPTS to Makefile (#99291)Victor Stinner2022-11-141-0/+6
| | | | | | | | Add COMPILEALL_OPTS variable in Makefile to override compileall options (default: -j0) in "make install". Also merge the compileall commands into a single command building PYC files for the all optimization levels (0, 1, 2) at once. Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-83638: Add sqlite3.Connection.autocommit for PEP 249 compliant behaviour ↵Erlend E. Aasland2022-11-121-0/+7
| | | | | | | | | | (#93823) Introduce the autocommit attribute to Connection and the autocommit parameter to connect() for PEP 249-compliant transaction handling. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* GH-94597: add deprecation warnings for subclassing `AbstractChildWatcher` ↵Kumar Aditya2022-11-121-2/+2
| | | | (#99386)
* gh-98724: Fix Py_CLEAR() macro side effects (#99100)Victor Stinner2022-11-091-0/+5
| | | | | | | The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate their argument once. If an argument has side effects, these side effects are no longer duplicated. Add test_py_clear() and test_py_setref() unit tests to _testcapi.
* gh-91248: Add PyFrame_GetVar() function (#95712)Victor Stinner2022-11-081-0/+4
| | | | | | Add PyFrame_GetVar() and PyFrame_GetVarString() functions to get a frame variable by its name. Move PyFrameObject C API tests from test_capi to test_frame.
* gh-72719: Remove asyncore and asynchat modules (#96580)Nikita Sobolev2022-11-081-0/+6
| | | | | Remove modules asyncore and asynchat, which were deprecated by PEP 594. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-98254: Add what's new entry for the improvement in commit ↵Pablo Galindo Salgado2022-11-071-0/+9
| | | | bb56dead336357153a0c3b8cc9d9d6856d2c5a03 (#99197)
* gh-91058: Add what's new entry for the improvement in commit ↵Pablo Galindo Salgado2022-11-071-0/+10
| | | | 7cfbb49fcd4c85f9bab3797302eadf93df490344 (#99198)
* gh-98586: Add What's New entry and update docs (#99056)Wenzel Jakob2022-11-061-0/+12
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-99139: Improve NameError error suggestion for instances (#99140)Pablo Galindo Salgado2022-11-061-0/+21
|
* gh-92584: Remove the distutils package (#99061)Victor Stinner2022-11-031-0/+8
| | | | | | | | | | | | Remove the distutils package. It was deprecated in Python 3.10 by PEP 632 "Deprecate distutils module". For projects still using distutils and cannot be updated to something else, the setuptools project can be installed: it still provides distutils. * Remove Lib/distutils/ directory * Remove test_distutils * Remove references to distutils * Skip test_check_c_globals and test_peg_generator since they use distutils
* gh-94172: Remove keyfile, certfile and check_hostname parameters (#94173)Victor Stinner2022-11-031-0/+10
| | | | | | | | | | | | Remove the keyfile, certfile and check_hostname parameters, deprecated since Python 3.6, in modules: ftplib, http.client, imaplib, poplib and smtplib. Use the context parameter (ssl_context in imaplib) instead. Parameters following the removed parameters become keyword-only parameters. ftplib: Remove the FTP_TLS.ssl_version class attribute: use the context parameter instead.
* gh-98401: Invalid escape sequences emits SyntaxWarning (#99011)Victor Stinner2022-11-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence), use raw strings for regular expression: re.compile(r"\d+\.\d+"). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. Octal escapes with value larger than 0o377 (ex: "\477"), deprecated in Python 3.11, now produce a SyntaxWarning, instead of DeprecationWarning. In a future Python version they will be eventually a SyntaxError. codecs.escape_decode() and codecs.unicode_escape_decode() are left unchanged: they still emit DeprecationWarning. * The parser only emits SyntaxWarning for Python 3.12 (feature version), and still emits DeprecationWarning on older Python versions. * Fix SyntaxWarning by using raw strings in Tools/c-analyzer/ and wasm_build.py.
* gh-98931: Improve error message when the user types 'import x from y' ↵Pablo Galindo Salgado2022-11-011-0/+12
| | | | instead of 'from y import x' (#98932)
* gh-98658: Add __class_getitem__ to array.array (#98661)Jelle Zijlstra2022-11-011-1/+6
| | | Closes #98658
* gh-84538: add strict argument to pathlib.PurePath.relative_to (GH-19813)domragusa2022-10-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | By default, :meth:`pathlib.PurePath.relative_to` doesn't deal with paths that are not a direct prefix of the other, raising an exception in that instance. This change adds a *walk_up* parameter that can be set to allow for using ``..`` to calculate the relative path. example: ``` >>> p = PurePosixPath('/etc/passwd') >>> p.relative_to('/etc') PurePosixPath('passwd') >>> p.relative_to('/usr') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pathlib.py", line 940, in relative_to raise ValueError(error_message.format(str(self), str(formatted))) ValueError: '/etc/passwd' does not start with '/usr' >>> p.relative_to('/usr', strict=False) PurePosixPath('../etc/passwd') ``` https://bugs.python.org/issue40358 Automerge-Triggered-By: GH:brettcannon
* gh-96143: Improve perf profiler docs (#96445)Erlend E. Aasland2022-10-271-0/+22
|
* docs: Change links to label refs (#98454)Stanley2022-10-263-3/+5
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* fix a typo in whatsnew/3.11 (#98603)July Tikhonov2022-10-251-1/+1
|
* Fix typos in deprecation section of 3.11 What's New (#98628)Jacob Walls2022-10-251-3/+3
|
* gh-95913: Prepare Improved Modules in 3.11 WhatsNew for final edits (#98631)C.A.M. Gerlach2022-10-251-22/+91
| | | | | | | | | * Add two line breaks and ref target labels to remaining subsections * Fix a few out of order Improved Modules * Fix a few minor textual formatting issues in sections * Fix remaining Sphinx warnings in the Improved Modules section
* gh-95913: Fix grammar for SpooledTemporaryFile 3.11 whatsnew entry (#98604)Jelle Zijlstra2022-10-241-1/+1
| | | Followup from #98312.
* gh-95913: Fix, sort & expand pending removal sect in 3.11 WhatsNew (GH-98583)C.A.M. Gerlach2022-10-241-20/+43
| | | | | | | | | | | | * Fix names/references of pending removal APIs * Sort list of APIs pending removal alphabetically * Add missing modules/submodules pending removal in 3.12 * Add table of unittest deprecated aliases to 3.11 What's New Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-95913: Add io support for SpooledTemporaryFile in 3.11 Whatsnew (#98312)C.A.M. Gerlach2022-10-241-0/+13
|
* gh-95913: Edit & expand Deprecated section of 3.11 WhatsNew (#98581)C.A.M. Gerlach2022-10-241-82/+108
| | | | | | | * Refine Sphinx syntax and grammar/phrasing in Deprecated section items * Organize into lang/builtins, modules & stdlib sections * Convert PEP 594 module list into a grid to not waste as much space * Add importlib.resources deprecated functions to section
* gh-95913: Edit, expand & format Bytecode sect in 3.11 WhatsNew (GH-98559)C.A.M. Gerlach2022-10-241-39/+81
|