Skip to content

Commit 549e775

Browse files
sir-sigurdclaude
andauthored
chore: use stdlib typing instead of typing_extensions (#5149)
py-shared requires Python >= 3.12 and s3hash 3.13, so `assert_never` (stdlib since 3.11) and `ParamSpec` (since 3.10) no longer need the backport. s3hash was importing `typing_extensions` without declaring it, relying on `quilt-shared[pydantic]` to pull it in. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 66334b0 commit 549e775

6 files changed

Lines changed: 5 additions & 10 deletions

File tree

lambdas/s3hash/src/t4_lambda_s3hash/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import aiobotocore.session
1515
import botocore.exceptions
1616
import pydantic.v1
17-
import typing_extensions as TX
1817

1918
from quilt3.data_transfer import get_checksum_chunksize, is_mpu
2019
from quilt_shared.aws import AWSCredentials
@@ -351,7 +350,7 @@ async def compute_checksum(
351350
elif algorithm is ChecksumAlgorithm.SHA256_CHUNKED:
352351
checksum = Checksum.sha256_chunked_from_parts(part_checksums)
353352
else:
354-
TX.assert_never(algorithm)
353+
T.assert_never(algorithm)
355354

356355
logger.info(f"[PERF] compute_checksum END: {location} -> {checksum.type}")
357356
return ChecksumResult(checksum=checksum)

py-shared/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ where verb is one of
1717

1818
## Changes
1919

20+
- [Removed] Drop the `typing-extensions` dependency from the `pydantic` extra ([#5149](https://github.com/quiltdata/quilt/pull/5149))
2021
- [Changed] **BREAKING**: Raise minimum Python to 3.12 ([#5018](https://github.com/quiltdata/quilt/pull/5018))
2122
- [Changed] **BREAKING**: Retarget `QueryMaker` to per-bucket Iceberg tables (`{bucket}_{table}`) ([#4930](https://github.com/quiltdata/quilt/pull/4930))
2223
- [Added] Add CRC64NVME checksum type support ([#4623](https://github.com/quiltdata/quilt/pull/4623))

py-shared/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dependencies = [
1313
[project.optional-dependencies]
1414
pydantic = [
1515
"pydantic ~= 2.10",
16-
"typing-extensions ~= 4.9",
1716
]
1817
boto = [
1918
"boto3 ~= 1.34",

py-shared/src/quilt_shared/pkgpush.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import typing as T
99

1010
import pydantic.v1
11-
import typing_extensions as TX
1211

1312
from .aws import AWSCredentials
1413
from .crc64 import combine_crc64nvme
@@ -83,15 +82,15 @@ def s3_checksum_algorithm(self):
8382
return "SHA256"
8483
if self is self.CRC64NVME:
8584
return "CRC64NVME"
86-
TX.assert_never(self)
85+
T.assert_never(self)
8786

8887
@property
8988
def s3_checksum_field(self):
9089
if self is self.SHA256_CHUNKED:
9190
return "ChecksumSHA256"
9291
if self is self.CRC64NVME:
9392
return "ChecksumCRC64NVME"
94-
TX.assert_never(self)
93+
T.assert_never(self)
9594

9695

9796
class ChecksumType(str, enum.Enum):

py-shared/src/quilt_shared/types.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
import typing as T
33

44
import pydantic.v1
5-
import typing_extensions as TX
65

76

87
class NonEmptyStr(pydantic.v1.ConstrainedStr):
98
min_length = 1
109
strip_whitespace = True
1110

1211

13-
ConsParams = TX.ParamSpec("ConsParams")
12+
ConsParams = T.ParamSpec("ConsParams")
1413
ConsReturn = T.TypeVar("ConsReturn")
1514
FnReturn = T.TypeVar("FnReturn")
1615

py-shared/uv.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)