Skip to content

Commit ed142be

Browse files
authored
Merge branch 'main' into pyrepl-add-console-tests-2
2 parents 561ac47 + de1428f commit ed142be

File tree

145 files changed

+4031
-1083
lines changed

Some content is hidden

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

145 files changed

+4031
-1083
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ jobs:
208208
with:
209209
config_hash: ${{ needs.check_source.outputs.config_hash }}
210210
# macos-14 is M1, macos-13 is Intel
211-
os-matrix: '["macos-14", "macos-13"]'
211+
os-matrix: '["macos-14-xlarge", "macos-13-large"]'
212212

213213
build_macos_free_threading:
214214
name: 'macOS (free-threading)'
@@ -218,8 +218,8 @@ jobs:
218218
with:
219219
config_hash: ${{ needs.check_source.outputs.config_hash }}
220220
free-threading: true
221-
# macos-14 is M1
222-
os-matrix: '["macos-14"]'
221+
# macos-14-large is Intel with 12 cores (most parallelism)
222+
os-matrix: '["macos-14-large"]'
223223

224224
build_ubuntu:
225225
name: 'Ubuntu'

.github/workflows/jit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
jit:
2424
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
2525
runs-on: ${{ matrix.runner }}
26-
timeout-minutes: 75
26+
timeout-minutes: 90
2727
strategy:
2828
fail-fast: false
2929
matrix:

.github/workflows/posix-deps-apt.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ apt-get -yq install \
1515
libgdbm-dev \
1616
libgdbm-compat-dev \
1717
liblzma-dev \
18+
libmpdec-dev \
1819
libncurses5-dev \
1920
libreadline6-dev \
2021
libsqlite3-dev \

.github/workflows/reusable-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
--prefix=/opt/python-dev \
5151
--with-openssl="$(brew --prefix openssl@3.0)"
5252
- name: Build CPython
53-
run: make -j4
53+
run: make -j8
5454
- name: Display build info
5555
run: make pythoninfo
5656
- name: Tests

Doc/c-api/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ state:
634634
635635
.. versionadded:: 3.9
636636
637-
.. c:function:: int PyModule_ExperimentalSetGIL(PyObject *module, void *gil)
637+
.. c:function:: int PyUnstable_Module_SetGIL(PyObject *module, void *gil)
638638
639639
Indicate that *module* does or does not support running without the global
640640
interpreter lock (GIL), using one of the values from

Doc/includes/email-dir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def main():
5353
# Guess the content type based on the file's extension. Encoding
5454
# will be ignored, although we should check for simple things like
5555
# gzip'd or compressed files.
56-
ctype, encoding = mimetypes.guess_type(path)
56+
ctype, encoding = mimetypes.guess_file_type(path)
5757
if ctype is None or encoding is not None:
5858
# No guess could be made, or the file is encoded (compressed), so
5959
# use a generic bag-of-bits type.

Doc/library/ast.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Node classes
6161

6262
.. attribute:: _fields
6363

64-
Each concrete class has an attribute :attr:`_fields` which gives the names
64+
Each concrete class has an attribute :attr:`!_fields` which gives the names
6565
of all child nodes.
6666

6767
Each instance of a concrete class has one attribute for each child node,
@@ -74,6 +74,18 @@ Node classes
7474
as Python lists. All possible attributes must be present and have valid
7575
values when compiling an AST with :func:`compile`.
7676

77+
.. attribute:: _field_types
78+
79+
The :attr:`!_field_types` attribute on each concrete class is a dictionary
80+
mapping field names (as also listed in :attr:`_fields`) to their types.
81+
82+
.. doctest::
83+
84+
>>> ast.TypeVar._field_types
85+
{'name': <class 'str'>, 'bound': ast.expr | None, 'default_value': ast.expr | None}
86+
87+
.. versionadded:: 3.13
88+
7789
.. attribute:: lineno
7890
col_offset
7991
end_lineno

