Skip to content

Commit 7239150

Browse files
Merge branch '3.14' into backport-2456715-3.14
2 parents ce197dd + 47a2109 commit 7239150

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Doc/library/concurrent.interpreters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ makes them similar to processes, but they still enjoy in-process
134134
efficiency, like threads.
135135

136136
All that said, interpreters do naturally support certain flavors of
137-
concurrency, as a powerful side effect of that isolation.
137+
concurrency.
138138
There's a powerful side effect of that isolation. It enables a
139139
different approach to concurrency than you can take with async or
140140
threads. It's a similar concurrency model to CSP or the actor model,

Doc/tools/templates/customsourcelink.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h3>{{ _('This page') }}</h3>
44
<ul class="this-page-menu">
55
<li><a href="{{ pathto('bugs') }}">{% trans %}Report a bug{% endtrans %}</a></li>
66
<li>
7-
<a href="https://github.com/python/cpython/blob/main/Doc/{{ sourcename|replace('.rst.txt', '.rst') }}"
7+
<a href="https://github.com/python/cpython/blob/main/Doc/{{ sourcename|replace('.rst.txt', '.rst') }}?plain=1"
88
rel="nofollow">{{ _('Show source') }}
99
</a>
1010
</li>

Lib/shutil.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -994,14 +994,14 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
994994
"""Create a (possibly compressed) tar file from all the files under
995995
'base_dir'.
996996
997-
'compress' must be "gzip" (the default), "bzip2", "xz", or None.
997+
'compress' must be "gzip" (the default), "bzip2", "xz", "zst", or None.
998998
999999
'owner' and 'group' can be used to define an owner and a group for the
10001000
archive that is being built. If not provided, the current owner and group
10011001
will be used.
10021002
10031003
The output tar file will be named 'base_name' + ".tar", possibly plus
1004-
the appropriate compression extension (".gz", ".bz2", or ".xz").
1004+
the appropriate compression extension (".gz", ".bz2", ".xz", or ".zst").
10051005
10061006
Returns the output filename.
10071007
"""
@@ -1187,7 +1187,7 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
11871187
11881188
'base_name' is the name of the file to create, minus any format-specific
11891189
extension; 'format' is the archive format: one of "zip", "tar", "gztar",
1190-
"bztar", "zstdtar", or "xztar". Or any other registered format.
1190+
"bztar", "xztar", or "zstdtar". Or any other registered format.
11911191
11921192
'root_dir' is a directory that will be the root directory of the
11931193
archive; ie. we typically chdir into 'root_dir' before creating the
@@ -1337,7 +1337,7 @@ def _unpack_zipfile(filename, extract_dir):
13371337
zip.close()
13381338

13391339
def _unpack_tarfile(filename, extract_dir, *, filter=None):
1340-
"""Unpack tar/tar.gz/tar.bz2/tar.xz `filename` to `extract_dir`
1340+
"""Unpack tar/tar.gz/tar.bz2/tar.xz/tar.zst `filename` to `extract_dir`
13411341
"""
13421342
import tarfile # late import for breaking circular dependency
13431343
try:
@@ -1392,7 +1392,7 @@ def unpack_archive(filename, extract_dir=None, format=None, *, filter=None):
13921392
is unpacked. If not provided, the current working directory is used.
13931393
13941394
`format` is the archive format: one of "zip", "tar", "gztar", "bztar",
1395-
or "xztar". Or any other registered format. If not provided,
1395+
"xztar", or "zstdtar". Or any other registered format. If not provided,
13961396
unpack_archive will use the filename extension and see if an unpacker
13971397
was registered for that extension.
13981398

Lib/test/test_perf_profiler.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ def run_perf(cwd, *args, use_jit=False, **env_vars):
318318
stdout=subprocess.PIPE,
319319
stderr=subprocess.PIPE,
320320
env=env,
321+
text=True,
321322
)
322323
if proc.returncode:
323324
print(proc.stderr, file=sys.stderr)
@@ -327,10 +328,10 @@ def run_perf(cwd, *args, use_jit=False, **env_vars):
327328
jit_output_file = cwd + "/jit_output.dump"
328329
command = ("perf", "inject", "-j", "-i", output_file, "-o", jit_output_file)
329330
proc = subprocess.run(
330-
command, stderr=subprocess.PIPE, stdout=subprocess.PIPE, env=env
331+
command, stderr=subprocess.PIPE, stdout=subprocess.PIPE, env=env, text=True
331332
)
332333
if proc.returncode:
333-
print(proc.stderr)
334+
print(proc.stderr, file=sys.stderr)
334335
raise ValueError(f"Perf failed with return code {proc.returncode}")
335336
# Copy the jit_output_file to the output_file
336337
os.rename(jit_output_file, output_file)
@@ -342,10 +343,9 @@ def run_perf(cwd, *args, use_jit=False, **env_vars):
342343
stderr=subprocess.PIPE,
343344
env=env,
344345
check=True,
346+
text=True,
345347
)
346-
return proc.stdout.decode("utf-8", "replace"), proc.stderr.decode(
347-
"utf-8", "replace"
348-
)
348+
return proc.stdout, proc.stderr
349349

350350

351351
class TestPerfProfilerMixin:

0 commit comments

Comments
 (0)