Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,10 @@ Reading directories
PosixPath('setup.py'),
PosixPath('test_pathlib.py')]

.. note::
The paths are returned in no particular order.
If you need a specific order, sort the results.

.. seealso::
:ref:`pathlib-pattern-language` documentation.

Expand Down Expand Up @@ -1365,6 +1369,10 @@ Reading directories
Glob the given relative *pattern* recursively. This is like calling
:func:`Path.glob` with "``**/``" added in front of the *pattern*.

.. note::
The paths are returned in no particular order.
If you need a specific order, sort the results.

.. seealso::
:ref:`pathlib-pattern-language` and :meth:`Path.glob` documentation.

Expand Down
6 changes: 6 additions & 0 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,12 @@ Slice objects are used to represent slices for
:meth:`~object.__getitem__`
methods. They are also created by the built-in :func:`slice` function.

.. versionadded:: 3.15

The :func:`slice` type now supports :ref:`subscription <subscriptions>`. For
example, ``slice[float]`` may be used in type annotations to indicate a slice
containing :type:`float` objects.

.. index::
single: start (slice object attribute)
single: stop (slice object attribute)
Expand Down
9 changes: 6 additions & 3 deletions Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ Other language changes
:class:`tuple` (including classes created by :func:`collections.namedtuple`).
(Contributed by Serhiy Storchaka in :gh:`41779`.)

* The :class:`slice` type now supports subscription,
making it a :term:`generic type`.
(Contributed by James Hilton-Balfe in :gh:`128335`.)

New modules
===========
Expand Down Expand Up @@ -889,14 +892,14 @@ Upgraded JIT compiler

Results from the `pyperformance <https://github.com/python/pyperformance>`__
benchmark suite report
`3-4% <https://github.com/facebookexperimental/free-threading-benchmarking/blob/main/results/bm-20251214-3.15.0a2%2B-6cddf04-JIT/bm-20251214-vultr-x86_64-python-6cddf04344a1e8ca9df5-3.15.0a2%2B-6cddf04-vs-base.svg>`__
`4-5% <https://raw.githubusercontent.com/facebookexperimental/free-threading-benchmarking/refs/heads/main/results/bm-20260110-3.15.0a3%2B-aa8578d-JIT/bm-20260110-vultr-x86_64-python-aa8578dc54df2af9daa3-3.15.0a3%2B-aa8578d-vs-base.svg>`__
geometric mean performance improvement for the JIT over the standard CPython
interpreter built with all optimizations enabled on x86-64 Linux. On AArch64
macOS, the JIT has a
`7-8% <https://raw.githubusercontent.com/facebookexperimental/free-threading-benchmarking/refs/heads/main/results/bm-20260103-3.15.0a3%2B-9609574-JIT/bm-20260103-macm4pro-arm64-python-9609574e7fd36edfaa8b-3.15.0a3%2B-9609574-vs-base.svg>`__
`7-8% <https://raw.githubusercontent.com/facebookexperimental/free-threading-benchmarking/refs/heads/main/results/bm-20260110-3.15.0a3%2B-aa8578d-JIT/bm-20260110-macm4pro-arm64-python-aa8578dc54df2af9daa3-3.15.0a3%2B-aa8578d-vs-base.svg>`__
speedup over the :ref:`tail calling interpreter <whatsnew314-tail-call-interpreter>`
with all optimizations enabled. The speedups for JIT
builds versus no JIT builds range from roughly 20% slowdown to over
builds versus no JIT builds range from roughly 15% slowdown to over
100% speedup (ignoring the ``unpack_sequence`` microbenchmark) on
x86-64 Linux and AArch64 macOS systems.

Expand Down
10 changes: 5 additions & 5 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading