Skip to content

Commit 39cc2e9

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pep728
2 parents e556762 + f9a2055 commit 39cc2e9

File tree

5 files changed

+742
-102
lines changed

5 files changed

+742
-102
lines changed

.github/workflows/third_party.yml

Lines changed: 54 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,27 @@ jobs:
4848
runs-on: ubuntu-latest
4949
timeout-minutes: 60
5050
steps:
51-
- name: Checkout pydantic
52-
uses: actions/checkout@v4
51+
- name: Setup Python
52+
uses: actions/setup-python@v5
5353
with:
54-
repository: pydantic/pydantic
55-
- name: Edit pydantic pyproject.toml
56-
# pydantic's python-requires means pdm won't let us add typing-extensions-latest
57-
# as a requirement unless we do this
58-
run: sed -i 's/^requires-python = .*/requires-python = ">=3.8"/' pyproject.toml
54+
python-version: ${{ matrix.python-version }}
55+
allow-prereleases: true
56+
- name: Install uv
57+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
58+
- name: Checkout pydantic
59+
run: git clone --depth=1 https://github.com/pydantic/pydantic.git || git clone --depth=1 https://github.com/pydantic/pydantic.git
5960
- name: Checkout typing_extensions
6061
uses: actions/checkout@v4
6162
with:
6263
path: typing-extensions-latest
63-
- name: Setup pdm for pydantic tests
64-
uses: pdm-project/setup-pdm@v4
65-
with:
66-
python-version: ${{ matrix.python-version }}
67-
allow-python-prereleases: true
6864
- name: Add local version of typing_extensions as a dependency
69-
run: pdm add ./typing-extensions-latest
65+
run: cd pydantic; uv add --editable ../typing-extensions-latest
7066
- name: Install pydantic test dependencies
71-
run: pdm install -G testing -G email
67+
run: cd pydantic; uv sync --group dev
7268
- name: List installed dependencies
73-
run: pdm list -vv # pdm equivalent to `pip list`
69+
run: cd pydantic; uv pip list
7470
- name: Run pydantic tests
75-
run: pdm run pytest
71+
run: cd pydantic; uv run pytest
7672

