summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
Commit message (Collapse)AuthorAgeFilesLines
* gh-77782: Deprecate Py_HasFileSystemDefaultEncoding (#106272)Victor Stinner2023-06-301-0/+1
| | | Deprecate Py_HasFileSystemDefaultEncoding variable.
* gh-106023: Remove _PyObject_FastCall() function (#106265)Victor Stinner2023-06-301-0/+5
|
* gh-106168: PyTuple_SET_ITEM() now checks the index (#106164)Victor Stinner2023-06-281-0/+6
| | | | | | | | | | | | | PyTuple_SET_ITEM() and PyList_SET_ITEM() now check the index argument with an assertion if Python is built in debug mode or is built with assertions. * list_extend() and _PyList_AppendTakeRef() now set the list size before calling PyList_SET_ITEM(). * PyStructSequence_GetItem() and PyStructSequence_SetItem() now check the index argument: must be lesser than REAL_SIZE(op). * PyStructSequence_GET_ITEM() and PyStructSequence_SET_ITEM() are now aliases to PyStructSequence_GetItem() and PyStructSequence_SetItem().
* Revert "GH-96145: Add AttrDict to JSON module for use with object_hook ↵Łukasz Langa2023-06-261-8/+0
| | | | | (#96146)" (#105948) This reverts commit 1f0eafa844bf5a380603d55e8d4b42d8c2a3439d.
* GH-105793: Add follow_symlinks argument to `pathlib.Path.is_dir()` and ↵Barney Gale2023-06-261-3/+4
| | | | | | | `is_file()` (GH-105794) Brings `pathlib.Path.is_dir()` and `in line with `os.DirEntry.is_dir()`, which will be important for implementing generic path walking and globbing. Likewise `is_file()`.
* gh-105927: Deprecate PyWeakref_GetObject() function (#106006)Victor Stinner2023-06-261-1/+9
| | | Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
* gh-106084: Remove old PyObject call aliases (#106085)Victor Stinner2023-06-261-0/+14
| | | | | | | | | | | | | | Remove old aliases which were kept backwards compatibility with Python 3.8: * _PyObject_CallMethodNoArgs() * _PyObject_CallMethodOneArg() * _PyObject_CallOneArg() * _PyObject_FastCallDict() * _PyObject_Vectorcall() * _PyObject_VectorcallMethod() * _PyVectorcall_Function() Update code which used these aliases to use new names.
* GH-89812: Add `pathlib.UnsupportedOperation` (GH-105926)Barney Gale2023-06-221-0/+4
| | | | | | | This new exception type is raised instead of `NotImplementedError` when a path operation is not supported. It can be raised from `Path.readlink()`, `symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a future version of pathlib, it will be raised by `AbstractPath` for these methods and others, such as `AbstractPath.mkdir()` and `unlink()`.
* gh-104212: Explain how to port imp.load_source() (#105978)Victor Stinner2023-06-211-1/+15
| | | | Explain how to port removed imp.load_source() to importlib in What's New in Python 3.12.
* gh-105927: Add PyWeakref_GetRef() function (#105932)Victor Stinner2023-06-211-0/+4
| | | | Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(), PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
* gh-105922: Add PyImport_AddModuleRef() function (#105923)Victor Stinner2023-06-201-0/+5
| | | | | | * Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and PyImport_AddModuleObject(). * pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with PyImport_AddModuleRef(name).
* gh-104212: Explain how to port imp code to importlib (#105905)Victor Stinner2023-06-191-1/+32
|
* gh-105875: Require SQLite 3.15.2 or newer (#105876)Erlend E. Aasland2023-06-181-0/+3
| | | SQLite 3.15.2 was released 2016-11-28.
* gh-105570: Deprecate unusual ways of creating empty TypedDicts (#105780)Alex Waygood2023-06-141-6/+9
| | | Deprecate two methods of creating typing.TypedDict classes with 0 fields using the functional syntax: `TD = TypedDict("TD")` and `TD = TypedDict("TD", None)`. Both will be disallowed in Python 3.15. To create a TypedDict class with 0 fields, either use `class TD(TypedDict): pass` or `TD = TypedDict("TD", {})`.
* gh-105566: Deprecate unusual ways of creating `typing.NamedTuple` classes ↵Alex Waygood2023-06-141-0/+11
| | | | | | | (#105609) Deprecate creating a typing.NamedTuple class using keyword arguments to denote the fields (`NT = NamedTuple("NT", x=int, y=str)`). This will be disallowed in Python 3.15. Use the class-based syntax or the functional syntax instead. Two methods of creating `NamedTuple` classes with 0 fields using the functional syntax are also deprecated, and will be disallowed in Python 3.15: `NT = NamedTuple("NT")` and `NT = NamedTuple("NT", None)`. To create a `NamedTuple` class with 0 fields, either use `class NT(NamedTuple): pass` or `NT = NamedTuple("NT", [])`.
* gh-104873: Add typing.get_protocol_members and typing.is_protocol (#104878)Jelle Zijlstra2023-06-141-0/+8
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-105687: Remove deprecated objects from `re` module (#105688)Nikita Sobolev2023-06-141-0/+4
|
* gh-105387: Limited C API implements Py_INCREF() as func (#105388)Victor Stinner2023-06-141-0/+5
| | | | | In the limited C API version 3.12, Py_INCREF() and Py_DECREF() functions are now implemented as opaque function calls to hide implementation details.
* gh-98040: Fix importbench: use types.ModuleType() (#105743)Victor Stinner2023-06-131-0/+2
| | | Replace removed imp.new_module(name) with types.ModuleType(name).
* gh-105733: Deprecate ctypes SetPointerType() and ARRAY() (#105734)Victor Stinner2023-06-131-0/+6
|
* gh-105713: Document that tokenize raises when mixing tabs/spaces (#105723)Lysandros Nikolaou2023-06-131-0/+3
| | | | | | * gh-105713: Document that tokenize raises when mixing tabs/spaces * Update Doc/whatsnew/3.12.rst Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-80480: Emit DeprecationWarning for array's 'u' type code (#95760)Hugo van Kemenade2023-06-111-0/+5
|
* gh-102304: Remove Py_INCREF() doc change (#105552)Victor Stinner2023-06-091-9/+0
| | | | Py_INCREF() was made compatible again with Python 3.9 and older in the limited API of Python debug mode.
* gh-105545: Remove deprecated `MacOSXOSAScript._name` (gh-105546)Nikita Sobolev2023-06-091-0/+5
|
* gh-105396: Deprecate PyImport_ImportModuleNoBlock() function (#105397)Victor Stinner2023-06-091-0/+5
| | | | Deprecate the PyImport_ImportModuleNoBlock() function which is just an alias to PyImport_ImportModule() since Python 3.3.
* gh-105390: Correctly raise TokenError instead of SyntaxError for tokenize ↵Pablo Galindo Salgado2023-06-071-5/+6
| | | | errors (#105399)
* gh-105382: Remove urllib.request cafile parameter (#105384)Victor Stinner2023-06-061-0/+8
| | | | Remove cafile, capath and cadefault parameters of the urllib.request.urlopen() function, deprecated in Python 3.6.
* gh-105376: Remove logging.Logger.warn() method (#105377)Victor Stinner2023-06-061-0/+6
|
* gh-102304: Document Py_INCREF() change in What's New in Python 3.12 (#105389)Victor Stinner2023-06-062-9/+9
| | | Not in Python 3.13.
* gh-104783: Remove locale.resetlocale() function (#104784)Victor Stinner2023-06-062-0/+5
|
* gh-105268: Remove _PyGC_FINALIZED() macro (#105350)Victor Stinner2023-06-061-0/+7
| | | | | Remove the old private, undocumented and untested _PyGC_FINALIZED() macro which was kept for backward compatibility with Python 3.8 and older.
* gh-105292: Add option to make ↵Irit Katriel2023-06-061-0/+7
| | | | | | | traceback.TracebackException.format_exception_only recurse into exception groups (#105294) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763)Victor Stinner2023-06-061-0/+9
| | | | | | | | | | | When Python is built in debug mode (if the Py_REF_DEBUG macro is defined), the Py_INCREF() and Py_DECREF() function are now always implemented as opaque functions to avoid leaking implementation details like the "_Py_RefTotal" variable or the _Py_DecRefTotal_DO_NOT_USE_THIS() function. * Remove _Py_IncRefTotal_DO_NOT_USE_THIS() and _Py_DecRefTotal_DO_NOT_USE_THIS() from the stable ABI. * Remove _Py_NegativeRefcount() from limited C API.
* gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)Victor Stinner2023-06-062-2/+2
| | | | | | | | | * Add "limited-c-api" and "stable-api" references. * Rename "stable-abi-list" reference to "limited-api-list". * Makefile: Document files regenerated by "make regen-limited-abi" * Remove first empty line in generated files: - Lib/test/test_stable_abi_ctypes.py - PC/python3dll.c
* What's New in 3.12: List 'Improved Modules' alphabetically (#105315)Hugo van Kemenade2023-06-051-107/+107
|
* gh-80480: array: Add 'w' typecode. (#105242)Inada Naoki2023-06-041-0/+7
|
* Fix typo in Python 3.12 What's New (#105278)Shantanu2023-06-041-2/+2
|
* gh-85275: Remove old buffer APIs (#105137)Inada Naoki2023-06-021-0/+36
| | | | | They are now abi-only. Co-authored-by: Victor Stinner <vstinner@python.org>
* GH-89886: Bump to GNU Autoconf v2.71 (#104925)Erlend E. Aasland2023-06-012-0/+8
| | | Co-authored-by: Christian Heimes <christian@python.org>
* gh-105145: Deprecate Py_GetPath() function (#105179)Victor Stinner2023-06-011-0/+14
| | | | | | | | | | | | | | Deprecate old Python initialization functions: * PySys_ResetWarnOptions() * Py_GetExecPrefix() * Py_GetPath() * Py_GetPrefix() * Py_GetProgramFullPath() * Py_GetProgramName() * Py_GetPythonHome() _tkinter.c uses sys.executable instead of Py_GetProgramName() and uses sys.prefix instead of Py_GetPrefix().
* gh-105182: Remove PyEval_AcquireLock() and PyEval_InitThreads() (#105183)Victor Stinner2023-06-011-0/+16
| | | | | | | | | | | | Remove functions in the C API: * PyEval_AcquireLock() * PyEval_ReleaseLock() * PyEval_InitThreads() * PyEval_ThreadsInitialized() But keep these functions in the stable ABI. Mention "make regen-limited-abi" in "make regen-all".
* gh-105107: Remove PyCFunction_Call() function (#105181)Victor Stinner2023-06-011-0/+1
| | | | | * Keep the function in the stable ABI. * Add unit tests on PyCFunction_Call() since it remains supported in the stable ABI.
* gh-105145: Remove old functions to config Python init (#105154)Victor Stinner2023-06-011-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the following old functions to configure the Python initialization, deprecated in Python 3.11: * PySys_AddWarnOptionUnicode() * PySys_AddWarnOption() * PySys_AddXOption() * PySys_HasWarnOptions() * PySys_SetArgvEx() * PySys_SetArgv() * PySys_SetPath() * Py_SetPath() * Py_SetProgramName() * Py_SetPythonHome() * Py_SetStandardStreamEncoding() * _Py_SetProgramFullPath() Most of these functions are kept in the stable ABI, except: * Py_SetStandardStreamEncoding() * _Py_SetProgramFullPath() Update Doc/extending/embedding.rst and Doc/extending/extending.rst to use the new PyConfig API. _testembed.c: * check_stdio_details() now sets stdio_encoding and stdio_errors of PyConfig. * Add definitions of functions removed from the API but kept in the stable ABI. * test_init_from_config() and test_init_read_set() now use PyConfig_SetString() instead of PyConfig_SetBytesString(). Remove _Py_ClearStandardStreamEncoding() internal function.
* gh-105156: Deprecate the old Py_UNICODE type in C API (#105157)Victor Stinner2023-06-011-0/+5
| | | | | | | | Deprecate the old Py_UNICODE and PY_UNICODE_TYPE types in the C API: use wchar_t instead. Replace Py_UNICODE with wchar_t in multiple C files. Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* Clarify that error messages are better with PEP 701 (#105150)Pablo Galindo Salgado2023-05-311-0/+25
| | | | Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
* gh-105111: remove deprecated macros Py_TRASHCAN_SAFE_BEGIN and ↵Irit Katriel2023-05-311-0/+34
| | | | Py_TRASHCAN_SAFE_END (#105112)
* gh-104773: cgi: Fix typo in What's New in Python 3.13 (#105139)Victor Stinner2023-05-311-1/+1
|
* gh-105096: Deprecate wave getmarkers() method (#105098)Victor Stinner2023-05-311-0/+4
| | | | | wave: Deprecate the getmark(), setmark() and getmarkers() methods of the Wave_read and Wave_write classes. They will be removed in Python 3.15.
* gh-62948: IOBase finalizer logs close() errors (#105104)Victor Stinner2023-05-311-0/+9
|
* gh-105107: Remove PyEval_CallFunction() function (#105108)Victor Stinner2023-05-311-0/+15
| | | | | | | | | | | | | | Remove 4 functions from the C API, deprecated in Python 3.9: * PyEval_CallObjectWithKeywords() * PyEval_CallObject() * PyEval_CallFunction() * PyEval_CallMethod() Keep 3 functions in the stable ABI: * PyEval_CallObjectWithKeywords() * PyEval_CallFunction() * PyEval_CallMethod()