Skip to content

Commit 5375fe1

Browse files
Fix: Replace typing_extensions with stdlib typing and drop typer[all]
Replace `from typing_extensions import Annotated` with `from typing import Annotated` in all source modules. The Annotated type has been available in the standard library typing module since Python 3.9. Update pyproject.toml: - Change typer[all]>=0.15,<0.22 to typer>=0.15 since the [all] extra was removed in Typer 0.22.0 (rich and shellingham are now bundled by default) - Bump requires-python from >=3.8 to >=3.9 (Typer 0.21+ already requires Python >=3.9) - Update classifiers to replace Python 3.8 with 3.9 Change-Id: I0656815c27538f453850046042afaf1c6d7f3b2f Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
1 parent ecb9fab commit 5375fe1

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name = "gerrit-to-platform"
44
dynamic = ["version"]
55
description = "Gerrit to GitHub / GitLab"
66
readme = "README.rst"
7-
requires-python = ">=3.8"
7+
requires-python = ">=3.9"
88
license = {file = "LICENSE.txt"}
99

1010
authors = [
@@ -27,7 +27,7 @@ classifiers = [
2727
"Natural Language :: English",
2828
"Operating System :: POSIX :: Linux",
2929
"Programming Language :: Python",
30-
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.9",
3131
"Programming Language :: Python :: 3.11",
3232
"Programming Language :: Python :: 3.12",
3333
"Topic :: Software Development :: Build Tools",
@@ -38,7 +38,7 @@ classifiers = [
3838

3939
dependencies = [
4040
"ghapi~=1.0.3",
41-
"typer[all]>=0.15,<0.22",
41+
"typer>=0.15",
4242
"xdg~=5.1.1"
4343
]
4444

src/gerrit_to_platform/change_merged.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
##############################################################################
1010
"""Handler for patchset-created events."""
1111

12+
from typing import Annotated
13+
1214
import typer
13-
from typing_extensions import Annotated
1415

1516
from gerrit_to_platform.helpers import (
1617
find_and_dispatch,

src/gerrit_to_platform/comment_added.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
import re
1414
import time
1515
from pathlib import Path
16+
from typing import Annotated
1617

1718
import typer
18-
from typing_extensions import Annotated
1919

2020
from gerrit_to_platform.config import get_mapping
2121
from gerrit_to_platform.helpers import (

src/gerrit_to_platform/patchset_created.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
##############################################################################
1010
"""Handler for patchset-created events."""
1111

12+
from typing import Annotated
13+
1214
import typer
13-
from typing_extensions import Annotated
1415

1516
from gerrit_to_platform.helpers import (
1617
find_and_dispatch,

0 commit comments

Comments
 (0)