Skip to content

Commit cab618f

Browse files
authored
Bump packaging >= 26.1 (#1310)
* Suppress a mypy re-export lint Signed-off-by: William Woodruff <william@astral.sh> * Bump packaging to >=26.1 Signed-off-by: William Woodruff <william@astral.sh> --------- Signed-off-by: William Woodruff <william@astral.sh>
1 parent 2d06e11 commit cab618f

4 files changed

Lines changed: 4 additions & 10 deletions

File tree

.github/workflows/main.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ jobs:
5151
- windows-latest
5252
tox-environment:
5353
- py
54-
include:
55-
# Test with the oldest supported ``packaging`` version.
56-
- platform: ubuntu-latest
57-
python-version: "3.10"
58-
tox-environment: py-packaging240
5954
runs-on: ${{ matrix.platform }}
6055
steps:
6156
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies = [
3939
"keyring >= 21.2.0; platform_machine != 'ppc64le' and platform_machine != 's390x'",
4040
"rfc3986 >= 1.4.0",
4141
"rich >= 12.0.0",
42-
"packaging >= 24.0",
42+
"packaging >= 26.1",
4343
"id",
4444
]
4545
dynamic = ["version"]

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 3.10
3-
envlist = lint,types,py{310,311,312,313,314}{,-packaging240},integration,docs
3+
envlist = lint,types,py{310,311,312,313,314},integration,docs
44
isolated_build = True
55

66
[testenv]
@@ -9,7 +9,6 @@ deps =
99
pytest
1010
pytest-socket
1111
coverage
12-
packaging240: packaging==24.0
1312
passenv =
1413
PYTEST_ADDOPTS
1514
setenv =

twine/package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import subprocess
2121
from typing import Any, Dict, List, NamedTuple, Optional, Tuple, TypedDict
2222

23+
from packaging import errors
2324
from packaging import metadata
2425
from packaging import version
2526
from rich import print
@@ -108,7 +109,6 @@ def _safe_name(name: str) -> str:
108109

109110

110111
class PackageMetadata(TypedDict, total=False):
111-
112112
# Metadata 1.0 - PEP 241
113113
metadata_version: str
114114
name: str
@@ -241,7 +241,7 @@ def from_filename(cls, filename: str, comment: Optional[str]) -> "PackageFile":
241241

242242
try:
243243
metadata.Metadata.from_raw(meta)
244-
except metadata.ExceptionGroup as group:
244+
except errors.ExceptionGroup as group:
245245
raise exceptions.InvalidDistribution(
246246
"Invalid distribution metadata: {}".format(
247247
"; ".join(sorted(str(e) for e in group.exceptions))

0 commit comments

Comments
 (0)