gh-107732: Mention dir support in importlib.resources docs (#107734)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit 9f0c0a46f0)
Co-authored-by: Shahriar Heidrich <smheidrich@weltenfunktion.de>
GH-90690: Mention removal of ``PRECALL`` in What's New (GH-103910)
(cherry picked from commit f9bd6e49ae)
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Link to PEP sections in What's New in 3.12 (GH-108878)
(cherry picked from commit 7855d325e6)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-97850: Note in py312 whatsnew that `importlib.util.set_loader` and `importlib.util.module_for_loader` have been removed (GH-108719)
Note in py312 whatsnew that `importlib.util.set_loader` and `importlib.util.module_for_loader` have been removed
(cherry picked from commit 013a99a47b)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379)
(cherry picked from commit b6be18812c)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258)
(cherry picked from commit d7202e4879)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-107298: Fix references to deprecated and removed PyUnicode C API (GH-108077)
(cherry picked from commit db55383829)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-107298: Fix some references in the C API documentation (GH-108072)
(cherry picked from commit f51f0466c0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-107263: Increase C stack limit for most functions, except `_PyEval_EvalFrameDefault()` (GH-107535)
* Set C recursion limit to 1500, set cost of eval loop to 2 frames, and compiler mutliply to 2.
(cherry picked from commit fa45958450)
Co-authored-by: Mark Shannon <mark@hotpy.org>
gh-105766: Document that Custom Allocators Must Be Thread-Safe (gh-107519)
(cherry picked from commit db361a340a)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
gh-99113: Add a What's New Entry for PEP 684 (gh-107520)
(cherry picked from commit 79e479c45f)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Declare the following functions as macros, since they are actually
macros. It avoids a warning on "TYPE" or "macro" argument.
* PyMem_New()
* PyMem_Resize()
* PyModule_AddIntMacro()
* PyModule_AddStringMacro()
* PyObject_GC_New()
* PyObject_GC_NewVar()
* PyObject_New()
* PyObject_NewVar()
Add C standard C types to nitpick_ignore in Doc/conf.py:
* int64_t
* uint64_t
* uintptr_t
No longer ignore non existing "__int" type in nitpick_ignore.
Update Doc/tools/.nitignore.
(cherry picked from commit 8d61a71f9c)
Co-authored-by: Victor Stinner <vstinner@python.org>
The "New Modules" section was left in place to ensure that the anchor
link for new modules will still exist:
/whatsnew/3.12.htmlGH-new-modules
/whatsnew/3.10.htmlGH-new-modules
This means that existing links to this section don't break.
(cherry picked from commit 6dbffaed17)
Co-authored-by: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
* [3.12] gh-106948: Add standard external names to nitpick_ignore (GH-106949)
It includes standard C types, macros and variables like "size_t",
"LONG_MAX" and "errno", and standard environment variables like "PATH".
(cherry picked from commit f8b7fe2f26)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Delete 2023-05-31-18-37-57.gh-issue-105156.R4El5V.rst
LINES and COLS referred in curses.update_lines_cols() documentations are
the module variables, not the environment variables.
(cherry picked from commit 26e08dfdd7)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-103968: What's New: Add porting hints for PyType_From with metaclasses (GH-105698)
(cherry picked from commit af5cf1e751)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-102988: Detect email address parsing errors and return empty tuple to indicate the parsing error (old API) (GH-105127)
Detect email address parsing errors and return empty tuple to indicate the parsing error (old API). This fixes or at least ameliorates CVE-2023-27043.
---------
(cherry picked from commit 18dfbd0357)
Co-authored-by: Thomas Dwyer <github@tomd.tel>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gh-105256: What's New note for comprehension over locals() (GH-106378)
(cherry picked from commit 13aefd175e)
Co-authored-by: Carl Meyer <carl@oddbird.net>
Revert "GH-96145: Add AttrDict to JSON module for use with object_hook (GH-96146)" (GH-105948)
This reverts commit 1f0eafa844.
(cherry picked from commit d3af83b934)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
gh-104212: Explain how to port imp.load_source() (GH-105978)
Explain how to port removed imp.load_source() to importlib in What's
New in Python 3.12.
(cherry picked from commit 18a7c86697)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-104212: Explain how to port imp code to importlib (GH-105905)
(cherry picked from commit 7a56a4148c)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-105387: Limited C API implements Py_INCREF() as func (GH-105388)
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.
(cherry picked from commit b542972dc1)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-98040: Fix importbench: use types.ModuleType() (GH-105743)
Replace removed imp.new_module(name) with types.ModuleType(name).
(cherry picked from commit 457a459c78)
Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-102304: Fix Py_INCREF() for limited C API 3.9 (#105550)
When Python is built in debug mode (Py_REF_DEBUG macro), Py_INCREF()
and Py_DECREF() of the limited C API 3.9 (and older) now call
Py_IncRef() and Py_DecRef(), since _Py_IncRef() and _Py_DecRef() were
added to Python 3.10.
(cherry picked from commit 7ba0fd9f87)
* gh-102304: Remove Py_INCREF() doc change (#105552)
Py_INCREF() was made compatible again with Python 3.9 and older in
the limited API of Python debug mode.
(cherry picked from commit 58e4b69f69)