Skip to content

Commit b4a620d

Browse files
gh-133879: Copyedit "What's new in Python 3.15" (#144661)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parent 23d45f0 commit b4a620d

File tree

2 files changed

+57
-46
lines changed

2 files changed

+57
-46
lines changed

Doc/library/profiling.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Choosing a profiler
6363

6464
For most performance analysis, use the statistical profiler
6565
(:mod:`profiling.sampling`). It has minimal overhead, works for both development
66-
and production, and provides rich visualization options including flamegraphs,
66+
and production, and provides rich visualization options including flame graphs,
6767
heatmaps, GIL analysis, and more.
6868

6969
Use the deterministic profiler (:mod:`profiling.tracing`) when you need **exact
@@ -81,7 +81,7 @@ The following table summarizes the key differences:
8181
+--------------------+------------------------------+------------------------------+
8282
| **Accuracy** | Statistical estimate | Exact call counts |
8383
+--------------------+------------------------------+------------------------------+
84-
| **Output formats** | pstats, flamegraph, heatmap, | pstats |
84+
| **Output formats** | pstats, flame graph, heatmap,| pstats |
8585
| | gecko, collapsed | |
8686
+--------------------+------------------------------+------------------------------+
8787
| **Profiling modes**| Wall-clock, CPU, GIL | Wall-clock |
@@ -103,7 +103,7 @@ performance analysis tasks. Use it the same way you would use
103103

104104
One of the main strengths of the sampling profiler is its variety of output
105105
formats. Beyond traditional pstats tables, it can generate interactive
106-
flamegraphs that visualize call hierarchies, line-level source heatmaps that
106+
flame graphs that visualize call hierarchies, line-level source heatmaps that
107107
show exactly where time is spent in your code, and Firefox Profiler output for
108108
timeline-based analysis.
109109

@@ -157,7 +157,7 @@ command::
157157
python -m profiling.sampling run -m mypackage.module
158158

159159
This runs the script under the profiler and prints a summary of where time was
160-
spent. For an interactive flamegraph::
160+
spent. For an interactive flame graph::
161161

162162
python -m profiling.sampling run --flamegraph script.py
163163

@@ -197,7 +197,7 @@ Understanding profile output
197197

198198
Both profilers collect function-level statistics, though they present them in
199199
different formats. The sampling profiler offers multiple visualizations
200-
(flamegraphs, heatmaps, Firefox Profiler, pstats tables), while the
200+
(flame graphs, heatmaps, Firefox Profiler, pstats tables), while the
201201
deterministic profiler produces pstats-compatible output. Regardless of format,
202202
the underlying concepts are the same.
203203

@@ -226,7 +226,7 @@ Key profiling concepts:
226226

227227
**Caller/Callee relationships**
228228
Which functions called a given function (callers) and which functions it
229-
called (callees). Flamegraphs visualize this as nested rectangles; pstats
229+
called (callees). Flame graphs visualize this as nested rectangles; pstats
230230
can display it via the :meth:`~pstats.Stats.print_callers` and
231231
:meth:`~pstats.Stats.print_callees` methods.
232232

@@ -248,7 +248,7 @@ continue to work without modification in all future Python versions.
248248
.. seealso::
249249

250250
:mod:`profiling.sampling`
251-
Statistical sampling profiler with flamegraphs, heatmaps, and GIL analysis.
251+
Statistical sampling profiler with flame graphs, heatmaps, and GIL analysis.
252252
Recommended for most users.
253253

254254
:mod:`profiling.tracing`

Doc/whatsnew/3.15.rst

Lines changed: 50 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Summary -- Release highlights
6868
* :pep:`799`: :ref:`A dedicated profiling package for organizing Python
6969
profiling tools <whatsnew315-profiling-package>`
7070
* :pep:`799`: :ref:`Tachyon: High frequency statistical sampling profiler
71-
profiling tools <whatsnew315-sampling-profiler>`
71+
<whatsnew315-sampling-profiler>`
7272
* :pep:`798`: :ref:`Unpacking in Comprehensions
7373
<whatsnew315-unpacking-in-comprehensions>`
7474
* :pep:`686`: :ref:`Python now uses UTF-8 as the default encoding
@@ -161,13 +161,13 @@ Key features include:
161161
timing with direct and cumulative samples. Best for detailed analysis and integration with
162162
existing Python profiling tools.
163163
* ``--collapsed``: Generates collapsed stack traces (one line per stack). This format is
164-
specifically designed for creating flamegraphs with external tools like Brendan Gregg's
164+
specifically designed for creating flame graphs with external tools like Brendan Gregg's
165165
FlameGraph scripts or speedscope.
166-
* ``--flamegraph``: Generates a self-contained interactive HTML flamegraph using D3.js.
167-
Opens directly in your browser for immediate visual analysis. Flamegraphs show the call
166+
* ``--flamegraph``: Generates a self-contained interactive HTML flame graph using D3.js.
167+
Opens directly in your browser for immediate visual analysis. Flame graphs show the call
168168
hierarchy where width represents time spent, making it easy to spot bottlenecks at a glance.
169-
* ``--gecko``: Generates Gecko Profiler format compatible with Firefox Profiler
170-
(https://profiler.firefox.com). Upload the output to Firefox Profiler for advanced
169+
* ``--gecko``: Generates Gecko Profiler format compatible with `Firefox Profiler
170+
<https://profiler.firefox.com>`__. Upload the output to Firefox Profiler for advanced
171171
timeline-based analysis with features like stack charts, markers, and network activity.
172172
* ``--heatmap``: Generates an interactive HTML heatmap visualization with line-level sample
173173
counts. Creates a directory with per-file heatmaps showing exactly where time is spent
@@ -189,6 +189,7 @@ available output formats, profiling modes, and configuration options.
189189

190190
(Contributed by Pablo Galindo and László Kiss Kollár in :gh:`135953` and :gh:`138122`.)
191191

192+
192193
.. _whatsnew315-unpacking-in-comprehensions:
193194

194195
:pep:`798`: Unpacking in Comprehensions
@@ -229,6 +230,7 @@ agen() for x in a)``.
229230

230231
(Contributed by Adam Hartz in :gh:`143055`.)
231232

233+
232234
.. _whatsnew315-improved-error-messages:
233235

234236
Improved error messages
@@ -447,6 +449,7 @@ Other language changes
447449
making it a :term:`generic type`.
448450
(Contributed by James Hilton-Balfe in :gh:`128335`.)
449451

452+
450453
New modules
451454
===========
452455

@@ -476,6 +479,7 @@ argparse
476479
inline code when color output is enabled.
477480
(Contributed by Savannah Ostrowski in :gh:`142390`.)
478481

482+
479483
base64
480484
------
481485

@@ -488,6 +492,7 @@ base64
488492
* Added the *ignorechars* parameter in :func:`~base64.b64decode`.
489493
(Contributed by Serhiy Storchaka in :gh:`144001`.)
490494

495+
491496
binascii
492497
--------
493498

@@ -526,6 +531,7 @@ collections
526531
between :class:`~collections.Counter` objects.
527532
(Contributed by Raymond Hettinger in :gh:`138682`.)
528533

534+
529535
collections.abc
530536
---------------
531537

@@ -581,7 +587,6 @@ dbm
581587
(Contributed by Andrea Oliveri in :gh:`134004`.)
582588

583589

584-
585590
difflib
586591
-------
587592

@@ -667,8 +672,10 @@ math
667672
mimetypes
668673
---------
669674

670-
* Add ``application/dicom`` MIME type for ``.dcm`` extension. (Contributed by Benedikt Johannes in :gh:`144217`.)
671-
* Add ``application/node`` MIME type for ``.cjs`` extension. (Contributed by John Franey in :gh:`140937`.)
675+
* Add ``application/dicom`` MIME type for ``.dcm`` extension.
676+
(Contributed by Benedikt Johannes in :gh:`144217`.)
677+
* Add ``application/node`` MIME type for ``.cjs`` extension.
678+
(Contributed by John Franey in :gh:`140937`.)
672679
* Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)
673680
* Add ``image/jxl``. (Contributed by Foolbar in :gh:`144213`.)
674681
* Rename ``application/x-texinfo`` to ``application/texinfo``.
@@ -748,16 +755,16 @@ sqlite3
748755