7773
typing_inspect:
7874
name: typing_inspect tests
@@ -93,21 +89,18 @@ jobs:
9389
runs-on: ubuntu-latest
9490
timeout-minutes: 60
9591
steps:
96-
- name: Checkout typing_inspect
97-
uses: actions/checkout@v4
98-
with:
99-
repository: ilevkivskyi/typing_inspect
100-
path: typing_inspect
101-
- name: Checkout typing_extensions
102-
uses: actions/checkout@v4
103-
with:
104-
path: typing-extensions-latest
10592
- name: Setup Python
10693
uses: actions/setup-python@v5
10794
with:
10895
python-version: ${{ matrix.python-version }}
10996
- name: Install uv
11097
run: curl -LsSf https://astral.sh/uv/install.sh | sh
98+
- name: Checkout typing_inspect
99+
run: git clone --depth=1 https://github.com/ilevkivskyi/typing_inspect.git || git clone --depth=1 https://github.com/ilevkivskyi/typing_inspect.git
100+
- name: Checkout typing_extensions
101+
uses: actions/checkout@v4
102+
with:
103+
path: typing-extensions-latest
111104
- name: Install typing_inspect test dependencies
112105
run: |
113106
set -x
@@ -141,22 +134,19 @@ jobs:
141134
runs-on: ubuntu-latest
142135
timeout-minutes: 60
143136
steps:
144-
- name: Check out pyanalyze
145-
uses: actions/checkout@v4
146-
with:
147-
repository: quora/pyanalyze
148-
path: pyanalyze
149-
- name: Checkout typing_extensions
150-
uses: actions/checkout@v4
151-
with:
152-
path: typing-extensions-latest
153137
- name: Setup Python
154138
uses: actions/setup-python@v5
155139
with:
156140
python-version: ${{ matrix.python-version }}
157141
allow-prereleases: true
158142
- name: Install uv
159143
run: curl -LsSf https://astral.sh/uv/install.sh | sh
144+
- name: Check out pyanalyze
145+
run: git clone --depth=1 https://github.com/quora/pyanalyze.git || git clone --depth=1 https://github.com/quora/pyanalyze.git
146+
- name: Checkout typing_extensions
147+
uses: actions/checkout@v4
148+
with:
149+
path: typing-extensions-latest
160150
- name: Install pyanalyze test requirements
161151
run: |
162152
set -x
@@ -190,22 +180,19 @@ jobs:
190180
runs-on: ubuntu-latest
191181
timeout-minutes: 60
192182
steps:
193-
- name: Check out typeguard
194-
uses: actions/checkout@v4
195-
with:
196-
repository: agronholm/typeguard
197-
path: typeguard
198-
- name: Checkout typing_extensions
199-
uses: actions/checkout@v4
200-
with:
201-
path: typing-extensions-latest
202183
- name: Setup Python
203184
uses: actions/setup-python@v5
204185
with:
205186
python-version: ${{ matrix.python-version }}
206187
allow-prereleases: true
207188
- name: Install uv
208189
run: curl -LsSf https://astral.sh/uv/install.sh | sh
190+
- name: Check out typeguard
191+
run: git clone --depth=1 https://github.com/agronholm/typeguard.git || git clone --depth=1 https://github.com/agronholm/typeguard.git
192+
- name: Checkout typing_extensions
193+
uses: actions/checkout@v4
194+
with:
195+
path: typing-extensions-latest
209196
- name: Install typeguard test requirements
210197
run: |
211198
set -x
@@ -236,26 +223,22 @@ jobs:
236223
strategy:
237224
fail-fast: false
238225
matrix:
239-
# 3.13 support: https://github.com/swansonk14/typed-argument-parser/issues/150
240-
python-version: ["3.9", "3.10", "3.11", "3.12"]
226+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
241227
runs-on: ubuntu-latest
242228
timeout-minutes: 60
243229
steps:
244-
- name: Check out typed-argument-parser
245-
uses: actions/checkout@v4
246-
with:
247-
repository: swansonk14/typed-argument-parser
248-
path: typed-argument-parser
249-
- name: Checkout typing_extensions
250-
uses: actions/checkout@v4
251-
with:
252-
path: typing-extensions-latest
253230
- name: Setup Python
254231
uses: actions/setup-python@v5
255232
with:
256233
python-version: ${{ matrix.python-version }}
257234
- name: Install uv
258235
run: curl -LsSf https://astral.sh/uv/install.sh | sh
236+
- name: Check out typed-argument-parser
237+
run: git clone --depth=1 https://github.com/swansonk14/typed-argument-parser.git || git clone --depth=1 https://github.com/swansonk14/typed-argument-parser.git
238+
- name: Checkout typing_extensions
239+
uses: actions/checkout@v4
240+
with:
241+
path: typing-extensions-latest
259242
- name: Configure git for typed-argument-parser tests
260243
# typed-argument parser does this in their CI,
261244
# and the tests fail unless we do this
@@ -296,22 +279,19 @@ jobs:
296279
runs-on: ubuntu-latest
297280
timeout-minutes: 60
298281
steps:
299-
- name: Checkout mypy for stubtest and mypyc tests
300-
uses: actions/checkout@v4
301-
with:
302-
repository: python/mypy
303-
path: mypy
304-
- name: Checkout typing_extensions
305-
uses: actions/checkout@v4
306-
with:
307-
path: typing-extensions-latest
308282
- name: Setup Python
309283
uses: actions/setup-python@v5
310284
with:
311285
python-version: ${{ matrix.python-version }}
312286
allow-prereleases: true
313287
- name: Install uv
314288
run: curl -LsSf https://astral.sh/uv/install.sh | sh
289+
- name: Checkout mypy for stubtest and mypyc tests
290+
run: git clone --depth=1 https://github.com/python/mypy.git || git clone --depth=1 https://github.com/python/mypy.git
291+
- name: Checkout typing_extensions
292+
uses: actions/checkout@v4
293+
with:
294+
path: typing-extensions-latest
315295
- name: Install mypy test requirements
316296
run: |
317297
set -x
@@ -347,30 +327,29 @@ jobs:
347327
runs-on: ubuntu-latest
348328
timeout-minutes: 60
349329
steps:
350-
- name: Checkout cattrs
351-
uses: actions/checkout@v4
330+
- name: Setup Python
331+
uses: actions/setup-python@v5
352332
with:
353-
repository: python-attrs/cattrs
333+
python-version: ${{ matrix.python-version }}
334+
- name: Checkout cattrs
335+
run: git clone --depth=1 https://github.com/python-attrs/cattrs.git || git clone --depth=1 https://github.com/python-attrs/cattrs.git
354336
- name: Checkout typing_extensions
355337
uses: actions/checkout@v4
356338
with:
357339
path: typing-extensions-latest
358-
- name: Setup Python
359-
uses: actions/setup-python@v5
360-
with:
361-
python-version: ${{ matrix.python-version }}
362340
- name: Install pdm for cattrs
363341
run: pip install pdm
364342
- name: Add latest typing-extensions as a dependency
365343
run: |
344+
cd cattrs
366345
pdm remove typing-extensions
367-
pdm add --dev ./typing-extensions-latest
346+
pdm add --dev ../typing-extensions-latest
368347
- name: Install cattrs test dependencies
369-
run: pdm install --dev -G :all
348+
run: cd cattrs; pdm install --dev -G :all
370349
- name: List all installed dependencies
371-
run: pdm list -vv
350+
run: cd cattrs; pdm list -vv
372351
- name: Run cattrs tests
373-
run: pdm run pytest tests
352+
run: cd cattrs; pdm run pytest tests
374353