Doc/library/asyncio-task.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ Task Object
13861386
with :meth:`uncancel`. :class:`TaskGroup` context managers use
13871387
:func:`uncancel` in a similar fashion.
13881388

1389-
If end-user code is, for some reason, suppresing cancellation by
1389+
If end-user code is, for some reason, suppressing cancellation by
13901390
catching :exc:`CancelledError`, it needs to call this method to remove
13911391
the cancellation state.
13921392

Doc/library/mimetypes.rst

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,22 @@ the information :func:`init` sets up.
5252
are also recognized.
5353

5454
.. versionchanged:: 3.8
55-
Added support for url being a :term:`path-like object`.
55+
Added support for *url* being a :term:`path-like object`.
56+
57+
.. deprecated:: 3.13
58+
Passing a file path instead of URL is :term:`soft deprecated`.
59+
Use :func:`guess_file_type` for this.
60+
61+
62+
.. function:: guess_file_type(path, *, strict=True)
63+
64+
.. index:: pair: MIME; headers
65+
66+
Guess the type of a file based on its path, given by *path*.
67+
Similar to the :func:`guess_type` function, but accepts a path instead of URL.
68+
Path can be a string, a bytes object or a :term:`path-like object`.
69+
70+
.. versionadded:: 3.13
5671

5772

5873
.. function:: guess_all_extensions(type, strict=True)
@@ -61,7 +76,7 @@ the information :func:`init` sets up.
6176
return value is a list of strings giving all possible filename extensions,
6277
including the leading dot (``'.'``). The extensions are not guaranteed to have
6378
been associated with any particular data stream, but would be mapped to the MIME
64-
type *type* by :func:`guess_type`.
79+
type *type* by :func:`guess_type` and :func:`guess_file_type`.
6580

6681
The optional *strict* argument has the same meaning as with the :func:`guess_type` function.
6782

@@ -72,8 +87,8 @@ the information :func:`init` sets up.
7287
return value is a string giving a filename extension, including the leading dot
7388
(``'.'``). The extension is not guaranteed to have been associated with any
7489
particular data stream, but would be mapped to the MIME type *type* by
75-
:func:`guess_type`. If no extension can be guessed for *type*, ``None`` is
76-
returned.
90+
:func:`guess_type` and :func:`guess_file_type`.
91+
If no extension can be guessed for *type*, ``None`` is returned.
7792

7893
The optional *strict* argument has the same meaning as with the :func:`guess_type` function.
7994

@@ -238,6 +253,14 @@ than one MIME-type database; it provides an interface similar to the one of the
238253
the object.
239254

240255

256+
.. method:: MimeTypes.guess_file_type(path, *, strict=True)
257+
258+
Similar to the :func:`guess_file_type` function, using the tables stored
259+
as part of the object.
260+
261+
.. versionadded:: 3.13
262+
263+
241264
.. method:: MimeTypes.guess_all_extensions(type, strict=True)
242265

243266
Similar to the :func:`guess_all_extensions` function, using the tables stored

Doc/library/tkinter.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,15 @@ of :class:`tkinter.Image`:
979979
Either type of image is created through either the ``file`` or the ``data``
980980
option (other options are available as well).
981981

982+
.. versionchanged:: 3.13
983+
Added the :class:`!PhotoImage` method :meth:`!copy_replace` to copy a region
984+
from one image to other image, possibly with pixel zooming and/or
985+
subsampling.
986+
Add *from_coords* parameter to :class:`!PhotoImage` methods :meth:`!copy()`,
987+
:meth:`!zoom()` and :meth:`!subsample()`.
988+
Add *zoom* and *subsample* parameters to :class:`!PhotoImage` method
989+
:meth:`!copy()`.
990+
982991
The image object can then be used wherever an ``image`` option is supported by
983992
some widget (e.g. labels, buttons, menus). In these cases, Tk will not keep a
984993
reference to the image. When the last Python reference to the image object is

0 commit comments

Comments
 (0)