Skip to content

Commit 79ce418

Browse files
authored
Merge branch 'python:main' into clang-pgo
2 parents 74ec74e + 798f8d3 commit 79ce418

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1748
-726
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ jobs:
658658
build_asan,
659659
build_tsan,
660660
test_hypothesis,
661+
cross-build-linux,
661662
'
662663
|| ''
663664
}}

Android/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ stderr. Add the `-v` option to also show Gradle output, and non-Python logcat
119119
messages.
120120

121121
Any other arguments on the `android.py test` command line will be passed through
122-
to `python -m test` use `--` to separate them from android.py's own options.
122+
to `python -m test` use `--` to separate them from android.py's own options.
123123
See the [Python Developer's
124124
Guide](https://devguide.python.org/testing/run-write-tests/) for common options
125-
 most of them will work on Android, except for those that involve subprocesses,
125+
most of them will work on Android, except for those that involve subprocesses,
126126
such as `-j`.
127127

128128
Every time you run `android.py test`, changes in pure-Python files in the

Doc/c-api/unicode.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,8 @@ the Python configuration.
256256
257257
.. c:function:: int Py_UNICODE_ISPRINTABLE(Py_UCS4 ch)
258258
259-
Return ``1`` or ``0`` depending on whether *ch* is a printable character.
260-
Nonprintable characters are those characters defined in the Unicode character
261-
database as "Other" or "Separator", excepting the ASCII space (0x20) which is
262-
considered printable. (Note that printable characters in this context are
263-
those which should not be escaped when :func:`repr` is invoked on a string.
264-
It has no bearing on the handling of strings written to :data:`sys.stdout` or
265-
:data:`sys.stderr`.)
259+
Return ``1`` or ``0`` depending on whether *ch* is a printable character,
260+
in the sense of :meth:`str.isprintable`.
266261
267262
268263
These APIs can be used for fast direct character conversions:

Doc/glossary.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,11 +939,16 @@ Glossary
939939
modules, respectively.
940940

941941
namespace package
942-
A :pep:`420` :term:`package` which serves only as a container for
943-
subpackages. Namespace packages may have no physical representation,
942+
A :term:`package` which serves only as a container for subpackages.
943+
Namespace packages may have no physical representation,
944944
and specifically are not like a :term:`regular package` because they
945945
have no ``__init__.py`` file.
946946

947+
Namespace packages allow several individually installable packages to have a common parent package.
948+
Otherwise, it is recommended to use a :term:`regular package`.
949+
950+
For more information, see :pep:`420` and :ref:`reference-namespace-package`.
951+
947952
See also :term:`module`.
948953

949954
nested scope

Doc/library/itertools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Examples Results
7979
``product('ABCD', repeat=2)`` ``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``
8080
``permutations('ABCD', 2)`` ``AB AC AD BA BC BD CA CB CD DA DB DC``
8181
``combinations('ABCD', 2)`` ``AB AC AD BC BD CD``
82-
``combinations_with_replacement('ABCD', 2)`` ``AA AB AC AD BB BC BD CC CD DD``
82+
``combinations_with_replacement('ABCD', 2)`` ``AA AB AC AD BB BC BD CC CD DD``
8383
============================================== =============================================================
8484

8585

Doc/library/sqlite3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ Connection objects
11481148
the *remaining* number of pages still to be copied,
11491149
and the *total* number of pages.
11501150
Defaults to ``None``.
1151-
:type progress: :term:`callback` | None
1151+
:type progress: :term:`callback` | None
11521152

11531153
:param str name:
11541154
The name of the database to back up.

Doc/library/stdtypes.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,13 +2012,19 @@ expression support in the :mod:`re` module).
20122012

20132013
.. method:: str.isprintable()
20142014

2015-
Return ``True`` if all characters in the string are printable or the string is
2016-
empty, ``False`` otherwise. Nonprintable characters are those characters defined
2017-
in the Unicode character database as "Other" or "Separator", excepting the
2018-
ASCII space (0x20) which is considered printable. (Note that printable
2019-
characters in this context are those which should not be escaped when
2020-
:func:`repr` is invoked on a string. It has no bearing on the handling of
2021-
strings written to :data:`sys.stdout` or :data:`sys.stderr`.)
2015+
Return true if all characters in the string are printable, false if it
2016+
contains at least one non-printable character.
2017+
2018+
Here "printable" means the character is suitable for :func:`repr` to use in
2019+
its output; "non-printable" means that :func:`repr` on built-in types will
2020+
hex-escape the character. It has no bearing on the handling of strings
2021+
written to :data:`sys.stdout` or :data:`sys.stderr`.
2022+
2023+
The printable characters are those which in the Unicode character database
2024+
(see :mod:`unicodedata`) have a general category in group Letter, Mark,
2025+
Number, Punctuation, or Symbol (L, M, N, P, or S); plus the ASCII space 0x20.
2026+
Nonprintable characters are those in group Separator or Other (Z or C),
2027+
except the ASCII space.
20222028

20232029

20242030
.. method:: str.isspace()

Doc/library/unittest.mock.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ Imagine we have a project that we want to test with the following structure::
20082008

20092009
Now we want to test ``some_function`` but we want to mock out ``SomeClass`` using
20102010
:func:`patch`. The problem is that when we import module b, which we will have to
2011-
do then it imports ``SomeClass`` from module a. If we use :func:`patch` to mock out
2011+
do when it imports ``SomeClass`` from module a. If we use :func:`patch` to mock out
20122012
``a.SomeClass`` then it will have no effect on our test; module b already has a
20132013
reference to the *real* ``SomeClass`` and it looks like our patching had no
20142014
effect.

Doc/reference/import.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ Importing ``parent.one`` will implicitly execute ``parent/__init__.py`` and
123123
``parent/three/__init__.py`` respectively.
124124

125125

126+
.. _reference-namespace-package:
127+
126128
Namespace packages
127129
------------------
128130

Doc/whatsnew/3.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
when researching a change.
4848
4949
This article explains the new features in Python 3.1, compared to 3.0.
50-
Python 3.1 was released on June 27, 2009.
50+
Python 3.1 was released on June 27, 2009.
5151

5252

5353
PEP 372: Ordered Dictionaries

0 commit comments

Comments
 (0)