375354
create-issue-on-failure:
376355
name: Create an issue if daily tests failed
@@ -413,5 +392,5 @@ jobs:
413392
owner: "python",
414393
repo: "typing_extensions",
415394
title: `Third-party tests failed on ${new Date().toDateString()}`,
416-
body: "Runs listed here: https://github.com/python/typing_extensions/actions/workflows/third_party.yml",
395+
body: "Run listed here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
417396
})

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ aliases that have a `Concatenate` special form as their argument.
2323
`Ellipsis` as an argument. Patch by [Daraan](https://github.com/Daraan).
2424
- Fix error in subscription of `Unpack` aliases causing nested Unpacks
2525
to not be resolved correctly. Patch by [Daraan](https://github.com/Daraan).
26+
- Backport CPython PR [#124795](https://github.com/python/cpython/pull/124795):
27+
fix `TypeAliasType` not raising an error on non-tuple inputs for `type_params`.
28+
Patch by [Daraan](https://github.com/Daraan).
29+
- Fix that lists and ... could not be used for parameter expressions for `TypeAliasType`
30+
instances before Python 3.11.
31+
Patch by [Daraan](https://github.com/Daraan).
32+
- Fix error on Python 3.10 when using `typing.Concatenate` and
33+
`typing_extensions.Concatenate` together. Patch by [Daraan](https://github.com/Daraan).
2634

2735
# Release 4.12.2 (June 7, 2024)
2836

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version = "4.12.2"
1010
description = "Backported and Experimental Type Hints for Python 3.8+"
1111
readme = "README.md"
1212
requires-python = ">=3.8"
13-
license = { file = "LICENSE" }
13+
license = { text = "PSF-2.0" }
1414
keywords = [
1515
"annotations",
1616
"backport",

0 commit comments

Comments
 (0)