749756
* The :ref:`command-line interface <sqlite3-cli>` has several new features:
750757

751-
* SQL keyword completion on <tab>.
752-
(Contributed by Long Tan in :gh:`133393`.)
758+
* SQL keyword completion on <tab>.
759+
(Contributed by Long Tan in :gh:`133393`.)
753760

754-
* Prompts, error messages, and help text are now colored.
755-
This is enabled by default, see :ref:`using-on-controlling-color` for
756-
details.
757-
(Contributed by Stan Ulbrych and Łukasz Langa in :gh:`133461`.)
761+
* Prompts, error messages, and help text are now colored.
762+
This is enabled by default, see :ref:`using-on-controlling-color` for
763+
details.
764+
(Contributed by Stan Ulbrych and Łukasz Langa in :gh:`133461`.)
758765

759-
* Table, index, trigger, view, column, function, and schema completion on <tab>.
760-
(Contributed by Long Tan in :gh:`136101`.)
766+
* Table, index, trigger, view, column, function, and schema completion on <tab>.
767+
(Contributed by Long Tan in :gh:`136101`.)
761768

762769

763770
ssl
@@ -769,21 +776,21 @@ ssl
769776

770777
* Added new methods for managing groups used for SSL key agreement
771778

772-
* :meth:`ssl.SSLContext.set_groups` sets the groups allowed for doing
773-
key agreement, extending the previous
774-
:meth:`ssl.SSLContext.set_ecdh_curve` method.
775-
This new API provides the ability to list multiple groups and
776-
supports fixed-field and post-quantum groups in addition to ECDH
777-
curves. This method can also be used to control what key shares
778-
are sent in the TLS handshake.
779-
* :meth:`ssl.SSLSocket.group` returns the group selected for doing key
780-
agreement on the current connection after the TLS handshake completes.
781-
This call requires OpenSSL 3.2 or later.
782-
* :meth:`ssl.SSLContext.get_groups` returns a list of all available key
783-
agreement groups compatible with the minimum and maximum TLS versions
784-
currently set in the context. This call requires OpenSSL 3.5 or later.
785-
786-
(Contributed by Ron Frederick in :gh:`136306`.)
779+
* :meth:`ssl.SSLContext.set_groups` sets the groups allowed for doing
780+
key agreement, extending the previous
781+
:meth:`ssl.SSLContext.set_ecdh_curve` method.
782+
This new API provides the ability to list multiple groups and
783+
supports fixed-field and post-quantum groups in addition to ECDH
784+
curves. This method can also be used to control what key shares
785+
are sent in the TLS handshake.
786+
* :meth:`ssl.SSLSocket.group` returns the group selected for doing key
787+
agreement on the current connection after the TLS handshake completes.
788+
This call requires OpenSSL 3.2 or later.
789+
* :meth:`ssl.SSLContext.get_groups` returns a list of all available key
790+
agreement groups compatible with the minimum and maximum TLS versions
791+
currently set in the context. This call requires OpenSSL 3.5 or later.
792+
793+
(Contributed by Ron Frederick in :gh:`136306`.)
787794

788795
* Added a new method :meth:`ssl.SSLContext.set_ciphersuites` for setting TLS 1.3
789796
ciphers. For TLS 1.2 or earlier, :meth:`ssl.SSLContext.set_ciphers` should
@@ -807,7 +814,8 @@ ssl
807814
selected for the server to complete the TLS handshake on the current
808815
connection. This call requires OpenSSL 3.5 or later.
809816

810-
(Contributed by Ron Frederick in :gh:`138252`.)
817+
(Contributed by Ron Frederick in :gh:`138252`.)
818+
811819

812820
subprocess
813821
----------
@@ -824,6 +832,7 @@ subprocess
824832
traditional busy loop (non-blocking call and short sleeps).
825833
(Contributed by Giampaolo Rodola in :gh:`83069`).
826834

835+
827836
symtable
828837
--------
829838

@@ -879,18 +888,18 @@ tkinter
879888
arguments: *nolinestop* which allows the search to
880889
continue across line boundaries;
881890
and *strictlimits* which restricts the search to within the specified range.
882-
(Contributed by Rihaan Meher in :gh:`130848`)
891+
(Contributed by Rihaan Meher in :gh:`130848`.)
883892

884893
* A new method :meth:`!tkinter.Text.search_all` has been introduced.
885894
This method allows for searching for all matches of a pattern
886895
using Tcl's ``-all`` and ``-overlap`` options.
887-
(Contributed by Rihaan Meher in :gh:`130848`)
896+
(Contributed by Rihaan Meher in :gh:`130848`.)
888897

