Python-checkins
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
June 2024
- 1 participants
- 770 discussions
[3.12] gh-121035: Update logging flow chart to include the lastResort handler. (GH-121036) (GH-121105)
by vsajip 27 Jun '24
by vsajip 27 Jun '24
27 Jun '24
https://github.com/python/cpython/commit/a5048ad990bab80ecfba9a9d4557100fc1…
commit: a5048ad990bab80ecfba9a9d4557100fc19b37f4
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: vsajip <vinay_sajip(a)yahoo.co.uk>
date: 2024-06-27T23:20:36+01:00
summary:
[3.12] gh-121035: Update logging flow chart to include the lastResort handler. (GH-121036) (GH-121105)
(cherry picked from commit 237baf4d7a789deb153fbc1fc3863550949d5da2)
files:
A Doc/howto/logging_flow.svg
M Doc/howto/logging.rst
M Doc/howto/logging_flow.png
diff --git a/Doc/howto/logging.rst b/Doc/howto/logging.rst
index 877cb24328c160..a88ba00e7b2f58 100644
--- a/Doc/howto/logging.rst
+++ b/Doc/howto/logging.rst
@@ -381,8 +381,8 @@ Logging Flow
The flow of log event information in loggers and handlers is illustrated in the
following diagram.
-.. image:: logging_flow.png
- :class: invert-in-dark-mode
+.. raw:: html
+ :file: logging_flow.svg
Loggers
^^^^^^^
diff --git a/Doc/howto/logging_flow.png b/Doc/howto/logging_flow.png
index d65e597f811db5..c2d0befe27326c 100644
Binary files a/Doc/howto/logging_flow.png and b/Doc/howto/logging_flow.png differ
diff --git a/Doc/howto/logging_flow.svg b/Doc/howto/logging_flow.svg
new file mode 100644
index 00000000000000..52206bdbcf503b
--- /dev/null
+++ b/Doc/howto/logging_flow.svg
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="22cm" height="23cm" viewBox="1 1 439 446" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <!-- Invert color in dark mode -->
+ <style type="text/css">
+ @media (prefers-color-scheme: dark)
+ {
+ svg {
+ filter: invert(93%) hue-rotate(180deg);
+ background-color: transparent !important;
+ }
+ image {
+ filter: invert(100%) hue-rotate(180deg) saturate(1.25);
+ }
+ }
+ </style>
+
+ <defs/>
+ <g id="Background">
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1.8; stroke-dasharray: 3; stroke: #000000" x="227.504" y="1.91011" width="211.607" height="207.375" rx="0" ry="0"/>
+ <rect style="fill: #000000; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1.2; stroke: #000000" x="230.966" y="5.62454" width="68.4216" height="21.9166" rx="0" ry="0"/>
+ <rect style="fill: #000000; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1.2; stroke: #000000" x="5.27912" y="5.70399" width="68.4216" height="21.9166" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:700" x="17.0649" y="19.0071">
+ <tspan x="17.0649" y="19.0071">Logger flow</tspan>
+ </text>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="81.5533" y="106.469" width="44.45" height="25.9333" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="117.256">
+ <tspan x="103.778" y="117.256">Create</tspan>
+ <tspan x="103.778" y="125.723">LogRecord</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="82.8734" x2="103.778" y2="102.351"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,105.351 101.778,101.351 103.778,102.351 105.778,101.351 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.774" y1="3.65583" x2="103.778" y2="30.3755"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,33.3755 101.778,29.3758 103.778,30.3755 105.778,29.3752 "/>
+ </g>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="164.792" y="43.0505">
+ <tspan x="164.792" y="43.0505"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="236.978" y="43.0505">
+ <tspan x="236.978" y="43.0505"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="144.365" y="10.4604">
+ <tspan x="144.365" y="10.4604">Logging call in user</tspan>
+ <tspan x="144.365" y="18.927">code, e.g.</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="110.837" y="27.4696">
+ <tspan x="110.837" y="27.4696">logging.info(...)</tspan>
+ </text>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="155.62" y1="58.6834" x2="183.943" y2="58.6924"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="186.943,58.6933 182.942,60.6921 183.943,58.6924 182.943,56.6921 "/>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="188.061" y="49.9604" width="24.4" height="17.4667" rx="6" ry="6"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="200.261" y="60.7475">
+ <tspan x="200.261" y="60.7475">Stop</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,162.482 169.307,193.042 103.778,223.603 38.2493,193.042 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="186.629">
+ <tspan x="103.778" y="186.629">Does a filter attached</tspan>
+ <tspan x="103.778" y="195.096">to logger reject the</tspan>
+ <tspan x="103.778" y="203.563">record?</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="132.402" x2="103.778" y2="158.364"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,161.364 101.778,157.364 103.778,158.364 105.778,157.364 "/>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="75.2033" y="249.478" width="57.15" height="34.4" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="260.265">
+ <tspan x="103.778" y="260.265">Pass to</tspan>
+ <tspan x="103.778" y="268.732">handlers of</tspan>
+ <tspan x="103.778" y="277.198">current logger</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,326.569 158.193,352.399 103.778,378.229 49.3637,352.399 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="350.22">
+ <tspan x="103.778" y="350.22">Is propagate true for</tspan>
+ <tspan x="103.778" y="358.686">current logger?</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,399.9 150.573,422.994 103.778,446.087 56.984,422.994 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="420.814">
+ <tspan x="103.778" y="420.814">Is there a parent</tspan>
+ <tspan x="103.778" y="429.281">logger?</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="2.43852" y="295.984" width="63.9" height="26.5909" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="34.3885" y="307.1">
+ <tspan x="34.3885" y="307.1">Set current</tspan>
+ <tspan x="34.3885" y="315.566">logger to parent</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="278.422,240.202 330.96,266.686 278.422,293.169 225.885,266.686 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="278.422" y="264.506">
+ <tspan x="278.422" y="264.506">At least one handler</tspan>
+ <tspan x="278.422" y="272.973">in hierarchy?</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="298.963" y="312.257" width="57.75" height="25.9333" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="327.838" y="323.044">
+ <tspan x="327.838" y="323.044">Use lastResort</tspan>
+ <tspan x="327.838" y="331.511">handler</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,35.7307 373.377,60.8536 320.041,85.9765 266.704,60.8536 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="320.041" y="58.6741">
+ <tspan x="320.041" y="58.6741">Handler enabled for</tspan>
+ <tspan x="320.041" y="67.1407">level of LogRecord?</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,105.448 386.002,135.748 320.041,166.047 254.08,135.748 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="320.041" y="129.335">
+ <tspan x="320.041" y="129.335">Does a filter attached</tspan>
+ <tspan x="320.041" y="137.802">to handler reject the</tspan>
+ <tspan x="320.041" y="146.268">record?</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="409.532" y="52.4436" width="24.4" height="17.4667" rx="6" ry="6"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="421.732" y="63.2307">
+ <tspan x="421.732" y="63.2307">Stop</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="271.091" y="185.519" width="97.9" height="17.4667" rx="6" ry="6"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="320.041" y="196.306">
+ <tspan x="320.041" y="196.306">Emit (includes formatting)</tspan>
+ </text>
+ </g>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:700" x="241.002" y="18.9277">
+ <tspan x="241.002" y="18.9277">Handler flow</tspan>
+ </text>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,34.4935 155.62,58.6834 103.778,82.8734 51.9368,58.6834 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="56.5039">
+ <tspan x="103.778" y="56.5039">Logger enabled for</tspan>
+ <tspan x="103.778" y="64.9705">level of call?</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="223.603" x2="103.778" y2="245.36"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,248.36 101.778,244.36 103.778,245.36 105.778,244.36 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="283.878" x2="103.778" y2="322.451"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,325.451 101.778,321.451 103.778,322.451 105.778,321.451 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="378.229" x2="103.778" y2="395.782"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,398.782 101.778,394.782 103.778,395.782 105.778,394.782 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="56.984,422.994 34.3885,422.994 34.3885,326.693 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="34.3885,323.693 36.3885,327.693 34.3885,326.693 32.3885,327.693 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="34.3885,295.984 34.3885,266.678 71.0853,266.678 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="74.0853,266.678 70.0853,268.678 71.0853,266.678 70.0853,264.678 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="150.573,422.994 200.261,422.994 200.261,71.5451 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="200.261,68.5451 202.261,72.5451 200.261,71.5451 198.261,72.5451 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" x1="132.353" y1="266.678" x2="221.767" y2="266.685"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="224.767,266.686 220.766,268.685 221.767,266.685 220.767,264.685 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" points="278.422,293.169 278.422,325.224 294.845,325.224 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="297.845,325.224 293.845,327.224 294.845,325.224 293.845,323.224 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="169.307,193.042 200.261,193.042 200.261,71.5451 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="200.261,68.5451 202.261,72.5451 200.261,71.5451 198.261,72.5451 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="158.193,352.399 200.261,352.399 200.261,71.5451 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="200.261,68.5451 202.261,72.5451 200.261,71.5451 198.261,72.5451 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="319.981" y1="4.27261" x2="320.033" y2="31.6127"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.039,34.6127 318.031,30.6165 320.033,31.6127 322.031,30.6089 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="320.041" y1="85.9765" x2="320.041" y2="101.33"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,104.33 318.041,100.33 320.041,101.33 322.041,100.33 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="320.041" y1="166.047" x2="320.041" y2="181.401"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,184.401 318.041,180.401 320.041,181.401 322.041,180.401 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="386.002,135.748 421.732,135.748 421.732,74.0283 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="421.732,71.0283 423.732,75.0283 421.732,74.0283 419.732,75.0283 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="373.377" y1="60.8536" x2="405.415" y2="61.1401"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="408.414,61.1669 404.397,63.1311 405.415,61.1401 404.433,59.1312 "/>
+ </g>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="164.96" y="55.5649">
+ <tspan x="164.96" y="55.5649">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="106.571" y="97.8453">
+ <tspan x="106.571" y="97.8453">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="173.856" y="188.452">
+ <tspan x="173.856" y="188.452">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="107.446" y="239.221">
+ <tspan x="107.446" y="239.221">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="174.731" y="349.418">
+ <tspan x="174.731" y="349.418">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="106.571" y="390.507">
+ <tspan x="106.571" y="390.507">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="39.4722" y="417.667">
+ <tspan x="39.4722" y="417.667">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="174.731" y="417.667">
+ <tspan x="174.731" y="417.667">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="281.451" y="313.406">
+ <tspan x="281.451" y="313.406">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.909" y="263.96">
+ <tspan x="333.909" y="263.96">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="385.766" y="56.9098">
+ <tspan x="385.766" y="56.9098">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="397.102" y="130.471">
+ <tspan x="397.102" y="130.471">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="323.563" y="178.785">
+ <tspan x="323.563" y="178.785">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="323.75" y="99.0042">
+ <tspan x="323.75" y="99.0042">Yes</tspan>
+ </text>
+ <text font-size="6.77323" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="355.762" y="18.2449">
+ <tspan x="355.762" y="18.2449">LogRecord passed</tspan>
+ <tspan x="355.762" y="26.7116">to handler</tspan>
+ </text>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" x1="330.96" y1="266.686" x2="377.733" y2="267.908"/>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" points="356.713,325.224 377.733,325.224 377.733,214.711 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="377.733,211.711 379.733,215.711 377.733,214.711 375.733,215.711 "/>
+ </g>
+ </g>
+</svg>
1
0
[3.13] gh-120837: Update _Py_DumpExtensionModules to be async-signal-safe (gh-121051) (gh-121107)
by corona10 27 Jun '24
by corona10 27 Jun '24
27 Jun '24
https://github.com/python/cpython/commit/d5441f6aacc1eab69ad539445568a2ef77…
commit: d5441f6aacc1eab69ad539445568a2ef779cb267
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: corona10 <donghee.na92(a)gmail.com>
date: 2024-06-27T22:12:12Z
summary:
[3.13] gh-120837: Update _Py_DumpExtensionModules to be async-signal-safe (gh-121051) (gh-121107)
gh-120837: Update _Py_DumpExtensionModules to be async-signal-safe (gh-121051)
(cherry picked from commit 1a2e7a747540f74414e7c50556bcb2cc127e9d1c)
Co-authored-by: Donghee Na <donghee.na(a)python.org>
files:
M Python/pylifecycle.c
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index af9d4edde1525a..13bd62da4d0484 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -3036,6 +3036,30 @@ fatal_error_exit(int status)
}
}
+static inline int
+acquire_dict_lock_for_dump(PyObject *obj)
+{
+#ifdef Py_GIL_DISABLED
+ PyMutex *mutex = &obj->ob_mutex;
+ if (_PyMutex_LockTimed(mutex, 0, 0) == PY_LOCK_ACQUIRED) {
+ return 1;
+ }
+ return 0;
+#else
+ return 1;
+#endif
+}
+
+static inline void
+release_dict_lock_for_dump(PyObject *obj)
+{
+#ifdef Py_GIL_DISABLED
+ PyMutex *mutex = &obj->ob_mutex;
+ // We can not call PyMutex_Unlock because it's not async-signal-safe.
+ // So not to wake up other threads, we just use a simple atomic store in here.
+ _Py_atomic_store_uint8(&mutex->_bits, _Py_UNLOCKED);
+#endif
+}
// Dump the list of extension modules of sys.modules, excluding stdlib modules
// (sys.stdlib_module_names), into fd file descriptor.
@@ -3063,13 +3087,18 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp)
PyObject *stdlib_module_names = NULL;
if (interp->sysdict != NULL) {
pos = 0;
- while (PyDict_Next(interp->sysdict, &pos, &key, &value)) {
+ if (!acquire_dict_lock_for_dump(interp->sysdict)) {
+ // If we cannot acquire the lock, just don't dump the list of extension modules.
+ return;
+ }
+ while (_PyDict_Next(interp->sysdict, &pos, &key, &value, NULL)) {
if (PyUnicode_Check(key)
&& PyUnicode_CompareWithASCIIString(key, "stdlib_module_names") == 0) {
stdlib_module_names = value;
break;
}
}
+ release_dict_lock_for_dump(interp->sysdict);
}
// If we failed to get sys.stdlib_module_names or it's not a frozenset,
// don't exclude stdlib modules.
@@ -3081,7 +3110,11 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp)
int header = 1;
Py_ssize_t count = 0;
pos = 0;
- while (PyDict_Next(modules, &pos, &key, &value)) {
+ if (!acquire_dict_lock_for_dump(modules)) {
+ // If we cannot acquire the lock, just don't dump the list of extension modules.
+ return;
+ }
+ while (_PyDict_Next(modules, &pos, &key, &value, NULL)) {
if (!PyUnicode_Check(key)) {
continue;
}
@@ -3122,6 +3155,7 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp)
_Py_DumpASCII(fd, key);
count++;
}
+ release_dict_lock_for_dump(modules);
if (count) {
PUTS(fd, " (total: ");
1
0
[3.13] gh-121035: Update logging flow chart to include the lastResort handler. (GH-121036) (GH-121106)
by vsajip 27 Jun '24
by vsajip 27 Jun '24
27 Jun '24
https://github.com/python/cpython/commit/49a01d6290631ef65da6cd142df41c72a7…
commit: 49a01d6290631ef65da6cd142df41c72a7dae3b5
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: vsajip <vinay_sajip(a)yahoo.co.uk>
date: 2024-06-27T22:59:19+01:00
summary:
[3.13] gh-121035: Update logging flow chart to include the lastResort handler. (GH-121036) (GH-121106)
(cherry picked from commit 237baf4d7a789deb153fbc1fc3863550949d5da2)
files:
A Doc/howto/logging_flow.svg
M Doc/howto/logging.rst
M Doc/howto/logging_flow.png
diff --git a/Doc/howto/logging.rst b/Doc/howto/logging.rst
index cf5b693d8e3851..316b16aa796af4 100644
--- a/Doc/howto/logging.rst
+++ b/Doc/howto/logging.rst
@@ -382,8 +382,8 @@ Logging Flow
The flow of log event information in loggers and handlers is illustrated in the
following diagram.
-.. image:: logging_flow.png
- :class: invert-in-dark-mode
+.. raw:: html
+ :file: logging_flow.svg
Loggers
^^^^^^^
diff --git a/Doc/howto/logging_flow.png b/Doc/howto/logging_flow.png
index d65e597f811db5..c2d0befe27326c 100644
Binary files a/Doc/howto/logging_flow.png and b/Doc/howto/logging_flow.png differ
diff --git a/Doc/howto/logging_flow.svg b/Doc/howto/logging_flow.svg
new file mode 100644
index 00000000000000..52206bdbcf503b
--- /dev/null
+++ b/Doc/howto/logging_flow.svg
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="22cm" height="23cm" viewBox="1 1 439 446" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <!-- Invert color in dark mode -->
+ <style type="text/css">
+ @media (prefers-color-scheme: dark)
+ {
+ svg {
+ filter: invert(93%) hue-rotate(180deg);
+ background-color: transparent !important;
+ }
+ image {
+ filter: invert(100%) hue-rotate(180deg) saturate(1.25);
+ }
+ }
+ </style>
+
+ <defs/>
+ <g id="Background">
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1.8; stroke-dasharray: 3; stroke: #000000" x="227.504" y="1.91011" width="211.607" height="207.375" rx="0" ry="0"/>
+ <rect style="fill: #000000; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1.2; stroke: #000000" x="230.966" y="5.62454" width="68.4216" height="21.9166" rx="0" ry="0"/>
+ <rect style="fill: #000000; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1.2; stroke: #000000" x="5.27912" y="5.70399" width="68.4216" height="21.9166" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:700" x="17.0649" y="19.0071">
+ <tspan x="17.0649" y="19.0071">Logger flow</tspan>
+ </text>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="81.5533" y="106.469" width="44.45" height="25.9333" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="117.256">
+ <tspan x="103.778" y="117.256">Create</tspan>
+ <tspan x="103.778" y="125.723">LogRecord</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="82.8734" x2="103.778" y2="102.351"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,105.351 101.778,101.351 103.778,102.351 105.778,101.351 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.774" y1="3.65583" x2="103.778" y2="30.3755"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,33.3755 101.778,29.3758 103.778,30.3755 105.778,29.3752 "/>
+ </g>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="164.792" y="43.0505">
+ <tspan x="164.792" y="43.0505"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="236.978" y="43.0505">
+ <tspan x="236.978" y="43.0505"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="144.365" y="10.4604">
+ <tspan x="144.365" y="10.4604">Logging call in user</tspan>
+ <tspan x="144.365" y="18.927">code, e.g.</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="110.837" y="27.4696">
+ <tspan x="110.837" y="27.4696">logging.info(...)</tspan>
+ </text>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="155.62" y1="58.6834" x2="183.943" y2="58.6924"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="186.943,58.6933 182.942,60.6921 183.943,58.6924 182.943,56.6921 "/>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="188.061" y="49.9604" width="24.4" height="17.4667" rx="6" ry="6"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="200.261" y="60.7475">
+ <tspan x="200.261" y="60.7475">Stop</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,162.482 169.307,193.042 103.778,223.603 38.2493,193.042 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="186.629">
+ <tspan x="103.778" y="186.629">Does a filter attached</tspan>
+ <tspan x="103.778" y="195.096">to logger reject the</tspan>
+ <tspan x="103.778" y="203.563">record?</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="132.402" x2="103.778" y2="158.364"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,161.364 101.778,157.364 103.778,158.364 105.778,157.364 "/>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="75.2033" y="249.478" width="57.15" height="34.4" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="260.265">
+ <tspan x="103.778" y="260.265">Pass to</tspan>
+ <tspan x="103.778" y="268.732">handlers of</tspan>
+ <tspan x="103.778" y="277.198">current logger</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,326.569 158.193,352.399 103.778,378.229 49.3637,352.399 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="350.22">
+ <tspan x="103.778" y="350.22">Is propagate true for</tspan>
+ <tspan x="103.778" y="358.686">current logger?</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,399.9 150.573,422.994 103.778,446.087 56.984,422.994 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="420.814">
+ <tspan x="103.778" y="420.814">Is there a parent</tspan>
+ <tspan x="103.778" y="429.281">logger?</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="2.43852" y="295.984" width="63.9" height="26.5909" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="34.3885" y="307.1">
+ <tspan x="34.3885" y="307.1">Set current</tspan>
+ <tspan x="34.3885" y="315.566">logger to parent</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="278.422,240.202 330.96,266.686 278.422,293.169 225.885,266.686 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="278.422" y="264.506">
+ <tspan x="278.422" y="264.506">At least one handler</tspan>
+ <tspan x="278.422" y="272.973">in hierarchy?</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="298.963" y="312.257" width="57.75" height="25.9333" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="327.838" y="323.044">
+ <tspan x="327.838" y="323.044">Use lastResort</tspan>
+ <tspan x="327.838" y="331.511">handler</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,35.7307 373.377,60.8536 320.041,85.9765 266.704,60.8536 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="320.041" y="58.6741">
+ <tspan x="320.041" y="58.6741">Handler enabled for</tspan>
+ <tspan x="320.041" y="67.1407">level of LogRecord?</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,105.448 386.002,135.748 320.041,166.047 254.08,135.748 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="320.041" y="129.335">
+ <tspan x="320.041" y="129.335">Does a filter attached</tspan>
+ <tspan x="320.041" y="137.802">to handler reject the</tspan>
+ <tspan x="320.041" y="146.268">record?</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="409.532" y="52.4436" width="24.4" height="17.4667" rx="6" ry="6"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="421.732" y="63.2307">
+ <tspan x="421.732" y="63.2307">Stop</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="271.091" y="185.519" width="97.9" height="17.4667" rx="6" ry="6"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="320.041" y="196.306">
+ <tspan x="320.041" y="196.306">Emit (includes formatting)</tspan>
+ </text>
+ </g>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:700" x="241.002" y="18.9277">
+ <tspan x="241.002" y="18.9277">Handler flow</tspan>
+ </text>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,34.4935 155.62,58.6834 103.778,82.8734 51.9368,58.6834 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="56.5039">
+ <tspan x="103.778" y="56.5039">Logger enabled for</tspan>
+ <tspan x="103.778" y="64.9705">level of call?</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="223.603" x2="103.778" y2="245.36"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,248.36 101.778,244.36 103.778,245.36 105.778,244.36 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="283.878" x2="103.778" y2="322.451"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,325.451 101.778,321.451 103.778,322.451 105.778,321.451 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="378.229" x2="103.778" y2="395.782"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,398.782 101.778,394.782 103.778,395.782 105.778,394.782 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="56.984,422.994 34.3885,422.994 34.3885,326.693 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="34.3885,323.693 36.3885,327.693 34.3885,326.693 32.3885,327.693 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="34.3885,295.984 34.3885,266.678 71.0853,266.678 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="74.0853,266.678 70.0853,268.678 71.0853,266.678 70.0853,264.678 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="150.573,422.994 200.261,422.994 200.261,71.5451 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="200.261,68.5451 202.261,72.5451 200.261,71.5451 198.261,72.5451 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" x1="132.353" y1="266.678" x2="221.767" y2="266.685"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="224.767,266.686 220.766,268.685 221.767,266.685 220.767,264.685 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" points="278.422,293.169 278.422,325.224 294.845,325.224 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="297.845,325.224 293.845,327.224 294.845,325.224 293.845,323.224 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="169.307,193.042 200.261,193.042 200.261,71.5451 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="200.261,68.5451 202.261,72.5451 200.261,71.5451 198.261,72.5451 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="158.193,352.399 200.261,352.399 200.261,71.5451 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="200.261,68.5451 202.261,72.5451 200.261,71.5451 198.261,72.5451 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="319.981" y1="4.27261" x2="320.033" y2="31.6127"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.039,34.6127 318.031,30.6165 320.033,31.6127 322.031,30.6089 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="320.041" y1="85.9765" x2="320.041" y2="101.33"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,104.33 318.041,100.33 320.041,101.33 322.041,100.33 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="320.041" y1="166.047" x2="320.041" y2="181.401"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,184.401 318.041,180.401 320.041,181.401 322.041,180.401 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="386.002,135.748 421.732,135.748 421.732,74.0283 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="421.732,71.0283 423.732,75.0283 421.732,74.0283 419.732,75.0283 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="373.377" y1="60.8536" x2="405.415" y2="61.1401"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="408.414,61.1669 404.397,63.1311 405.415,61.1401 404.433,59.1312 "/>
+ </g>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="164.96" y="55.5649">
+ <tspan x="164.96" y="55.5649">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="106.571" y="97.8453">
+ <tspan x="106.571" y="97.8453">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="173.856" y="188.452">
+ <tspan x="173.856" y="188.452">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="107.446" y="239.221">
+ <tspan x="107.446" y="239.221">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="174.731" y="349.418">
+ <tspan x="174.731" y="349.418">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="106.571" y="390.507">
+ <tspan x="106.571" y="390.507">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="39.4722" y="417.667">
+ <tspan x="39.4722" y="417.667">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="174.731" y="417.667">
+ <tspan x="174.731" y="417.667">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="281.451" y="313.406">
+ <tspan x="281.451" y="313.406">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.909" y="263.96">
+ <tspan x="333.909" y="263.96">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="385.766" y="56.9098">
+ <tspan x="385.766" y="56.9098">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="397.102" y="130.471">
+ <tspan x="397.102" y="130.471">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="323.563" y="178.785">
+ <tspan x="323.563" y="178.785">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="323.75" y="99.0042">
+ <tspan x="323.75" y="99.0042">Yes</tspan>
+ </text>
+ <text font-size="6.77323" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="355.762" y="18.2449">
+ <tspan x="355.762" y="18.2449">LogRecord passed</tspan>
+ <tspan x="355.762" y="26.7116">to handler</tspan>
+ </text>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" x1="330.96" y1="266.686" x2="377.733" y2="267.908"/>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" points="356.713,325.224 377.733,325.224 377.733,214.711 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="377.733,211.711 379.733,215.711 377.733,214.711 375.733,215.711 "/>
+ </g>
+ </g>
+</svg>
1
0
gh-120837: Update _Py_DumpExtensionModules to be async-signal-safe (gh-121051)
by corona10 27 Jun '24
by corona10 27 Jun '24
27 Jun '24
https://github.com/python/cpython/commit/1a2e7a747540f74414e7c50556bcb2cc12…
commit: 1a2e7a747540f74414e7c50556bcb2cc127e9d1c
branch: main
author: Donghee Na <donghee.na(a)python.org>
committer: corona10 <donghee.na92(a)gmail.com>
date: 2024-06-28T06:46:46+09:00
summary:
gh-120837: Update _Py_DumpExtensionModules to be async-signal-safe (gh-121051)
files:
M Python/pylifecycle.c
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 9bbfa831db317b..39eaa86098b2e5 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -3035,6 +3035,30 @@ fatal_error_exit(int status)
}
}
+static inline int
+acquire_dict_lock_for_dump(PyObject *obj)
+{
+#ifdef Py_GIL_DISABLED
+ PyMutex *mutex = &obj->ob_mutex;
+ if (_PyMutex_LockTimed(mutex, 0, 0) == PY_LOCK_ACQUIRED) {
+ return 1;
+ }
+ return 0;
+#else
+ return 1;
+#endif
+}
+
+static inline void
+release_dict_lock_for_dump(PyObject *obj)
+{
+#ifdef Py_GIL_DISABLED
+ PyMutex *mutex = &obj->ob_mutex;
+ // We can not call PyMutex_Unlock because it's not async-signal-safe.
+ // So not to wake up other threads, we just use a simple atomic store in here.
+ _Py_atomic_store_uint8(&mutex->_bits, _Py_UNLOCKED);
+#endif
+}
// Dump the list of extension modules of sys.modules, excluding stdlib modules
// (sys.stdlib_module_names), into fd file descriptor.
@@ -3062,13 +3086,18 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp)
PyObject *stdlib_module_names = NULL;
if (interp->sysdict != NULL) {
pos = 0;
- while (PyDict_Next(interp->sysdict, &pos, &key, &value)) {
+ if (!acquire_dict_lock_for_dump(interp->sysdict)) {
+ // If we cannot acquire the lock, just don't dump the list of extension modules.
+ return;
+ }
+ while (_PyDict_Next(interp->sysdict, &pos, &key, &value, NULL)) {
if (PyUnicode_Check(key)
&& PyUnicode_CompareWithASCIIString(key, "stdlib_module_names") == 0) {
stdlib_module_names = value;
break;
}
}
+ release_dict_lock_for_dump(interp->sysdict);
}
// If we failed to get sys.stdlib_module_names or it's not a frozenset,
// don't exclude stdlib modules.
@@ -3080,7 +3109,11 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp)
int header = 1;
Py_ssize_t count = 0;
pos = 0;
- while (PyDict_Next(modules, &pos, &key, &value)) {
+ if (!acquire_dict_lock_for_dump(modules)) {
+ // If we cannot acquire the lock, just don't dump the list of extension modules.
+ return;
+ }
+ while (_PyDict_Next(modules, &pos, &key, &value, NULL)) {
if (!PyUnicode_Check(key)) {
continue;
}
@@ -3121,6 +3154,7 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp)
_Py_DumpASCII(fd, key);
count++;
}
+ release_dict_lock_for_dump(modules);
if (count) {
PUTS(fd, " (total: ");
1
0
gh-121035: Update logging flow chart to include the lastResort handler. (GH-121036)
by vsajip 27 Jun '24
by vsajip 27 Jun '24
27 Jun '24
https://github.com/python/cpython/commit/237baf4d7a789deb153fbc1fc386355094…
commit: 237baf4d7a789deb153fbc1fc3863550949d5da2
branch: main
author: Alexander Bessman <bessman(a)users.noreply.github.com>
committer: vsajip <vinay_sajip(a)yahoo.co.uk>
date: 2024-06-27T22:11:40+01:00
summary:
gh-121035: Update logging flow chart to include the lastResort handler. (GH-121036)
files:
A Doc/howto/logging_flow.svg
M Doc/howto/logging.rst
M Doc/howto/logging_flow.png
diff --git a/Doc/howto/logging.rst b/Doc/howto/logging.rst
index cf5b693d8e3851..316b16aa796af4 100644
--- a/Doc/howto/logging.rst
+++ b/Doc/howto/logging.rst
@@ -382,8 +382,8 @@ Logging Flow
The flow of log event information in loggers and handlers is illustrated in the
following diagram.
-.. image:: logging_flow.png
- :class: invert-in-dark-mode
+.. raw:: html
+ :file: logging_flow.svg
Loggers
^^^^^^^
diff --git a/Doc/howto/logging_flow.png b/Doc/howto/logging_flow.png
index d65e597f811db5..c2d0befe27326c 100644
Binary files a/Doc/howto/logging_flow.png and b/Doc/howto/logging_flow.png differ
diff --git a/Doc/howto/logging_flow.svg b/Doc/howto/logging_flow.svg
new file mode 100644
index 00000000000000..52206bdbcf503b
--- /dev/null
+++ b/Doc/howto/logging_flow.svg
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="22cm" height="23cm" viewBox="1 1 439 446" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <!-- Invert color in dark mode -->
+ <style type="text/css">
+ @media (prefers-color-scheme: dark)
+ {
+ svg {
+ filter: invert(93%) hue-rotate(180deg);
+ background-color: transparent !important;
+ }
+ image {
+ filter: invert(100%) hue-rotate(180deg) saturate(1.25);
+ }
+ }
+ </style>
+
+ <defs/>
+ <g id="Background">
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1.8; stroke-dasharray: 3; stroke: #000000" x="227.504" y="1.91011" width="211.607" height="207.375" rx="0" ry="0"/>
+ <rect style="fill: #000000; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1.2; stroke: #000000" x="230.966" y="5.62454" width="68.4216" height="21.9166" rx="0" ry="0"/>
+ <rect style="fill: #000000; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1.2; stroke: #000000" x="5.27912" y="5.70399" width="68.4216" height="21.9166" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:700" x="17.0649" y="19.0071">
+ <tspan x="17.0649" y="19.0071">Logger flow</tspan>
+ </text>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="81.5533" y="106.469" width="44.45" height="25.9333" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="117.256">
+ <tspan x="103.778" y="117.256">Create</tspan>
+ <tspan x="103.778" y="125.723">LogRecord</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="82.8734" x2="103.778" y2="102.351"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,105.351 101.778,101.351 103.778,102.351 105.778,101.351 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.774" y1="3.65583" x2="103.778" y2="30.3755"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,33.3755 101.778,29.3758 103.778,30.3755 105.778,29.3752 "/>
+ </g>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="164.792" y="43.0505">
+ <tspan x="164.792" y="43.0505"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="236.978" y="43.0505">
+ <tspan x="236.978" y="43.0505"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="144.365" y="10.4604">
+ <tspan x="144.365" y="10.4604">Logging call in user</tspan>
+ <tspan x="144.365" y="18.927">code, e.g.</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="110.837" y="27.4696">
+ <tspan x="110.837" y="27.4696">logging.info(...)</tspan>
+ </text>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="155.62" y1="58.6834" x2="183.943" y2="58.6924"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="186.943,58.6933 182.942,60.6921 183.943,58.6924 182.943,56.6921 "/>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="188.061" y="49.9604" width="24.4" height="17.4667" rx="6" ry="6"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="200.261" y="60.7475">
+ <tspan x="200.261" y="60.7475">Stop</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,162.482 169.307,193.042 103.778,223.603 38.2493,193.042 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="186.629">
+ <tspan x="103.778" y="186.629">Does a filter attached</tspan>
+ <tspan x="103.778" y="195.096">to logger reject the</tspan>
+ <tspan x="103.778" y="203.563">record?</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="132.402" x2="103.778" y2="158.364"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,161.364 101.778,157.364 103.778,158.364 105.778,157.364 "/>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="75.2033" y="249.478" width="57.15" height="34.4" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="260.265">
+ <tspan x="103.778" y="260.265">Pass to</tspan>
+ <tspan x="103.778" y="268.732">handlers of</tspan>
+ <tspan x="103.778" y="277.198">current logger</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,326.569 158.193,352.399 103.778,378.229 49.3637,352.399 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="350.22">
+ <tspan x="103.778" y="350.22">Is propagate true for</tspan>
+ <tspan x="103.778" y="358.686">current logger?</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,399.9 150.573,422.994 103.778,446.087 56.984,422.994 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="420.814">
+ <tspan x="103.778" y="420.814">Is there a parent</tspan>
+ <tspan x="103.778" y="429.281">logger?</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="2.43852" y="295.984" width="63.9" height="26.5909" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="34.3885" y="307.1">
+ <tspan x="34.3885" y="307.1">Set current</tspan>
+ <tspan x="34.3885" y="315.566">logger to parent</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="278.422,240.202 330.96,266.686 278.422,293.169 225.885,266.686 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="278.422" y="264.506">
+ <tspan x="278.422" y="264.506">At least one handler</tspan>
+ <tspan x="278.422" y="272.973">in hierarchy?</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="298.963" y="312.257" width="57.75" height="25.9333" rx="0" ry="0"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="327.838" y="323.044">
+ <tspan x="327.838" y="323.044">Use lastResort</tspan>
+ <tspan x="327.838" y="331.511">handler</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,35.7307 373.377,60.8536 320.041,85.9765 266.704,60.8536 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="320.041" y="58.6741">
+ <tspan x="320.041" y="58.6741">Handler enabled for</tspan>
+ <tspan x="320.041" y="67.1407">level of LogRecord?</tspan>
+ </text>
+ </g>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,105.448 386.002,135.748 320.041,166.047 254.08,135.748 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="320.041" y="129.335">
+ <tspan x="320.041" y="129.335">Does a filter attached</tspan>
+ <tspan x="320.041" y="137.802">to handler reject the</tspan>
+ <tspan x="320.041" y="146.268">record?</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="409.532" y="52.4436" width="24.4" height="17.4667" rx="6" ry="6"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="421.732" y="63.2307">
+ <tspan x="421.732" y="63.2307">Stop</tspan>
+ </text>
+ </g>
+ <g>
+ <rect style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x="271.091" y="185.519" width="97.9" height="17.4667" rx="6" ry="6"/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="320.041" y="196.306">
+ <tspan x="320.041" y="196.306">Emit (includes formatting)</tspan>
+ </text>
+ </g>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:700" x="241.002" y="18.9277">
+ <tspan x="241.002" y="18.9277">Handler flow</tspan>
+ </text>
+ <g>
+ <polygon style="fill: #ffffff; fill-opacity: 0; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,34.4935 155.62,58.6834 103.778,82.8734 51.9368,58.6834 "/>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="103.778" y="56.5039">
+ <tspan x="103.778" y="56.5039">Logger enabled for</tspan>
+ <tspan x="103.778" y="64.9705">level of call?</tspan>
+ </text>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="223.603" x2="103.778" y2="245.36"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,248.36 101.778,244.36 103.778,245.36 105.778,244.36 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="283.878" x2="103.778" y2="322.451"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,325.451 101.778,321.451 103.778,322.451 105.778,321.451 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="103.778" y1="378.229" x2="103.778" y2="395.782"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="103.778,398.782 101.778,394.782 103.778,395.782 105.778,394.782 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="56.984,422.994 34.3885,422.994 34.3885,326.693 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="34.3885,323.693 36.3885,327.693 34.3885,326.693 32.3885,327.693 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="34.3885,295.984 34.3885,266.678 71.0853,266.678 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="74.0853,266.678 70.0853,268.678 71.0853,266.678 70.0853,264.678 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="150.573,422.994 200.261,422.994 200.261,71.5451 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="200.261,68.5451 202.261,72.5451 200.261,71.5451 198.261,72.5451 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" x1="132.353" y1="266.678" x2="221.767" y2="266.685"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="224.767,266.686 220.766,268.685 221.767,266.685 220.767,264.685 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" points="278.422,293.169 278.422,325.224 294.845,325.224 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="297.845,325.224 293.845,327.224 294.845,325.224 293.845,323.224 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="169.307,193.042 200.261,193.042 200.261,71.5451 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="200.261,68.5451 202.261,72.5451 200.261,71.5451 198.261,72.5451 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="158.193,352.399 200.261,352.399 200.261,71.5451 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="200.261,68.5451 202.261,72.5451 200.261,71.5451 198.261,72.5451 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="319.981" y1="4.27261" x2="320.033" y2="31.6127"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.039,34.6127 318.031,30.6165 320.033,31.6127 322.031,30.6089 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="320.041" y1="85.9765" x2="320.041" y2="101.33"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,104.33 318.041,100.33 320.041,101.33 322.041,100.33 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="320.041" y1="166.047" x2="320.041" y2="181.401"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="320.041,184.401 318.041,180.401 320.041,181.401 322.041,180.401 "/>
+ </g>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" points="386.002,135.748 421.732,135.748 421.732,74.0283 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="421.732,71.0283 423.732,75.0283 421.732,74.0283 419.732,75.0283 "/>
+ </g>
+ <g>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke: #000000" x1="373.377" y1="60.8536" x2="405.415" y2="61.1401"/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="408.414,61.1669 404.397,63.1311 405.415,61.1401 404.433,59.1312 "/>
+ </g>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="164.96" y="55.5649">
+ <tspan x="164.96" y="55.5649">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="106.571" y="97.8453">
+ <tspan x="106.571" y="97.8453">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="173.856" y="188.452">
+ <tspan x="173.856" y="188.452">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="107.446" y="239.221">
+ <tspan x="107.446" y="239.221">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="174.731" y="349.418">
+ <tspan x="174.731" y="349.418">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="106.571" y="390.507">
+ <tspan x="106.571" y="390.507">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="39.4722" y="417.667">
+ <tspan x="39.4722" y="417.667">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="174.731" y="417.667">
+ <tspan x="174.731" y="417.667">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="281.451" y="313.406">
+ <tspan x="281.451" y="313.406">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.909" y="263.96">
+ <tspan x="333.909" y="263.96">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="385.766" y="56.9098">
+ <tspan x="385.766" y="56.9098">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="397.102" y="130.471">
+ <tspan x="397.102" y="130.471">Yes</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="323.563" y="178.785">
+ <tspan x="323.563" y="178.785">No</tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="333.307" y="105.598">
+ <tspan x="333.307" y="105.598"></tspan>
+ </text>
+ <text font-size="6.77333" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="323.75" y="99.0042">
+ <tspan x="323.75" y="99.0042">Yes</tspan>
+ </text>
+ <text font-size="6.77323" style="fill: #000000; fill-opacity: 1; stroke: none;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="355.762" y="18.2449">
+ <tspan x="355.762" y="18.2449">LogRecord passed</tspan>
+ <tspan x="355.762" y="26.7116">to handler</tspan>
+ </text>
+ <line style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" x1="330.96" y1="266.686" x2="377.733" y2="267.908"/>
+ <g>
+ <polyline style="fill: none; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 5; stroke: #000000" points="356.713,325.224 377.733,325.224 377.733,214.711 "/>
+ <polygon style="fill: #000000; fill-opacity: 1; stroke-opacity: 1; stroke-width: 1; stroke: #000000" fill-rule="evenodd" points="377.733,211.711 379.733,215.711 377.733,214.711 375.733,215.711 "/>
+ </g>
+ </g>
+</svg>
1
0
https://github.com/python/cpython/commit/7b413952e817ae87bfda2ac85dd84d30a6…
commit: 7b413952e817ae87bfda2ac85dd84d30a6ce743b
branch: 3.13
author: Thomas Wouters <thomas(a)python.org>
committer: Yhg1s <thomas(a)python.org>
date: 2024-06-27T15:06:51+02:00
summary:
Python 3.13.0b3
files:
A Misc/NEWS.d/3.13.0b3.rst
D Misc/NEWS.d/next/Build/2024-06-09-15-54-22.gh-issue-120291.IpfHzE.rst
D Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst
D Misc/NEWS.d/next/Build/2024-06-19-21-05-15.gh-issue-120602.UyDARz.rst
D Misc/NEWS.d/next/Build/2024-06-21-09-24-03.gh-issue-120671.Z8sBQB.rst
D Misc/NEWS.d/next/C API/2024-04-10-16-48-04.gh-issue-117511.RZtBRK.rst
D Misc/NEWS.d/next/C API/2024-05-08-21-57-50.gh-issue-118789.Ni4UQx.rst
D Misc/NEWS.d/next/C API/2024-05-21-19-41-41.gh-issue-119344.QKvzQb.rst
D Misc/NEWS.d/next/C API/2024-06-19-21-27-42.gh-issue-120642.UlKClN.rst
D Misc/NEWS.d/next/C API/2024-06-21-16-41-21.gh-issue-120858.Z5_-Mn.rst
D Misc/NEWS.d/next/C API/2024-06-26-11-29-01.gh-issue-120642.H7P9qK.rst
D Misc/NEWS.d/next/Core and Builtins/2018-10-09-15-14-53.bpo-24766.c_C1Wc.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-03-13-48-44.gh-issue-119933.Kc0HG5.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-07-16-09-04.gh-issue-120225.kuYf9t.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-09-19-13-38.gh-issue-119666.S0G4rZ.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-10-10-42-48.gh-issue-120298.napREA.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-10-15-07-16.gh-issue-120198.WW_pjO.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-10-22-30-26.gh-issue-93691.68WOTS.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-11-12-47-54.gh-issue-120346.hhn_6X.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-11-17-56-12.gh-issue-120221.si9hM9.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-12-12-29-45.gh-issue-120400.lZYHVS.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-12-18-23-15.gh-issue-120380.edtqjq.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-12-18-50-29.gh-issue-120367.LmXx2y.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-13-12-17-52.gh-issue-120384.w1UBGl.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-14-22-02-25.gh-issue-113993.MiA0vX.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-18-21-34-30.gh-issue-120367.zDwffP.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-18-22-41-05.gh-issue-120722.rS7tkE.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-19-01-58-54.gh-issue-120437.nCkIoI.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-19-11-10-50.gh-issue-119462.DpcqSe.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-26-13-42-36.gh-issue-113433.xKAtLB.rst
D Misc/NEWS.d/next/Core and Builtins/2024-06-26-14-09-31.gh-issue-120838.nFeTL9.rst
D Misc/NEWS.d/next/Library/2024-05-24-14-32-24.gh-issue-119506.-nMNqq.rst
D Misc/NEWS.d/next/Library/2024-05-25-10-40-38.gh-issue-118908.XcZiq4.rst
D Misc/NEWS.d/next/Library/2024-05-29-21-50-05.gh-issue-119577.S3BlKJ.rst
D Misc/NEWS.d/next/Library/2024-06-02-13-35-11.gh-issue-81936.ETeW9x.rst
D Misc/NEWS.d/next/Library/2024-06-04-08-57-02.gh-issue-65454.o9j4wF.rst
D Misc/NEWS.d/next/Library/2024-06-04-19-03-25.gh-issue-112672.K2XfZH.rst
D Misc/NEWS.d/next/Library/2024-06-05-08-02-46.gh-issue-120108.4U9BL8.rst
D Misc/NEWS.d/next/Library/2024-06-05-11-39-21.gh-issue-119933.ooJXQV.rst
D Misc/NEWS.d/next/Library/2024-06-05-16-30-28.gh-issue-120121.9dz8i7.rst
D Misc/NEWS.d/next/Library/2024-06-06-12-07-57.gh-issue-119698.rRrprk.rst
D Misc/NEWS.d/next/Library/2024-06-06-17-24-43.gh-issue-120161.DahNXV.rst
D Misc/NEWS.d/next/Library/2024-06-07-11-23-31.gh-issue-71587.IjFajE.rst
D Misc/NEWS.d/next/Library/2024-06-07-13-21-11.gh-issue-120211.Rws_gf.rst
D Misc/NEWS.d/next/Library/2024-06-08-09-45-31.gh-issue-120244.8o9Dzr.rst
D Misc/NEWS.d/next/Library/2024-06-08-14-36-40.gh-issue-120268.MNpd1q.rst
D Misc/NEWS.d/next/Library/2024-06-08-15-15-29.gh-issue-114053.WQLAFG.rst
D Misc/NEWS.d/next/Library/2024-06-08-15-46-35.gh-issue-114053.Ub2XgJ.rst
D Misc/NEWS.d/next/Library/2024-06-10-14-00-40.gh-issue-119600.jJMf4C.rst
D Misc/NEWS.d/next/Library/2024-06-11-16-34-41.gh-issue-120343.hdiXeU.rst
D Misc/NEWS.d/next/Library/2024-06-12-10-00-31.gh-issue-90425.5CfkKG.rst
D Misc/NEWS.d/next/Library/2024-06-12-11-54-05.gh-issue-120381.O-BNLs.rst
D Misc/NEWS.d/next/Library/2024-06-14-20-05-25.gh-issue-120495.OxgZKB.rst
D Misc/NEWS.d/next/Library/2024-06-15-12-04-46.gh-issue-120541.d3cc5y.rst
D Misc/NEWS.d/next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst
D Misc/NEWS.d/next/Library/2024-06-18-19-18-10.gh-issue-120683.xmRez7.rst
D Misc/NEWS.d/next/Library/2024-06-19-15-06-58.gh-issue-120732.OvYV9b.rst
D Misc/NEWS.d/next/Library/2024-06-20-01-31-24.gh-issue-120769.PfiMrc.rst
D Misc/NEWS.d/next/Library/2024-06-21-14-32-56.gh-issue-120811.eBmVTV.rst
D Misc/NEWS.d/next/Library/2024-06-22-22-23-56.gh-issue-101830.1BAoxH.rst
D Misc/NEWS.d/next/Library/2024-06-22-22-52-24.gh-issue-120888.sd8I3N.rst
D Misc/NEWS.d/next/Library/2024-06-23-11-21-27.gh-issue-120910.t0QXdB.rst
D Misc/NEWS.d/next/Library/2024-06-23-17-50-40.gh-issue-119614.vwPGLB.rst
D Misc/NEWS.d/next/Library/2024-06-26-03-04-24.gh-issue-121018.clVSc4.rst
D Misc/NEWS.d/next/Library/2024-06-26-10-13-40.gh-issue-121025.M-XXlV.rst
D Misc/NEWS.d/next/Library/2024-06-27-13-47-14.gh-issue-121027.jh55EC.rst
M Include/patchlevel.h
M Lib/pydoc_data/topics.py
M README.rst
diff --git a/Include/patchlevel.h b/Include/patchlevel.h
index 87b4f551bc5fbd..de2c4784448305 100644
--- a/Include/patchlevel.h
+++ b/Include/patchlevel.h
@@ -20,10 +20,10 @@
#define PY_MINOR_VERSION 13
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA
-#define PY_RELEASE_SERIAL 2
+#define PY_RELEASE_SERIAL 3
/* Version as a string */
-#define PY_VERSION "3.13.0b2+"
+#define PY_VERSION "3.13.0b3"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
index f5ba27df0bd521..ca2010c3357e4c 100644
--- a/Lib/pydoc_data/topics.py
+++ b/Lib/pydoc_data/topics.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Autogenerated by Sphinx on Wed Jun 5 16:43:53 2024
+# Autogenerated by Sphinx on Thu Jun 27 15:02:53 2024
# as part of the release process.
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
@@ -362,21 +362,26 @@
'a single\n'
'target is allowed.\n'
'\n'
- 'For simple names as assignment targets, if in class or module '
- 'scope,\n'
- 'the annotations are evaluated and stored in a special class or '
- 'module\n'
- 'attribute "__annotations__" that is a dictionary mapping from '
- 'variable\n'
- 'names (mangled if private) to evaluated annotations. This '
- 'attribute is\n'
- 'writable and is automatically created at the start of class or '
- 'module\n'
- 'body execution, if annotations are found statically.\n'
- '\n'
- 'For expressions as assignment targets, the annotations are '
+ 'The assignment target is considered “simple” if it consists of '
+ 'a\n'
+ 'single name that is not enclosed in parentheses. For simple '
+ 'assignment\n'
+ 'targets, if in class or module scope, the annotations are '
'evaluated\n'
- 'if in class or module scope, but not stored.\n'
+ 'and stored in a special class or module attribute '
+ '"__annotations__"\n'
+ 'that is a dictionary mapping from variable names (mangled if '
+ 'private)\n'
+ 'to evaluated annotations. This attribute is writable and is\n'
+ 'automatically created at the start of class or module body '
+ 'execution,\n'
+ 'if annotations are found statically.\n'
+ '\n'
+ 'If the assignment target is not simple (an attribute, '
+ 'subscript node,\n'
+ 'or parenthesized name), the annotation is evaluated if in '
+ 'class or\n'
+ 'module scope, but not stored.\n'
'\n'
'If a name is annotated in a function scope, then this name is '
'local\n'
@@ -2388,18 +2393,16 @@
'An\n'
'expression-less "except" clause, if present, must be last; it '
'matches\n'
- 'any exception. For an "except" clause with an expression, that\n'
- 'expression is evaluated, and the clause matches the exception if '
- 'the\n'
- 'resulting object is “compatible” with the exception. An object '
- 'is\n'
- 'compatible with an exception if the object is the class or a '
- '*non-\n'
- 'virtual base class* of the exception object, or a tuple '
- 'containing an\n'
- 'item that is the class or a non-virtual base class of the '
- 'exception\n'
- 'object.\n'
+ 'any exception.\n'
+ '\n'
+ 'For an "except" clause with an expression, the expression must\n'
+ 'evaluate to an exception type or a tuple of exception types. '
+ 'The\n'
+ 'raised exception matches an "except" clause whose expression '
+ 'evaluates\n'
+ 'to the class or a *non-virtual base class* of the exception '
+ 'object, or\n'
+ 'to a tuple that contains such a class.\n'
'\n'
'If no "except" clause matches the exception, the search for an\n'
'exception handler continues in the surrounding code and on the\n'
@@ -2548,13 +2551,16 @@
' ...\n'
" ExceptionGroup('', (BlockingIOError()))\n"
'\n'
- 'An "except*" clause must have a matching type, and this type '
- 'cannot be\n'
- 'a subclass of "BaseExceptionGroup". It is not possible to mix '
- '"except"\n'
- 'and "except*" in the same "try". "break", "continue" and '
- '"return"\n'
- 'cannot appear in an "except*" clause.\n'
+ 'An "except*" clause must have a matching expression; it cannot '
+ 'be\n'
+ '"except*:". Furthermore, this expression cannot contain '
+ 'exception\n'
+ 'group types, because that would have ambiguous semantics.\n'
+ '\n'
+ 'It is not possible to mix "except" and "except*" in the same '
+ '"try".\n'
+ '"break", "continue" and "return" cannot appear in an "except*" '
+ 'clause.\n'
'\n'
'\n'
'"else" clause\n'
@@ -4536,6 +4542,10 @@
' It is not guaranteed that "__del__()" methods are called '
'for\n'
' objects that still exist when the interpreter exits.\n'
+ ' "weakref.finalize" provides a straightforward way to '
+ 'register a\n'
+ ' cleanup function to be called when an object is garbage '
+ 'collected.\n'
'\n'
' Note:\n'
'\n'
@@ -9995,6 +10005,10 @@
' It is not guaranteed that "__del__()" methods are called '
'for\n'
' objects that still exist when the interpreter exits.\n'
+ ' "weakref.finalize" provides a straightforward way to '
+ 'register a\n'
+ ' cleanup function to be called when an object is garbage '
+ 'collected.\n'
'\n'
' Note:\n'
'\n'
@@ -13489,14 +13503,15 @@
'clauses in turn until one is found that matches the exception. An\n'
'expression-less "except" clause, if present, must be last; it '
'matches\n'
- 'any exception. For an "except" clause with an expression, that\n'
- 'expression is evaluated, and the clause matches the exception if the\n'
- 'resulting object is “compatible” with the exception. An object is\n'
- 'compatible with an exception if the object is the class or a *non-\n'
- 'virtual base class* of the exception object, or a tuple containing '
- 'an\n'
- 'item that is the class or a non-virtual base class of the exception\n'
- 'object.\n'
+ 'any exception.\n'
+ '\n'
+ 'For an "except" clause with an expression, the expression must\n'
+ 'evaluate to an exception type or a tuple of exception types. The\n'
+ 'raised exception matches an "except" clause whose expression '
+ 'evaluates\n'
+ 'to the class or a *non-virtual base class* of the exception object, '
+ 'or\n'
+ 'to a tuple that contains such a class.\n'
'\n'
'If no "except" clause matches the exception, the search for an\n'
'exception handler continues in the surrounding code and on the\n'
@@ -13625,12 +13640,13 @@
' ...\n'
" ExceptionGroup('', (BlockingIOError()))\n"
'\n'
- 'An "except*" clause must have a matching type, and this type cannot '
- 'be\n'
- 'a subclass of "BaseExceptionGroup". It is not possible to mix '
- '"except"\n'
- 'and "except*" in the same "try". "break", "continue" and "return"\n'
- 'cannot appear in an "except*" clause.\n'
+ 'An "except*" clause must have a matching expression; it cannot be\n'
+ '"except*:". Furthermore, this expression cannot contain exception\n'
+ 'group types, because that would have ambiguous semantics.\n'
+ '\n'
+ 'It is not possible to mix "except" and "except*" in the same "try".\n'
+ '"break", "continue" and "return" cannot appear in an "except*" '
+ 'clause.\n'
'\n'
'\n'
'"else" clause\n'
@@ -16085,7 +16101,9 @@
'\n'
'Notes:\n'
'\n'
- '1. *t* must have the same length as the slice it is replacing.\n'
+ '1. If *k* is not equal to "1", *t* must have the same length as '
+ 'the\n'
+ ' slice it is replacing.\n'
'\n'
'2. The optional argument *i* defaults to "-1", so that by '
'default the\n'
@@ -16549,8 +16567,9 @@
'\n'
'Notes:\n'
'\n'
- '1. *t* must have the same length as the slice it is '
- 'replacing.\n'
+ '1. If *k* is not equal to "1", *t* must have the same '
+ 'length as the\n'
+ ' slice it is replacing.\n'
'\n'
'2. The optional argument *i* defaults to "-1", so that '
'by default the\n'
diff --git a/Misc/NEWS.d/3.13.0b3.rst b/Misc/NEWS.d/3.13.0b3.rst
new file mode 100644
index 00000000000000..e9b55d6e52b260
--- /dev/null
+++ b/Misc/NEWS.d/3.13.0b3.rst
@@ -0,0 +1,664 @@
+.. date: 2024-06-26-14-09-31
+.. gh-issue: 120838
+.. nonce: nFeTL9
+.. release date: 2024-06-27
+.. section: Core and Builtins
+
+:c:func:`Py_Finalize()` and :c:func:`Py_FinalizeEx()` now always run with
+the main interpreter active.
+
+..
+
+.. date: 2024-06-26-13-42-36
+.. gh-issue: 113433
+.. nonce: xKAtLB
+.. section: Core and Builtins
+
+Subinterpreters now get cleaned up automatically during runtime
+finalization.
+
+..
+
+.. date: 2024-06-19-11-10-50
+.. gh-issue: 119462
+.. nonce: DpcqSe
+.. section: Core and Builtins
+
+Make sure that invariants of type versioning are maintained: * Superclasses
+always have their version number assigned before subclasses * The version
+tag is always zero if the tag is not valid. * The version tag is always
+non-zero if the tag is valid.
+
+..
+
+.. date: 2024-06-19-01-58-54
+.. gh-issue: 120437
+.. nonce: nCkIoI
+.. section: Core and Builtins
+
+Fix ``_CHECK_STACK_SPACE`` optimization problems introduced in :gh:`118322`.
+
+..
+
+.. date: 2024-06-18-22-41-05
+.. gh-issue: 120722
+.. nonce: rS7tkE
+.. section: Core and Builtins
+
+Correctly set the bytecode position on return instructions within lambdas.
+Patch by Jelle Zijlstra.
+
+..
+
+.. date: 2024-06-18-21-34-30
+.. gh-issue: 120367
+.. nonce: zDwffP
+.. section: Core and Builtins
+
+Fix bug where compiler creates a redundant jump during pseudo-op
+replacement. Can only happen with a synthetic AST that has a try on the same
+line as the instruction following the exception handler.
+
+..
+
+.. date: 2024-06-14-22-02-25
+.. gh-issue: 113993
+.. nonce: MiA0vX
+.. section: Core and Builtins
+
+Strings interned with :func:`sys.intern` are again garbage-collected when no
+longer used, as per the documentation. Strings interned with the C function
+:c:func:`PyUnicode_InternInPlace` are still immortal. Internals of the
+string interning mechanism have been changed. This may affect performance
+and identities of :class:`str` objects.
+
+..
+
+.. date: 2024-06-13-12-17-52
+.. gh-issue: 120384
+.. nonce: w1UBGl
+.. section: Core and Builtins
+
+Fix an array out of bounds crash in ``list_ass_subscript``, which could be
+invoked via some specificly tailored input: including concurrent
+modification of a list object, where one thread assigns a slice and another
+clears it.
+
+..
+
+.. date: 2024-06-12-18-50-29
+.. gh-issue: 120367
+.. nonce: LmXx2y
+.. section: Core and Builtins
+
+Fix crash in compiler on code with redundant NOPs and JUMPs which show up
+after exception handlers are moved to the end of the code.
+
+..
+
+.. date: 2024-06-12-18-23-15
+.. gh-issue: 120380
+.. nonce: edtqjq
+.. section: Core and Builtins
+
+Fix Python implementation of :class:`pickle.Pickler` for :class:`bytes` and
+:class:`bytearray` objects when using protocol version 5. Patch by Bénédikt
+Tran.
+
+..
+
+.. date: 2024-06-12-12-29-45
+.. gh-issue: 120400
+.. nonce: lZYHVS
+.. section: Core and Builtins
+
+Support Linux perf profiler to see Python calls on RISC-V architecture.
+
+..
+
+.. date: 2024-06-11-17-56-12
+.. gh-issue: 120221
+.. nonce: si9hM9
+.. section: Core and Builtins
+
+Deliver real signals on Ctrl-C and Ctrl-Z in the new REPL. Patch by Pablo
+Galindo
+
+..
+
+.. date: 2024-06-11-12-47-54
+.. gh-issue: 120346
+.. nonce: hhn_6X
+.. section: Core and Builtins
+
+Respect :envvar:`PYTHON_BASIC_REPL` when running in interative inspect mode
+(``python -i``). Patch by Pablo Galindo
+
+..
+
+.. date: 2024-06-10-22-30-26
+.. gh-issue: 93691
+.. nonce: 68WOTS
+.. section: Core and Builtins
+
+Fix source locations of instructions generated for the iterator of a for
+statement.
+
+..
+
+.. date: 2024-06-10-15-07-16
+.. gh-issue: 120198
+.. nonce: WW_pjO
+.. section: Core and Builtins
+
+Fix a crash when multiple threads read and write to the same ``__class__``
+of an object concurrently.
+
+..
+
+.. date: 2024-06-10-10-42-48
+.. gh-issue: 120298
+.. nonce: napREA
+.. section: Core and Builtins
+
+Fix use-after free in ``list_richcompare_impl`` which can be invoked via
+some specificly tailored evil input.
+
+..
+
+.. date: 2024-06-09-19-13-38
+.. gh-issue: 119666
+.. nonce: S0G4rZ
+.. section: Core and Builtins
+
+Fix a compiler crash in the case where two comprehensions in class scope
+both reference ``__class__``.
+
+..
+
+.. date: 2024-06-07-16-09-04
+.. gh-issue: 120225
+.. nonce: kuYf9t
+.. section: Core and Builtins
+
+Fix crash in compiler on empty block at end of exception handler.
+
+..
+
+.. date: 2024-06-03-13-48-44
+.. gh-issue: 119933
+.. nonce: Kc0HG5
+.. section: Core and Builtins
+
+Improve :exc:`SyntaxError` messages for invalid expressions in a type
+parameters bound, a type parameter constraint tuple or a default type
+parameter. Patch by Bénédikt Tran.
+
+..
+
+.. bpo: 24766
+.. date: 2018-10-09-15-14-53
+.. nonce: c_C1Wc
+.. section: Core and Builtins
+
+Fix handling of ``doc`` argument to subclasses of ``property``.
+
+..
+
+.. date: 2024-06-27-13-47-14
+.. gh-issue: 121027
+.. nonce: jh55EC
+.. section: Library
+
+Add a future warning in :meth:`!functools.partial.__get__`. In future Python
+versions :class:`functools.partial` will be a method descriptor.
+
+..
+
+.. date: 2024-06-26-10-13-40
+.. gh-issue: 121025
+.. nonce: M-XXlV
+.. section: Library
+
+Improve the :meth:`~object.__repr__` of :class:`functools.partialmethod`.
+Patch by Bénédikt Tran.
+
+..
+
+.. date: 2024-06-26-03-04-24
+.. gh-issue: 121018
+.. nonce: clVSc4
+.. section: Library
+
+Fixed an issue where :meth:`!argparse.ArgumentParser.parses_args` did not
+honor ``exit_on_error=False`` when given unrecognized arguments. Patch by
+Ben Hsing.
+
+..
+
+.. date: 2024-06-23-17-50-40
+.. gh-issue: 119614
+.. nonce: vwPGLB
+.. section: Library
+
+Fix truncation of strings with embedded null characters in some internal
+operations in :mod:`tkinter`.
+
+..
+
+.. date: 2024-06-23-11-21-27
+.. gh-issue: 120910
+.. nonce: t0QXdB
+.. section: Library
+
+When reading installed files from an egg, use ``relative_to(walk_up=True)``
+to honor files installed outside of the installation root.
+
+..
+
+.. date: 2024-06-22-22-52-24
+.. gh-issue: 120888
+.. nonce: sd8I3N
+.. section: Library
+
+Upgrade pip wheel bundled with ensurepip (pip 24.1.1)
+
+..
+
+.. date: 2024-06-22-22-23-56
+.. gh-issue: 101830
+.. nonce: 1BAoxH
+.. section: Library
+
+Accessing the :mod:`tkinter` object's string representation no longer
+converts the underlying Tcl object to a string on Windows.
+
+..
+
+.. date: 2024-06-21-14-32-56
+.. gh-issue: 120811
+.. nonce: eBmVTV
+.. section: Library
+
+Fix possible memory leak in :meth:`contextvars.Context.run`.
+
+..
+
+.. date: 2024-06-20-01-31-24
+.. gh-issue: 120769
+.. nonce: PfiMrc
+.. section: Library
+
+Make empty line in :mod:`pdb` repeats the last command even when the command
+is from ``cmdqueue``.
+
+..
+
+.. date: 2024-06-19-15-06-58
+.. gh-issue: 120732
+.. nonce: OvYV9b
+.. section: Library
+
+Fix ``name`` passing to :class:`unittest.mock.Mock` object when using
+:func:`unittest.mock.create_autospec`.
+
+..
+
+.. date: 2024-06-18-19-18-10
+.. gh-issue: 120683
+.. nonce: xmRez7
+.. section: Library
+
+Fix an error in :class:`logging.LogRecord`, when the integer part of the
+timestamp is rounded up, while the millisecond calculation truncates,
+causing the log timestamp to be wrong by up to 999 ms (affected roughly 1 in
+8 million timestamps).
+
+..
+
+.. date: 2024-06-17-20-04-13
+.. gh-issue: 120633
+.. nonce: kZC5wt
+.. section: Library
+
+Move scrollbar and remove tear-off menus in turtledemo.
+
+..
+
+.. date: 2024-06-15-12-04-46
+.. gh-issue: 120541
+.. nonce: d3cc5y
+.. section: Library
+
+Improve the prompt in the "less" pager when :func:`help` is called with
+non-string argument.
+
+..
+
+.. date: 2024-06-14-20-05-25
+.. gh-issue: 120495
+.. nonce: OxgZKB
+.. section: Library
+
+Fix incorrect exception handling in Tab Nanny. Patch by Wulian233.
+
+..
+
+.. date: 2024-06-12-11-54-05
+.. gh-issue: 120381
+.. nonce: O-BNLs
+.. section: Library
+
+Correct :func:`inspect.ismethoddescriptor` to check also for the lack of
+:meth:`~object.__delete__`. Patch by Jan Kaliszewski.
+
+..
+
+.. date: 2024-06-12-10-00-31
+.. gh-issue: 90425
+.. nonce: 5CfkKG
+.. section: Library
+
+The OS byte in gzip headers is now always set to 255 when using
+:func:`gzip.compress`.
+
+..
+
+.. date: 2024-06-11-16-34-41
+.. gh-issue: 120343
+.. nonce: hdiXeU
+.. section: Library
+
+Fix column offset reporting for tokens that come after multiline f-strings
+in the :mod:`tokenize` module.
+
+..
+
+.. date: 2024-06-10-14-00-40
+.. gh-issue: 119600
+.. nonce: jJMf4C
+.. section: Library
+
+Fix :func:`unittest.mock.patch` to not read attributes of the target when
+``new_callable`` is set. Patch by Robert Collins.
+
+..
+
+.. date: 2024-06-08-15-46-35
+.. gh-issue: 114053
+.. nonce: Ub2XgJ
+.. section: Library
+
+Fix edge-case bug where :func:`typing.get_type_hints` would produce
+incorrect results if type parameters in a class scope were overridden by
+assignments in a class scope and ``from __future__ import annotations``
+semantics were enabled. Patch by Alex Waygood.
+
+..
+
+.. date: 2024-06-08-15-15-29
+.. gh-issue: 114053
+.. nonce: WQLAFG
+.. section: Library
+
+Fix erroneous :exc:`NameError` when calling :func:`inspect.get_annotations`
+with ``eval_str=True``` on a class that made use of :pep:`695` type
+parameters in a module that had ``from __future__ import annotations`` at
+the top of the file. Patch by Alex Waygood.
+
+..
+
+.. date: 2024-06-08-14-36-40
+.. gh-issue: 120268
+.. nonce: MNpd1q
+.. section: Library
+
+Prohibit passing ``None`` to pure-Python :meth:`datetime.date.fromtimestamp`
+to achieve consistency with C-extension implementation.
+
+..
+
+.. date: 2024-06-08-09-45-31
+.. gh-issue: 120244
+.. nonce: 8o9Dzr
+.. section: Library
+
+Fix memory leak in :func:`re.sub()` when the replacement string contains
+backreferences.
+
+..
+
+.. date: 2024-06-07-13-21-11
+.. gh-issue: 120211
+.. nonce: Rws_gf
+.. section: Library
+
+Fix :mod:`tkinter.ttk` with Tcl/Tk 9.0.
+
+..
+
+.. date: 2024-06-07-11-23-31
+.. gh-issue: 71587
+.. nonce: IjFajE
+.. section: Library
+
+Fix crash in C version of :meth:`datetime.datetime.strptime` when called
+again on the restarted interpreter.
+
+..
+
+.. date: 2024-06-06-17-24-43
+.. gh-issue: 120161
+.. nonce: DahNXV
+.. section: Library
+
+:mod:`datetime` no longer crashes in certain complex reference cycle
+situations.
+
+..
+
+.. date: 2024-06-06-12-07-57
+.. gh-issue: 119698
+.. nonce: rRrprk
+.. section: Library
+
+Fix :meth:`symtable.Class.get_methods` and document its behaviour. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2024-06-05-16-30-28
+.. gh-issue: 120121
+.. nonce: 9dz8i7
+.. section: Library
+
+Add :exc:`concurrent.futures.InvalidStateError` to module's ``__all__``.
+
+..
+
+.. date: 2024-06-05-11-39-21
+.. gh-issue: 119933
+.. nonce: ooJXQV
+.. section: Library
+
+Add the :class:`symtable.SymbolTableType` enumeration to represent the
+possible outputs of the :class:`symtable.SymbolTable.get_type` method. Patch
+by Bénédikt Tran.
+
+..
+
+.. date: 2024-06-05-08-02-46
+.. gh-issue: 120108
+.. nonce: 4U9BL8
+.. section: Library
+
+Fix calling :func:`copy.deepcopy` on :mod:`ast` trees that have been
+modified to have references to parent nodes. Patch by Jelle Zijlstra.
+
+..
+
+.. date: 2024-06-04-19-03-25
+.. gh-issue: 112672
+.. nonce: K2XfZH
+.. section: Library
+
+Support building :mod:`tkinter` with Tcl 9.0.
+
+..
+
+.. date: 2024-06-04-08-57-02
+.. gh-issue: 65454
+.. nonce: o9j4wF
+.. section: Library
+
+:func:`unittest.mock.Mock.attach_mock` no longer triggers a call to a
+``PropertyMock`` being attached.
+
+..
+
+.. date: 2024-06-02-13-35-11
+.. gh-issue: 81936
+.. nonce: ETeW9x
+.. section: Library
+
+:meth:`!help` and :meth:`!showtopic` methods now respect a configured
+*output* argument to :class:`!pydoc.Helper` and not use the pager in such
+cases. Patch by Enrico Tröger.
+
+..
+
+.. date: 2024-05-29-21-50-05
+.. gh-issue: 119577
+.. nonce: S3BlKJ
+.. section: Library
+
+The :exc:`DeprecationWarning` emitted when testing the truth value of an
+:class:`xml.etree.ElementTree.Element` now describes unconditionally
+returning ``True`` in a future version rather than raising an exception in
+Python 3.14.
+
+..
+
+.. date: 2024-05-25-10-40-38
+.. gh-issue: 118908
+.. nonce: XcZiq4
+.. section: Library
+
+Limit exposed globals from internal imports and definitions on new REPL
+startup. Patch by Eugene Triguba and Pablo Galindo.
+
+..
+
+.. date: 2024-05-24-14-32-24
+.. gh-issue: 119506
+.. nonce: -nMNqq
+.. section: Library
+
+Fix :meth:`!io.TextIOWrapper.write` method breaks internal buffer when the
+method is called again during flushing internal buffer.
+
+..
+
+.. date: 2024-06-21-09-24-03
+.. gh-issue: 120671
+.. nonce: Z8sBQB
+.. section: Build
+
+Fix failing configure tests due to a missing space when appending to CFLAGS.
+
+..
+
+.. date: 2024-06-19-21-05-15
+.. gh-issue: 120602
+.. nonce: UyDARz
+.. section: Build
+
+Correctly handle LLVM installs with ``LLVM_VERSION_SUFFIX`` when building
+with ``--enable-experimental-jit``.
+
+..
+
+.. date: 2024-06-11-00-38-05
+.. gh-issue: 120326
+.. nonce: JHSDF1
+.. section: Build
+
+On Windows, fix build error when ``--disable-gil`` and
+``--experimental-jit`` options are combined.
+
+..
+
+.. date: 2024-06-09-15-54-22
+.. gh-issue: 120291
+.. nonce: IpfHzE
+.. section: Build
+
+Make the ``python-config`` shell script compatible with non-bash shells.
+
+..
+
+.. date: 2024-06-26-11-29-01
+.. gh-issue: 120642
+.. nonce: H7P9qK
+.. section: C API
+
+Remove the private ``_Py_CODEUNIT`` type from the public C API. The internal
+``pycore_code.h`` header should now be used to get this internal type. Patch
+by Victor Stinner.
+
+..
+
+.. date: 2024-06-21-16-41-21
+.. gh-issue: 120858
+.. nonce: Z5_-Mn
+.. section: C API
+
+:c:func:`PyDict_Next` no longer locks the dictionary in the free-threaded
+build. The locking needs to be done by the caller around the entire
+iteration loop.
+
+..
+
+.. date: 2024-06-19-21-27-42
+.. gh-issue: 120642
+.. nonce: UlKClN
+.. section: C API
+
+Remove the following unstable functions:
+
+* ``PyUnstable_Replace_Executor()``
+* ``PyUnstable_SetOptimizer()``
+* ``PyUnstable_GetOptimizer()``
+* ``PyUnstable_GetExecutor()``
+* ``PyUnstable_Optimizer_NewCounter()``
+* ``PyUnstable_Optimizer_NewUOpOptimizer()``
+
+Patch by Victor Stinner.
+
+..
+
+.. date: 2024-05-21-19-41-41
+.. gh-issue: 119344
+.. nonce: QKvzQb
+.. section: C API
+
+The critical section API is now public as part of the non-limited C API.
+
+..
+
+.. date: 2024-05-08-21-57-50
+.. gh-issue: 118789
+.. nonce: Ni4UQx
+.. section: C API
+
+Add :c:func:`PyUnstable_Object_ClearWeakRefsNoCallbacks`, which clears
+weakrefs without calling their callbacks.
+
+..
+
+.. date: 2024-04-10-16-48-04
+.. gh-issue: 117511
+.. nonce: RZtBRK
+.. section: C API
+
+Make the :c:type:`PyMutex` public in the non-limited C API.
diff --git a/Misc/NEWS.d/next/Build/2024-06-09-15-54-22.gh-issue-120291.IpfHzE.rst b/Misc/NEWS.d/next/Build/2024-06-09-15-54-22.gh-issue-120291.IpfHzE.rst
deleted file mode 100644
index d0bb297b51dc6e..00000000000000
--- a/Misc/NEWS.d/next/Build/2024-06-09-15-54-22.gh-issue-120291.IpfHzE.rst
+++ /dev/null
@@ -1 +0,0 @@
-Make the ``python-config`` shell script compatible with non-bash shells.
diff --git a/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst b/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst
deleted file mode 100644
index 25cbdf6ba50ab8..00000000000000
--- a/Misc/NEWS.d/next/Build/2024-06-11-00-38-05.gh-issue-120326.JHSDF1.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-On Windows, fix build error when ``--disable-gil`` and ``--experimental-jit``
-options are combined.
diff --git a/Misc/NEWS.d/next/Build/2024-06-19-21-05-15.gh-issue-120602.UyDARz.rst b/Misc/NEWS.d/next/Build/2024-06-19-21-05-15.gh-issue-120602.UyDARz.rst
deleted file mode 100644
index f0d90ec3bb5089..00000000000000
--- a/Misc/NEWS.d/next/Build/2024-06-19-21-05-15.gh-issue-120602.UyDARz.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Correctly handle LLVM installs with ``LLVM_VERSION_SUFFIX`` when building
-with ``--enable-experimental-jit``.
diff --git a/Misc/NEWS.d/next/Build/2024-06-21-09-24-03.gh-issue-120671.Z8sBQB.rst b/Misc/NEWS.d/next/Build/2024-06-21-09-24-03.gh-issue-120671.Z8sBQB.rst
deleted file mode 100644
index bbe4a3038bc0ff..00000000000000
--- a/Misc/NEWS.d/next/Build/2024-06-21-09-24-03.gh-issue-120671.Z8sBQB.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix failing configure tests due to a missing space when appending to CFLAGS.
diff --git a/Misc/NEWS.d/next/C API/2024-04-10-16-48-04.gh-issue-117511.RZtBRK.rst b/Misc/NEWS.d/next/C API/2024-04-10-16-48-04.gh-issue-117511.RZtBRK.rst
deleted file mode 100644
index 586685a3407a3d..00000000000000
--- a/Misc/NEWS.d/next/C API/2024-04-10-16-48-04.gh-issue-117511.RZtBRK.rst
+++ /dev/null
@@ -1 +0,0 @@
-Make the :c:type:`PyMutex` public in the non-limited C API.
diff --git a/Misc/NEWS.d/next/C API/2024-05-08-21-57-50.gh-issue-118789.Ni4UQx.rst b/Misc/NEWS.d/next/C API/2024-05-08-21-57-50.gh-issue-118789.Ni4UQx.rst
deleted file mode 100644
index 32a9ec6d0710f6..00000000000000
--- a/Misc/NEWS.d/next/C API/2024-05-08-21-57-50.gh-issue-118789.Ni4UQx.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Add :c:func:`PyUnstable_Object_ClearWeakRefsNoCallbacks`, which clears
-weakrefs without calling their callbacks.
diff --git a/Misc/NEWS.d/next/C API/2024-05-21-19-41-41.gh-issue-119344.QKvzQb.rst b/Misc/NEWS.d/next/C API/2024-05-21-19-41-41.gh-issue-119344.QKvzQb.rst
deleted file mode 100644
index 5a2e4d980b59be..00000000000000
--- a/Misc/NEWS.d/next/C API/2024-05-21-19-41-41.gh-issue-119344.QKvzQb.rst
+++ /dev/null
@@ -1 +0,0 @@
-The critical section API is now public as part of the non-limited C API.
diff --git a/Misc/NEWS.d/next/C API/2024-06-19-21-27-42.gh-issue-120642.UlKClN.rst b/Misc/NEWS.d/next/C API/2024-06-19-21-27-42.gh-issue-120642.UlKClN.rst
deleted file mode 100644
index a61224ec8ef119..00000000000000
--- a/Misc/NEWS.d/next/C API/2024-06-19-21-27-42.gh-issue-120642.UlKClN.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-Remove the following unstable functions:
-
-* ``PyUnstable_Replace_Executor()``
-* ``PyUnstable_SetOptimizer()``
-* ``PyUnstable_GetOptimizer()``
-* ``PyUnstable_GetExecutor()``
-* ``PyUnstable_Optimizer_NewCounter()``
-* ``PyUnstable_Optimizer_NewUOpOptimizer()``
-
-Patch by Victor Stinner.
diff --git a/Misc/NEWS.d/next/C API/2024-06-21-16-41-21.gh-issue-120858.Z5_-Mn.rst b/Misc/NEWS.d/next/C API/2024-06-21-16-41-21.gh-issue-120858.Z5_-Mn.rst
deleted file mode 100644
index b5df2a567b9da8..00000000000000
--- a/Misc/NEWS.d/next/C API/2024-06-21-16-41-21.gh-issue-120858.Z5_-Mn.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-:c:func:`PyDict_Next` no longer locks the dictionary in the free-threaded
-build. The locking needs to be done by the caller around the entire iteration
-loop.
diff --git a/Misc/NEWS.d/next/C API/2024-06-26-11-29-01.gh-issue-120642.H7P9qK.rst b/Misc/NEWS.d/next/C API/2024-06-26-11-29-01.gh-issue-120642.H7P9qK.rst
deleted file mode 100644
index 24fb6ca569f4f3..00000000000000
--- a/Misc/NEWS.d/next/C API/2024-06-26-11-29-01.gh-issue-120642.H7P9qK.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Remove the private ``_Py_CODEUNIT`` type from the public C API. The internal
-``pycore_code.h`` header should now be used to get this internal type. Patch by
-Victor Stinner.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-10-09-15-14-53.bpo-24766.c_C1Wc.rst b/Misc/NEWS.d/next/Core and Builtins/2018-10-09-15-14-53.bpo-24766.c_C1Wc.rst
deleted file mode 100644
index 93a8562efe6d6f..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2018-10-09-15-14-53.bpo-24766.c_C1Wc.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix handling of ``doc`` argument to subclasses of ``property``.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-03-13-48-44.gh-issue-119933.Kc0HG5.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-03-13-48-44.gh-issue-119933.Kc0HG5.rst
deleted file mode 100644
index 513a0200dcc48a..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-03-13-48-44.gh-issue-119933.Kc0HG5.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Improve :exc:`SyntaxError` messages for invalid expressions in a type
-parameters bound, a type parameter constraint tuple or a default type
-parameter.
-Patch by Bénédikt Tran.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-07-16-09-04.gh-issue-120225.kuYf9t.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-07-16-09-04.gh-issue-120225.kuYf9t.rst
deleted file mode 100644
index d00b9aaa8192e3..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-07-16-09-04.gh-issue-120225.kuYf9t.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix crash in compiler on empty block at end of exception handler.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-09-19-13-38.gh-issue-119666.S0G4rZ.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-09-19-13-38.gh-issue-119666.S0G4rZ.rst
deleted file mode 100644
index 09c1f553c48702..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-09-19-13-38.gh-issue-119666.S0G4rZ.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix a compiler crash in the case where two comprehensions in class scope both reference ``__class__``.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-10-10-42-48.gh-issue-120298.napREA.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-10-10-42-48.gh-issue-120298.napREA.rst
deleted file mode 100644
index 531d39517ac423..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-10-10-42-48.gh-issue-120298.napREA.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix use-after free in ``list_richcompare_impl`` which can be invoked via
-some specificly tailored evil input.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-10-15-07-16.gh-issue-120198.WW_pjO.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-10-15-07-16.gh-issue-120198.WW_pjO.rst
deleted file mode 100644
index 8dc8aec44d80c4..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-10-15-07-16.gh-issue-120198.WW_pjO.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix a crash when multiple threads read and write to the same ``__class__`` of an object concurrently.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-10-22-30-26.gh-issue-93691.68WOTS.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-10-22-30-26.gh-issue-93691.68WOTS.rst
deleted file mode 100644
index 294f8d892b459b..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-10-22-30-26.gh-issue-93691.68WOTS.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix source locations of instructions generated for the iterator of a for
-statement.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-11-12-47-54.gh-issue-120346.hhn_6X.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-11-12-47-54.gh-issue-120346.hhn_6X.rst
deleted file mode 100644
index eb2d0f9a705caa..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-11-12-47-54.gh-issue-120346.hhn_6X.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Respect :envvar:`PYTHON_BASIC_REPL` when running in interative inspect mode
-(``python -i``). Patch by Pablo Galindo
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-11-17-56-12.gh-issue-120221.si9hM9.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-11-17-56-12.gh-issue-120221.si9hM9.rst
deleted file mode 100644
index 3781576bc5a257..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-11-17-56-12.gh-issue-120221.si9hM9.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Deliver real signals on Ctrl-C and Ctrl-Z in the new REPL. Patch by Pablo
-Galindo
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-12-12-29-45.gh-issue-120400.lZYHVS.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-12-12-29-45.gh-issue-120400.lZYHVS.rst
deleted file mode 100644
index 8c86d4750e39a8..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-12-12-29-45.gh-issue-120400.lZYHVS.rst
+++ /dev/null
@@ -1 +0,0 @@
-Support Linux perf profiler to see Python calls on RISC-V architecture.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-12-18-23-15.gh-issue-120380.edtqjq.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-12-18-23-15.gh-issue-120380.edtqjq.rst
deleted file mode 100644
index c682a0b7666416..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-12-18-23-15.gh-issue-120380.edtqjq.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Fix Python implementation of :class:`pickle.Pickler` for :class:`bytes` and
-:class:`bytearray` objects when using protocol version 5. Patch by Bénédikt
-Tran.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-12-18-50-29.gh-issue-120367.LmXx2y.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-12-18-50-29.gh-issue-120367.LmXx2y.rst
deleted file mode 100644
index 2d7212a66f7a84..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-12-18-50-29.gh-issue-120367.LmXx2y.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix crash in compiler on code with redundant NOPs and JUMPs which show up
-after exception handlers are moved to the end of the code.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-13-12-17-52.gh-issue-120384.w1UBGl.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-13-12-17-52.gh-issue-120384.w1UBGl.rst
deleted file mode 100644
index 4a4db821ce29b8..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-13-12-17-52.gh-issue-120384.w1UBGl.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Fix an array out of bounds crash in ``list_ass_subscript``, which could be
-invoked via some specificly tailored input: including concurrent modification
-of a list object, where one thread assigns a slice and another clears it.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-14-22-02-25.gh-issue-113993.MiA0vX.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-14-22-02-25.gh-issue-113993.MiA0vX.rst
deleted file mode 100644
index 9931787cb36d4c..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-14-22-02-25.gh-issue-113993.MiA0vX.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-Strings interned with :func:`sys.intern` are again garbage-collected when no
-longer used, as per the documentation. Strings interned with the C function
-:c:func:`PyUnicode_InternInPlace` are still immortal. Internals of the
-string interning mechanism have been changed. This may affect performance
-and identities of :class:`str` objects.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-18-21-34-30.gh-issue-120367.zDwffP.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-18-21-34-30.gh-issue-120367.zDwffP.rst
deleted file mode 100644
index 087640e5400b98..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-18-21-34-30.gh-issue-120367.zDwffP.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix bug where compiler creates a redundant jump during pseudo-op replacement. Can only happen with a synthetic AST that has a try on the same line as the instruction following the exception handler.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-18-22-41-05.gh-issue-120722.rS7tkE.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-18-22-41-05.gh-issue-120722.rS7tkE.rst
deleted file mode 100644
index df83e69c601a32..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-18-22-41-05.gh-issue-120722.rS7tkE.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Correctly set the bytecode position on return instructions within lambdas.
-Patch by Jelle Zijlstra.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-19-01-58-54.gh-issue-120437.nCkIoI.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-19-01-58-54.gh-issue-120437.nCkIoI.rst
deleted file mode 100644
index 8923f3fcefe3c1..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-19-01-58-54.gh-issue-120437.nCkIoI.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix ``_CHECK_STACK_SPACE`` optimization problems introduced in :gh:`118322`.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-19-11-10-50.gh-issue-119462.DpcqSe.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-19-11-10-50.gh-issue-119462.DpcqSe.rst
deleted file mode 100644
index e07c2fd227cc1b..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-19-11-10-50.gh-issue-119462.DpcqSe.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Make sure that invariants of type versioning are maintained:
-* Superclasses always have their version number assigned before subclasses
-* The version tag is always zero if the tag is not valid.
-* The version tag is always non-zero if the tag is valid.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-26-13-42-36.gh-issue-113433.xKAtLB.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-26-13-42-36.gh-issue-113433.xKAtLB.rst
deleted file mode 100644
index bf8377ac488bcc..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-26-13-42-36.gh-issue-113433.xKAtLB.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Subinterpreters now get cleaned up automatically during runtime
-finalization.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-26-14-09-31.gh-issue-120838.nFeTL9.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-26-14-09-31.gh-issue-120838.nFeTL9.rst
deleted file mode 100644
index 057d00aeeaba11..00000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2024-06-26-14-09-31.gh-issue-120838.nFeTL9.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-:c:func:`Py_Finalize()` and :c:func:`Py_FinalizeEx()` now always run with
-the main interpreter active.
diff --git a/Misc/NEWS.d/next/Library/2024-05-24-14-32-24.gh-issue-119506.-nMNqq.rst b/Misc/NEWS.d/next/Library/2024-05-24-14-32-24.gh-issue-119506.-nMNqq.rst
deleted file mode 100644
index f9b764ae0c49b3..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-05-24-14-32-24.gh-issue-119506.-nMNqq.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix :meth:`!io.TextIOWrapper.write` method breaks internal buffer when the method is called again during flushing internal buffer.
diff --git a/Misc/NEWS.d/next/Library/2024-05-25-10-40-38.gh-issue-118908.XcZiq4.rst b/Misc/NEWS.d/next/Library/2024-05-25-10-40-38.gh-issue-118908.XcZiq4.rst
deleted file mode 100644
index bf58d7277fcd51..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-05-25-10-40-38.gh-issue-118908.XcZiq4.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Limit exposed globals from internal imports and definitions on new REPL
-startup. Patch by Eugene Triguba and Pablo Galindo.
diff --git a/Misc/NEWS.d/next/Library/2024-05-29-21-50-05.gh-issue-119577.S3BlKJ.rst b/Misc/NEWS.d/next/Library/2024-05-29-21-50-05.gh-issue-119577.S3BlKJ.rst
deleted file mode 100644
index bd2daf3fb5c16d..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-05-29-21-50-05.gh-issue-119577.S3BlKJ.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-The :exc:`DeprecationWarning` emitted when testing the truth value of an
-:class:`xml.etree.ElementTree.Element` now describes unconditionally
-returning ``True`` in a future version rather than raising an exception in
-Python 3.14.
diff --git a/Misc/NEWS.d/next/Library/2024-06-02-13-35-11.gh-issue-81936.ETeW9x.rst b/Misc/NEWS.d/next/Library/2024-06-02-13-35-11.gh-issue-81936.ETeW9x.rst
deleted file mode 100644
index d53cc73e728d54..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-02-13-35-11.gh-issue-81936.ETeW9x.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-:meth:`!help` and :meth:`!showtopic` methods now respect a
-configured *output* argument to :class:`!pydoc.Helper` and not use the
-pager in such cases. Patch by Enrico Tröger.
diff --git a/Misc/NEWS.d/next/Library/2024-06-04-08-57-02.gh-issue-65454.o9j4wF.rst b/Misc/NEWS.d/next/Library/2024-06-04-08-57-02.gh-issue-65454.o9j4wF.rst
deleted file mode 100644
index 0b232cf8ca1baf..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-04-08-57-02.gh-issue-65454.o9j4wF.rst
+++ /dev/null
@@ -1 +0,0 @@
-:func:`unittest.mock.Mock.attach_mock` no longer triggers a call to a ``PropertyMock`` being attached.
diff --git a/Misc/NEWS.d/next/Library/2024-06-04-19-03-25.gh-issue-112672.K2XfZH.rst b/Misc/NEWS.d/next/Library/2024-06-04-19-03-25.gh-issue-112672.K2XfZH.rst
deleted file mode 100644
index 46345bff117b19..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-04-19-03-25.gh-issue-112672.K2XfZH.rst
+++ /dev/null
@@ -1 +0,0 @@
-Support building :mod:`tkinter` with Tcl 9.0.
diff --git a/Misc/NEWS.d/next/Library/2024-06-05-08-02-46.gh-issue-120108.4U9BL8.rst b/Misc/NEWS.d/next/Library/2024-06-05-08-02-46.gh-issue-120108.4U9BL8.rst
deleted file mode 100644
index e310695656255d..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-05-08-02-46.gh-issue-120108.4U9BL8.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix calling :func:`copy.deepcopy` on :mod:`ast` trees that have been
-modified to have references to parent nodes. Patch by Jelle Zijlstra.
diff --git a/Misc/NEWS.d/next/Library/2024-06-05-11-39-21.gh-issue-119933.ooJXQV.rst b/Misc/NEWS.d/next/Library/2024-06-05-11-39-21.gh-issue-119933.ooJXQV.rst
deleted file mode 100644
index 475da88914bde3..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-05-11-39-21.gh-issue-119933.ooJXQV.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Add the :class:`symtable.SymbolTableType` enumeration to represent the
-possible outputs of the :class:`symtable.SymbolTable.get_type` method. Patch
-by Bénédikt Tran.
diff --git a/Misc/NEWS.d/next/Library/2024-06-05-16-30-28.gh-issue-120121.9dz8i7.rst b/Misc/NEWS.d/next/Library/2024-06-05-16-30-28.gh-issue-120121.9dz8i7.rst
deleted file mode 100644
index 4f3526477c8cce..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-05-16-30-28.gh-issue-120121.9dz8i7.rst
+++ /dev/null
@@ -1 +0,0 @@
-Add :exc:`concurrent.futures.InvalidStateError` to module's ``__all__``.
diff --git a/Misc/NEWS.d/next/Library/2024-06-06-12-07-57.gh-issue-119698.rRrprk.rst b/Misc/NEWS.d/next/Library/2024-06-06-12-07-57.gh-issue-119698.rRrprk.rst
deleted file mode 100644
index d4cca1439816b0..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-06-12-07-57.gh-issue-119698.rRrprk.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix :meth:`symtable.Class.get_methods` and document its behaviour. Patch by
-Bénédikt Tran.
diff --git a/Misc/NEWS.d/next/Library/2024-06-06-17-24-43.gh-issue-120161.DahNXV.rst b/Misc/NEWS.d/next/Library/2024-06-06-17-24-43.gh-issue-120161.DahNXV.rst
deleted file mode 100644
index c378cac44c97bf..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-06-17-24-43.gh-issue-120161.DahNXV.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-:mod:`datetime` no longer crashes in certain complex reference cycle
-situations.
diff --git a/Misc/NEWS.d/next/Library/2024-06-07-11-23-31.gh-issue-71587.IjFajE.rst b/Misc/NEWS.d/next/Library/2024-06-07-11-23-31.gh-issue-71587.IjFajE.rst
deleted file mode 100644
index 50a662977993f5..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-07-11-23-31.gh-issue-71587.IjFajE.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix crash in C version of :meth:`datetime.datetime.strptime` when called again
-on the restarted interpreter.
diff --git a/Misc/NEWS.d/next/Library/2024-06-07-13-21-11.gh-issue-120211.Rws_gf.rst b/Misc/NEWS.d/next/Library/2024-06-07-13-21-11.gh-issue-120211.Rws_gf.rst
deleted file mode 100644
index 0106f2d93318b4..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-07-13-21-11.gh-issue-120211.Rws_gf.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix :mod:`tkinter.ttk` with Tcl/Tk 9.0.
diff --git a/Misc/NEWS.d/next/Library/2024-06-08-09-45-31.gh-issue-120244.8o9Dzr.rst b/Misc/NEWS.d/next/Library/2024-06-08-09-45-31.gh-issue-120244.8o9Dzr.rst
deleted file mode 100644
index d21532f22a1d38..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-08-09-45-31.gh-issue-120244.8o9Dzr.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix memory leak in :func:`re.sub()` when the replacement string contains backreferences.
diff --git a/Misc/NEWS.d/next/Library/2024-06-08-14-36-40.gh-issue-120268.MNpd1q.rst b/Misc/NEWS.d/next/Library/2024-06-08-14-36-40.gh-issue-120268.MNpd1q.rst
deleted file mode 100644
index d48d43cd047f7a..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-08-14-36-40.gh-issue-120268.MNpd1q.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Prohibit passing ``None`` to pure-Python :meth:`datetime.date.fromtimestamp`
-to achieve consistency with C-extension implementation.
diff --git a/Misc/NEWS.d/next/Library/2024-06-08-15-15-29.gh-issue-114053.WQLAFG.rst b/Misc/NEWS.d/next/Library/2024-06-08-15-15-29.gh-issue-114053.WQLAFG.rst
deleted file mode 100644
index be49577a712867..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-08-15-15-29.gh-issue-114053.WQLAFG.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Fix erroneous :exc:`NameError` when calling :func:`inspect.get_annotations`
-with ``eval_str=True``` on a class that made use of :pep:`695` type
-parameters in a module that had ``from __future__ import annotations`` at
-the top of the file. Patch by Alex Waygood.
diff --git a/Misc/NEWS.d/next/Library/2024-06-08-15-46-35.gh-issue-114053.Ub2XgJ.rst b/Misc/NEWS.d/next/Library/2024-06-08-15-46-35.gh-issue-114053.Ub2XgJ.rst
deleted file mode 100644
index 8aea591da5274c..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-08-15-46-35.gh-issue-114053.Ub2XgJ.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Fix edge-case bug where :func:`typing.get_type_hints` would produce
-incorrect results if type parameters in a class scope were overridden by
-assignments in a class scope and ``from __future__ import annotations``
-semantics were enabled. Patch by Alex Waygood.
diff --git a/Misc/NEWS.d/next/Library/2024-06-10-14-00-40.gh-issue-119600.jJMf4C.rst b/Misc/NEWS.d/next/Library/2024-06-10-14-00-40.gh-issue-119600.jJMf4C.rst
deleted file mode 100644
index 04c9ca9c3fd737..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-10-14-00-40.gh-issue-119600.jJMf4C.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix :func:`unittest.mock.patch` to not read attributes of the target when
-``new_callable`` is set. Patch by Robert Collins.
diff --git a/Misc/NEWS.d/next/Library/2024-06-11-16-34-41.gh-issue-120343.hdiXeU.rst b/Misc/NEWS.d/next/Library/2024-06-11-16-34-41.gh-issue-120343.hdiXeU.rst
deleted file mode 100644
index 76714b0c394eef..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-11-16-34-41.gh-issue-120343.hdiXeU.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix column offset reporting for tokens that come after multiline f-strings in the :mod:`tokenize` module.
diff --git a/Misc/NEWS.d/next/Library/2024-06-12-10-00-31.gh-issue-90425.5CfkKG.rst b/Misc/NEWS.d/next/Library/2024-06-12-10-00-31.gh-issue-90425.5CfkKG.rst
deleted file mode 100644
index d152af49287a0b..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-12-10-00-31.gh-issue-90425.5CfkKG.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-The OS byte in gzip headers is now always set to 255 when using
-:func:`gzip.compress`.
diff --git a/Misc/NEWS.d/next/Library/2024-06-12-11-54-05.gh-issue-120381.O-BNLs.rst b/Misc/NEWS.d/next/Library/2024-06-12-11-54-05.gh-issue-120381.O-BNLs.rst
deleted file mode 100644
index 44f49bc19a4c99..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-12-11-54-05.gh-issue-120381.O-BNLs.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Correct :func:`inspect.ismethoddescriptor` to check also for the lack of
-:meth:`~object.__delete__`. Patch by Jan Kaliszewski.
diff --git a/Misc/NEWS.d/next/Library/2024-06-14-20-05-25.gh-issue-120495.OxgZKB.rst b/Misc/NEWS.d/next/Library/2024-06-14-20-05-25.gh-issue-120495.OxgZKB.rst
deleted file mode 100644
index d5114c3d3c904c..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-14-20-05-25.gh-issue-120495.OxgZKB.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix incorrect exception handling in Tab Nanny. Patch by Wulian233.
diff --git a/Misc/NEWS.d/next/Library/2024-06-15-12-04-46.gh-issue-120541.d3cc5y.rst b/Misc/NEWS.d/next/Library/2024-06-15-12-04-46.gh-issue-120541.d3cc5y.rst
deleted file mode 100644
index bf8830c6c50386..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-15-12-04-46.gh-issue-120541.d3cc5y.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Improve the prompt in the "less" pager when :func:`help` is called with
-non-string argument.
diff --git a/Misc/NEWS.d/next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst b/Misc/NEWS.d/next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst
deleted file mode 100644
index 9b396988205589..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst
+++ /dev/null
@@ -1 +0,0 @@
-Move scrollbar and remove tear-off menus in turtledemo.
diff --git a/Misc/NEWS.d/next/Library/2024-06-18-19-18-10.gh-issue-120683.xmRez7.rst b/Misc/NEWS.d/next/Library/2024-06-18-19-18-10.gh-issue-120683.xmRez7.rst
deleted file mode 100644
index 50fc9279e4bad1..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-18-19-18-10.gh-issue-120683.xmRez7.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Fix an error in :class:`logging.LogRecord`, when the integer part of the
-timestamp is rounded up, while the millisecond calculation truncates,
-causing the log timestamp to be wrong by up to 999 ms (affected roughly 1 in
-8 million timestamps).
diff --git a/Misc/NEWS.d/next/Library/2024-06-19-15-06-58.gh-issue-120732.OvYV9b.rst b/Misc/NEWS.d/next/Library/2024-06-19-15-06-58.gh-issue-120732.OvYV9b.rst
deleted file mode 100644
index e31c4dd3192d60..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-19-15-06-58.gh-issue-120732.OvYV9b.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix ``name`` passing to :class:`unittest.mock.Mock` object when using
-:func:`unittest.mock.create_autospec`.
diff --git a/Misc/NEWS.d/next/Library/2024-06-20-01-31-24.gh-issue-120769.PfiMrc.rst b/Misc/NEWS.d/next/Library/2024-06-20-01-31-24.gh-issue-120769.PfiMrc.rst
deleted file mode 100644
index 8ee6bf1a9c6480..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-20-01-31-24.gh-issue-120769.PfiMrc.rst
+++ /dev/null
@@ -1 +0,0 @@
-Make empty line in :mod:`pdb` repeats the last command even when the command is from ``cmdqueue``.
diff --git a/Misc/NEWS.d/next/Library/2024-06-21-14-32-56.gh-issue-120811.eBmVTV.rst b/Misc/NEWS.d/next/Library/2024-06-21-14-32-56.gh-issue-120811.eBmVTV.rst
deleted file mode 100644
index 62cd7b5620474a..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-21-14-32-56.gh-issue-120811.eBmVTV.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix possible memory leak in :meth:`contextvars.Context.run`.
diff --git a/Misc/NEWS.d/next/Library/2024-06-22-22-23-56.gh-issue-101830.1BAoxH.rst b/Misc/NEWS.d/next/Library/2024-06-22-22-23-56.gh-issue-101830.1BAoxH.rst
deleted file mode 100644
index 46c18b040f30d7..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-22-22-23-56.gh-issue-101830.1BAoxH.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Accessing the :mod:`tkinter` object's string representation no longer converts
-the underlying Tcl object to a string on Windows.
diff --git a/Misc/NEWS.d/next/Library/2024-06-22-22-52-24.gh-issue-120888.sd8I3N.rst b/Misc/NEWS.d/next/Library/2024-06-22-22-52-24.gh-issue-120888.sd8I3N.rst
deleted file mode 100644
index c733ff5159aa40..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-22-22-52-24.gh-issue-120888.sd8I3N.rst
+++ /dev/null
@@ -1 +0,0 @@
-Upgrade pip wheel bundled with ensurepip (pip 24.1.1)
diff --git a/Misc/NEWS.d/next/Library/2024-06-23-11-21-27.gh-issue-120910.t0QXdB.rst b/Misc/NEWS.d/next/Library/2024-06-23-11-21-27.gh-issue-120910.t0QXdB.rst
deleted file mode 100644
index 3773cdc6ee3bf3..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-23-11-21-27.gh-issue-120910.t0QXdB.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-When reading installed files from an egg, use ``relative_to(walk_up=True)``
-to honor files installed outside of the installation root.
diff --git a/Misc/NEWS.d/next/Library/2024-06-23-17-50-40.gh-issue-119614.vwPGLB.rst b/Misc/NEWS.d/next/Library/2024-06-23-17-50-40.gh-issue-119614.vwPGLB.rst
deleted file mode 100644
index d518265a7fe55a..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-23-17-50-40.gh-issue-119614.vwPGLB.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix truncation of strings with embedded null characters in some internal
-operations in :mod:`tkinter`.
diff --git a/Misc/NEWS.d/next/Library/2024-06-26-03-04-24.gh-issue-121018.clVSc4.rst b/Misc/NEWS.d/next/Library/2024-06-26-03-04-24.gh-issue-121018.clVSc4.rst
deleted file mode 100644
index fdc3c5f9e459af..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-26-03-04-24.gh-issue-121018.clVSc4.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixed an issue where :meth:`!argparse.ArgumentParser.parses_args` did not honor ``exit_on_error=False`` when given unrecognized arguments.
-Patch by Ben Hsing.
diff --git a/Misc/NEWS.d/next/Library/2024-06-26-10-13-40.gh-issue-121025.M-XXlV.rst b/Misc/NEWS.d/next/Library/2024-06-26-10-13-40.gh-issue-121025.M-XXlV.rst
deleted file mode 100644
index 38cad610396787..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-26-10-13-40.gh-issue-121025.M-XXlV.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Improve the :meth:`~object.__repr__` of :class:`functools.partialmethod`.
-Patch by Bénédikt Tran.
diff --git a/Misc/NEWS.d/next/Library/2024-06-27-13-47-14.gh-issue-121027.jh55EC.rst b/Misc/NEWS.d/next/Library/2024-06-27-13-47-14.gh-issue-121027.jh55EC.rst
deleted file mode 100644
index 8470c8b37ac83d..00000000000000
--- a/Misc/NEWS.d/next/Library/2024-06-27-13-47-14.gh-issue-121027.jh55EC.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Add a future warning in :meth:`!functools.partial.__get__`. In future Python
-versions :class:`functools.partial` will be a method descriptor.
diff --git a/README.rst b/README.rst
index 52b884c72ed088..9f6a9a6ae098ad 100644
--- a/README.rst
+++ b/README.rst
@@ -1,4 +1,4 @@
-This is Python version 3.13.0 beta 2
+This is Python version 3.13.0 beta 3
====================================
.. image:: https://github.com/python/cpython/workflows/Tests/badge.svg
1
0
27 Jun '24
https://github.com/python/cpython/commit/4a62a331de1eeda7878960b0bd184a3489…
commit: 4a62a331de1eeda7878960b0bd184a348908245e
branch: main
author: Sam Gross <colesbury(a)gmail.com>
committer: colesbury <colesbury(a)gmail.com>
date: 2024-06-27T14:03:09-04:00
summary:
gh-121065: Temporarily skip flaky test on free-threaded build (#121100)
files:
M Lib/test/test_signal.py
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 591cd4177d9f41..7f8fe34bb315b2 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -1345,6 +1345,7 @@ def handler(signum, frame):
# Python handler
self.assertEqual(len(sigs), N, "Some signals were lost")
+ @support.requires_gil_enabled("gh-121065: test is flaky on free-threaded build")
@unittest.skipIf(is_apple, "crashes due to system bug (FB13453490)")
@unittest.skipUnless(hasattr(signal, "SIGUSR1"),
"test needs SIGUSR1")
1
0
gh-105623 Fix performance degradation in logging RotatingFileHandler (GH-105887)
by serhiy-storchaka 27 Jun '24
by serhiy-storchaka 27 Jun '24
27 Jun '24
https://github.com/python/cpython/commit/e9b4ec614b66d11623b80471409c16a109…
commit: e9b4ec614b66d11623b80471409c16a109f888d5
branch: main
author: Craig Robson <craig(a)zhatt.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2024-06-27T16:44:40Z
summary:
gh-105623 Fix performance degradation in logging RotatingFileHandler (GH-105887)
The check for whether the log file is a real file is expensive on NFS
filesystems. This commit reorders the rollover condition checking to
not do the file type check if the expected file size is less than the
rotation threshold.
Co-authored-by: Oleg Iarygin <oleg(a)arhadthedev.net>
files:
A Misc/NEWS.d/next/Library/2023-06-17-09-07-06.gh-issue-105623.5G06od.rst
M Lib/logging/handlers.py
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 410bd9851f366d..0fa40f56e998d5 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -193,15 +193,15 @@ def shouldRollover(self, record):
Basically, see if the supplied record would cause the file to exceed
the size limit we have.
"""
- # See bpo-45401: Never rollover anything other than regular files
- if os.path.exists(self.baseFilename) and not os.path.isfile(self.baseFilename):
- return False
if self.stream is None: # delay was set...
self.stream = self._open()
if self.maxBytes > 0: # are we rolling over?
msg = "%s\n" % self.format(record)
self.stream.seek(0, 2) #due to non-posix-compliant Windows feature
if self.stream.tell() + len(msg) >= self.maxBytes:
+ # See bpo-45401: Never rollover anything other than regular files
+ if os.path.exists(self.baseFilename) and not os.path.isfile(self.baseFilename):
+ return False
return True
return False
diff --git a/Misc/NEWS.d/next/Library/2023-06-17-09-07-06.gh-issue-105623.5G06od.rst b/Misc/NEWS.d/next/Library/2023-06-17-09-07-06.gh-issue-105623.5G06od.rst
new file mode 100644
index 00000000000000..2890674aac4bbc
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2023-06-17-09-07-06.gh-issue-105623.5G06od.rst
@@ -0,0 +1,2 @@
+Fix performance degradation in
+:class:`logging.handlers.RotatingFileHandler`. Patch by Craig Robson.
1
0
https://github.com/python/cpython/commit/0890ad7c024ccf29614849b6ffadcb92c0…
commit: 0890ad7c024ccf29614849b6ffadcb92c0e91ce7
branch: main
author: Kerim Kabirov <the.privat33r+gh(a)pm.me>
committer: encukou <encukou(a)gmail.com>
date: 2024-06-27T16:32:50+02:00
summary:
gh-115986 Improve pprint docs formatting (GH-117401)
* Move pprinter parameters description to the table
The change improves readability.
Suggested in the GH#116085 PR discussion.
* Make pprint doc with params markup
* Fix formatting
Indentation of code blocks made them nested
"Version changed" is better placed after the code block
* Fix formatting for tests
* fix code indentation for autotests
* Fix identation for autotests
* Remove duplication of the parameters' description
* Rearrange parameters description in a correct order
---------
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
files:
M Doc/library/pprint.rst
diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst
index df706c10ce9ec4..1b3498e51f766d 100644
--- a/Doc/library/pprint.rst
+++ b/Doc/library/pprint.rst
@@ -35,24 +35,66 @@ Dictionaries are sorted by key before the display is computed.
Functions
---------
-.. function:: pp(object, *args, sort_dicts=False, **kwargs)
-
- Prints the formatted representation of *object* followed by a newline.
- If *sort_dicts* is false (the default), dictionaries will be displayed with
- their keys in insertion order, otherwise the dict keys will be sorted.
- *args* and *kwargs* will be passed to :func:`~pprint.pprint` as formatting
- parameters.
-
- >>> import pprint
- >>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni']
- >>> stuff.insert(0, stuff)
- >>> pprint.pp(stuff)
- [<Recursion on list with id=...>,
- 'spam',
- 'eggs',
- 'lumberjack',
- 'knights',
- 'ni']
+.. function:: pp(object, stream=None, indent=1, width=80, depth=None, *, \
+ compact=False, sort_dicts=False, underscore_numbers=False)
+
+ Prints the formatted representation of *object*, followed by a newline.
+ This function may be used in the interactive interpreter
+ instead of the :func:`print` function for inspecting values.
+ Tip: you can reassign ``print = pprint.pp`` for use within a scope.
+
+ :param object:
+ The object to be printed.
+
+ :param stream:
+ A file-like object to which the output will be written
+ by calling its :meth:`!write` method.
+ If ``None`` (the default), :data:`sys.stdout` is used.
+ :type stream: :term:`file-like object` | None
+
+ :param int indent:
+ The amount of indentation added for each nesting level.
+
+ :param int width:
+ The desired maximum number of characters per line in the output.
+ If a structure cannot be formatted within the width constraint,
+ a best effort will be made.
+
+ :param depth:
+ The number of nesting levels which may be printed.
+ If the data structure being printed is too deep,
+ the next contained level is replaced by ``...``.
+ If ``None`` (the default), there is no constraint
+ on the depth of the objects being formatted.
+ :type depth: int | None
+
+ :param bool compact:
+ Control the way long :term:`sequences <sequence>` are formatted.
+ If ``False`` (the default),
+ each item of a sequence will be formatted on a separate line,
+ otherwise as many items as will fit within the *width*
+ will be formatted on each output line.
+
+ :param bool sort_dicts:
+ If ``True``, dictionaries will be formatted with
+ their keys sorted, otherwise
+ they will be displayed in insertion order (the default).
+
+ :param bool underscore_numbers:
+ If ``True``,
+ integers will be formatted with the ``_`` character for a thousands separator,
+ otherwise underscores are not displayed (the default).
+
+ >>> import pprint
+ >>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni']
+ >>> stuff.insert(0, stuff)
+ >>> pprint.pp(stuff)
+ [<Recursion on list with id=...>,
+ 'spam',
+ 'eggs',
+ 'lumberjack',
+ 'knights',
+ 'ni']
.. versionadded:: 3.8
@@ -60,19 +102,10 @@ Functions
.. function:: pprint(object, stream=None, indent=1, width=80, depth=None, *, \
compact=False, sort_dicts=True, underscore_numbers=False)
- Prints the formatted representation of *object* on *stream*, followed by a
- newline. If *stream* is ``None``, :data:`sys.stdout` is used. This may be used
- in the interactive interpreter instead of the :func:`print` function for
- inspecting values (you can even reassign ``print = pprint.pprint`` for use
- within a scope).
-
- The configuration parameters *stream*, *indent*, *width*, *depth*,
- *compact*, *sort_dicts* and *underscore_numbers* are passed to the
- :class:`PrettyPrinter` constructor and their meanings are as
- described in its documentation below.
+ Alias for :func:`~pprint.pp` with *sort_dicts* set to ``True`` by default,
+ which would automatically sort the dictionaries' keys,
+ you might want to use :func:`~pprint.pp` instead where it is ``False`` by default.
- Note that *sort_dicts* is ``True`` by default and you might want to use
- :func:`~pprint.pp` instead where it is ``False`` by default.
.. function:: pformat(object, indent=1, width=80, depth=None, *, \
compact=False, sort_dicts=True, underscore_numbers=False)
@@ -80,7 +113,7 @@ Functions
Return the formatted representation of *object* as a string. *indent*,
*width*, *depth*, *compact*, *sort_dicts* and *underscore_numbers* are
passed to the :class:`PrettyPrinter` constructor as formatting parameters
- and their meanings are as described in its documentation below.
+ and their meanings are as described in the documentation above.
.. function:: isreadable(object)
@@ -119,51 +152,39 @@ Functions
PrettyPrinter Objects
---------------------
-This module defines one class:
-
-.. First the implementation class:
-
-
.. index:: single: ...; placeholder
.. class:: PrettyPrinter(indent=1, width=80, depth=None, stream=None, *, \
compact=False, sort_dicts=True, underscore_numbers=False)
- Construct a :class:`PrettyPrinter` instance. This constructor understands
- several keyword parameters.
-
- *stream* (default :data:`!sys.stdout`) is a :term:`file-like object` to
- which the output will be written by calling its :meth:`!write` method.
- If both *stream* and :data:`!sys.stdout` are ``None``, then
- :meth:`~PrettyPrinter.pprint` silently returns.
+ Construct a :class:`PrettyPrinter` instance.
- Other values configure the manner in which nesting of complex data
- structures is displayed.
+ Arguments have the same meaning as for :func:`~pprint.pp`.
+ Note that they are in a different order, and that *sort_dicts* defaults to ``True``.
- *indent* (default 1) specifies the amount of indentation added for
- each nesting level.
-
- *depth* controls the number of nesting levels which may be printed; if
- the data structure being printed is too deep, the next contained level
- is replaced by ``...``. By default, there is no constraint on the
- depth of the objects being formatted.
-
- *width* (default 80) specifies the desired maximum number of characters per
- line in the output. If a structure cannot be formatted within the width
- constraint, a best effort will be made.
-
- *compact* impacts the way that long sequences (lists, tuples, sets, etc)
- are formatted. If *compact* is false (the default) then each item of a
- sequence will be formatted on a separate line. If *compact* is true, as
- many items as will fit within the *width* will be formatted on each output
- line.
-
- If *sort_dicts* is true (the default), dictionaries will be formatted with
- their keys sorted, otherwise they will display in insertion order.
+ >>> import pprint
+ >>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni']
+ >>> stuff.insert(0, stuff[:])
+ >>> pp = pprint.PrettyPrinter(indent=4)
+ >>> pp.pprint(stuff)
+ [ ['spam', 'eggs', 'lumberjack', 'knights', 'ni'],
+ 'spam',
+ 'eggs',
+ 'lumberjack',
+ 'knights',
+ 'ni']
+ >>> pp = pprint.PrettyPrinter(width=41, compact=True)
+ >>> pp.pprint(stuff)
+ [['spam', 'eggs', 'lumberjack',
+ 'knights', 'ni'],
+ 'spam', 'eggs', 'lumberjack', 'knights',
+ 'ni']
+ >>> tup = ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead',
+ ... ('parrot', ('fresh fruit',))))))))
+ >>> pp = pprint.PrettyPrinter(depth=6)
+ >>> pp.pprint(tup)
+ ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead', (...)))))))
- If *underscore_numbers* is true, integers will be formatted with the
- ``_`` character for a thousands separator, otherwise underscores are not
- displayed (the default).
.. versionchanged:: 3.4
Added the *compact* parameter.
@@ -177,29 +198,6 @@ This module defines one class:
.. versionchanged:: 3.11
No longer attempts to write to :data:`!sys.stdout` if it is ``None``.
- >>> import pprint
- >>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni']
- >>> stuff.insert(0, stuff[:])
- >>> pp = pprint.PrettyPrinter(indent=4)
- >>> pp.pprint(stuff)
- [ ['spam', 'eggs', 'lumberjack', 'knights', 'ni'],
- 'spam',
- 'eggs',
- 'lumberjack',
- 'knights',
- 'ni']
- >>> pp = pprint.PrettyPrinter(width=41, compact=True)
- >>> pp.pprint(stuff)
- [['spam', 'eggs', 'lumberjack',
- 'knights', 'ni'],
- 'spam', 'eggs', 'lumberjack', 'knights',
- 'ni']
- >>> tup = ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead',
- ... ('parrot', ('fresh fruit',))))))))
- >>> pp = pprint.PrettyPrinter(depth=6)
- >>> pp.pprint(tup)
- ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead', (...)))))))
-
:class:`PrettyPrinter` instances have the following methods:
1
0