Skip to content

Commit 86f0c44

Browse files
authored
Merge branch 'main' into interpolation-doc-fix
2 parents f38b43e + f0d8583 commit 86f0c44

22 files changed

+283
-229
lines changed

.github/CONTRIBUTING.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,18 @@ our workflow that are not covered by a bot or status check are:
3434
- All discussions that are not directly related to the code in the pull request
3535
should happen on `GitHub Issues <https://github.com/python/cpython/issues>`_.
3636
- Upon your first non-trivial pull request (which includes documentation changes),
37-
feel free to add yourself to ``Misc/ACKS``
37+
feel free to add yourself to ``Misc/ACKS``.
3838

3939

4040
Setting Expectations
4141
--------------------
42-
Due to the fact that this project is entirely volunteer-run (i.e. no one is paid
43-
to work on Python full-time), we unfortunately can make no guarantees as to if
42+
Due to the fact that this project is run by volunteers,
43+
unfortunately we cannot make any guarantees as to if
4444
or when a core developer will get around to reviewing your pull request.
4545
If no core developer has done a review or responded to changes made because of a
46-
"changes requested" review, please feel free to email python-dev to ask if
47-
someone could take a look at your pull request.
46+
"changes requested" review within a month, you can ask for someone to
47+
review your pull request via a post in the `Core Development Discourse
48+
category <https://discuss.python.org/c/core-dev/23>`__.
4849

4950

5051
Code of Conduct

Doc/library/mmap.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
212212
Writable :term:`bytes-like object` is now accepted.
213213

214214

215-
.. method:: flush([offset[, size]])
215+
.. method:: flush()
216+
flush(offset, size, /)
216217

217218
Flushes changes made to the in-memory copy of a file back to disk. Without
218219
use of this call there is no guarantee that changes are written back before

Doc/library/os.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,8 +2017,8 @@ features:
20172017
must be a string specifying a file path. However, some functions now
20182018
alternatively accept an open file descriptor for their *path* argument.
20192019
The function will then operate on the file referred to by the descriptor.
2020-
(For POSIX systems, Python will call the variant of the function prefixed
2021-
with ``f`` (e.g. call ``fchdir`` instead of ``chdir``).)
2020+
For POSIX systems, Python will call the variant of the function prefixed
2021+
with ``f`` (e.g. call ``fchdir`` instead of ``chdir``).
20222022

20232023
You can check whether or not *path* can be specified as a file descriptor
20242024
for a particular function on your platform using :data:`os.supports_fd`.
@@ -2033,7 +2033,7 @@ features:
20332033
* **paths relative to directory descriptors:** If *dir_fd* is not ``None``, it
20342034
should be a file descriptor referring to a directory, and the path to operate
20352035
on should be relative; path will then be relative to that directory. If the
2036-
path is absolute, *dir_fd* is ignored. (For POSIX systems, Python will call
2036+
path is absolute, *dir_fd* is ignored. For POSIX systems, Python will call
20372037
the variant of the function with an ``at`` suffix and possibly prefixed with
20382038
``f`` (e.g. call ``faccessat`` instead of ``access``).
20392039

@@ -2046,8 +2046,8 @@ features:
20462046
* **not following symlinks:** If *follow_symlinks* is
20472047
``False``, and the last element of the path to operate on is a symbolic link,
20482048
the function will operate on the symbolic link itself rather than the file
2049-
pointed to by the link. (For POSIX systems, Python will call the ``l...``
2050-
variant of the function.)
2049+
pointed to by the link. For POSIX systems, Python will call the ``l...``
2050+
variant of the function.
20512051

20522052
You can check whether or not *follow_symlinks* is supported for a particular
20532053
function on your platform using :data:`os.supports_follow_symlinks`.

Doc/library/zoneinfo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ The behavior of a ``ZoneInfo`` file depends on how it was constructed:
299299
1. ``ZoneInfo(key)``: When constructed with the primary constructor, a
300300
``ZoneInfo`` object is serialized by key, and when deserialized, the
301301
deserializing process uses the primary and thus it is expected that these
302-
are expected to be the same object as other references to the same time
302+
are the same object as other references to the same time
303303
zone. For example, if ``europe_berlin_pkl`` is a string containing a pickle
304304
constructed from ``ZoneInfo("Europe/Berlin")``, one would expect the
305305
following behavior:

Doc/reference/compound_stmts.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ the items are surrounded by parentheses. For example::
594594
statement.
595595

596596
.. _match:
597+
.. _case:
597598

598599
The :keyword:`!match` statement
599600
===============================

Lib/difflib.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,8 +1924,11 @@ def _format_line(self,side,flag,linenum,text):
19241924
# make space non-breakable so they don't get compressed or line wrapped
19251925
text = text.replace(' ','&nbsp;').rstrip()
19261926

1927-
return '<td class="diff_header"%s>%s</td><td nowrap="nowrap">%s</td>' \
1928-
% (id,linenum,text)
1927+
# add a class to the td tag if there is a difference on the line
1928+
css_class = ' class="diff_changed" ' if flag else ' '
1929+
1930+
return f'<td class="diff_header"{id}>{linenum}</td>' \
1931+
+ f'<td{css_class}nowrap="nowrap">{text}</td>'
19291932

19301933
def _make_prefix(self):
19311934
"""Create unique anchor prefixes"""

Lib/test/test_capi/test_misc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,6 +1996,7 @@ def test_pending_call_creates_thread_subinterpreter(self):
19961996
def output():
19971997
time.sleep(1)
19981998
os.write({w}, b"x")
1999+
os.close({w})
19992000
20002001
20012002
def callback():
@@ -2014,6 +2015,7 @@ def create_pending_call():
20142015
interp.close()
20152016
data = os.read(r, 1)
20162017
self.assertEqual(data, b"x")
2018+
os.close(r)
20172019

20182020

20192021
@requires_subinterpreters

0 commit comments

Comments
 (0)