Skip to content

Commit 7ac748e

Browse files
Merge branch 'main' into aoi
2 parents 25d23d2 + 60f0e69 commit 7ac748e

File tree

5 files changed

+813
-7
lines changed

5 files changed

+813
-7
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ peps/pep-0792.rst @dstufft
674674
peps/pep-0793.rst @encukou
675675
peps/pep-0794.rst @brettcannon
676676
peps/pep-0797.rst @ZeroIntensity
677+
peps/pep-0798.rst @JelleZijlstra
677678
# ...
678679
peps/pep-0801.rst @warsaw
679680
# ...

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ venv:
6464
echo "venv already exists."; \
6565
echo "To recreate it, remove it first with \`make clean-venv'."; \
6666
else \
67+
set -e; \
6768
echo "Creating venv in $(VENVDIR)"; \
6869
if $(UV) --version >/dev/null 2>&1; then \
6970
$(UV) venv --python=$(PYTHON) $(VENVDIR); \

peps/pep-0747.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ expression, and it represents the type described by that type expression.
183183

184184
``TypeForm`` is a special form that, when used in a type expression, describes
185185
a set of type form objects. It accepts a single type argument, which must be a
186-
valid type expression. ``TypeForm[T]`` describes the set of all type form
186+
:ref:`valid type expression <valid-type-expressions>`. ``TypeForm[T]`` describes the set of all type form
187187
objects that represent the type ``T`` or types that are
188188
:term:`assignable to <typing:assignable>` ``T``. For example,
189189
``TypeForm[str | None]`` describes the set of all type form objects
@@ -218,9 +218,7 @@ equivalent to ``TypeForm[Any]``.
218218
Implicit ``TypeForm`` Evaluation
219219
--------------------------------
220220

221-
When a static type checker encounters an expression that follows all of the
222-
syntactic, semantic and contextual rules for a type expression as detailed
223-
in the typing spec, the evaluated type of this expression should be assignable
221+
When a static type checker encounters a valid type expression, the evaluated type of this expression should be assignable
224222
to ``TypeForm[T]`` if the type it describes is assignable to ``T``.
225223

226224
For example, if a static type checker encounters the expression ``str | None``,
@@ -248,6 +246,11 @@ be assignable to ``TypeForm``::
248246

249247
v5: TypeForm[set[str]] = "set[str]" # OK
250248

249+
.. _valid-type-expressions:
250+
251+
Valid Type Expressions
252+
----------------------
253+
251254
The typing spec defines syntactic rules for type expressions in the form of a
252255
:ref:`formal grammar <typing:expression-grammar>`. Semantic rules are specified
253256
as comments along with the grammar definition. Contextual requirements are detailed
@@ -256,8 +259,11 @@ type expressions. For example, the special form ``Self`` can be used in a
256259
type expression only within a class, and a type variable can be used within
257260
a type expression only when it is associated with a valid scope.
258261

259-
Expressions that violate one or more of the syntactic, semantic, or contextual
260-
rules for type expressions should not evaluate to a ``TypeForm`` type.::
262+
A valid type expression is an expression that follows all of the syntactic,
263+
semantic, and contextual rules for a type expression.
264+
265+
Expressions that are not valid type expressions should not evaluate to a
266+
``TypeForm`` type::
261267

262268
bad1: TypeForm = tuple() # Error: Call expression not allowed in type expression
263269
bad2: TypeForm = (1, 2) # Error: Tuple expression not allowed in type expression

peps/pep-0790.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Subsequent bugfix releases every two months.
5858

5959
* Python 3.15 will receive bugfix updates approximately every second month for
6060
two years.
61-
* Around the time of the release of 3.18.0 final, the final 3.15 bugfix update
61+
* Around the time of the release of 3.17.0 final, the final 3.15 bugfix update
6262
will be released.
6363
* After that, it is expected that security updates (source only) will be
6464
released for the next three years, until five years after the release of

0 commit comments

Comments
 (0)