889898
* Added new methods :meth:`!pack_content`, :meth:`!place_content` and
890899
:meth:`!grid_content` which use Tk commands with new names (introduced
891900
in Tk 8.6) instead of :meth:`!*_slaves` methods which use Tk commands
892901
with outdated names.
893-
(Contributed by Serhiy Storchaka in :gh:`143754`)
902+
(Contributed by Serhiy Storchaka in :gh:`143754`.)
894903

895904

896905
.. _whatsnew315-tomllib-1-1-0:
@@ -1060,6 +1069,7 @@ Optimizations
10601069
(Contributed by Chris Eibl, Ken Jin, and Brandt Bucher in :gh:`143068`.
10611070
Special thanks to the MSVC team including Hulon Jenkins.)
10621071

1072+
10631073
base64 & binascii
10641074
-----------------
10651075

@@ -1072,6 +1082,7 @@ base64 & binascii
10721082
two orders of magnitude less memory.
10731083
(Contributed by James Seo and Serhiy Storchaka in :gh:`101178`.)
10741084

1085+
10751086
csv
10761087
---
10771088

@@ -1202,7 +1213,7 @@ importlib.resources
12021213

12031214
* Removed deprecated ``package`` parameter
12041215
from :func:`importlib.resources.files` function.
1205-
(Contributed by Semyon Moroz in :gh:`138044`)
1216+
(Contributed by Semyon Moroz in :gh:`138044`.)
12061217

12071218

12081219
pathlib
@@ -1453,7 +1464,7 @@ Changed C APIs
14531464

14541465
* If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` or :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF`
14551466
flag is set then :c:macro:`Py_TPFLAGS_HAVE_GC` must be set too.
1456-
(Contributed by Sergey Miryanov in :gh:`134786`)
1467+
(Contributed by Sergey Miryanov in :gh:`134786`.)
14571468

14581469

14591470
Porting to Python 3.15
@@ -1610,7 +1621,7 @@ Build changes
16101621
:manpage:`PR_SET_VMA_ANON_NAME <PR_SET_VMA(2const)>` (Linux 5.17 or newer).
16111622
Annotations are visible in ``/proc/<pid>/maps`` if the kernel supports the feature
16121623
and :option:`-X dev <-X>` is passed to the Python or Python is built in :ref:`debug mode <debug-build>`.
1613-
(Contributed by Donghee Na in :gh:`141770`)
1624+
(Contributed by Donghee Na in :gh:`141770`.)
16141625

16151626

16161627
Porting to Python 3.15

0 commit comments

Comments
 (0)