Skip to content

Commit 00b48e9

Browse files
committed
Explicitly select packages for User-Agent inclusion
Revert back to a manual list of packages reported in the User-Agent string and --version. Reverting the part of #858 that switched to parsing twine's requires. See: #870
1 parent d405a06 commit 00b48e9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

twine/cli.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import rich.highlighter
2121
import rich.logging
2222
import rich.theme
23-
from packaging import requirements
2423

2524
import twine
2625

@@ -71,8 +70,13 @@ def configure_output() -> None:
7170

7271

7372
def list_dependencies_and_versions() -> List[Tuple[str, str]]:
74-
requires = importlib_metadata.requires("twine") # type: ignore[no-untyped-call] # python/importlib_metadata#288 # noqa: E501
75-
deps = [requirements.Requirement(r).name for r in requires]
73+
deps = (
74+
"importlib-metadata",
75+
"pkginfo",
76+
"requests",
77+
"requests-toolbelt",
78+
"tqdm",
79+
)
7680
return [(dep, importlib_metadata.version(dep)) for dep in deps] # type: ignore[no-untyped-call] # python/importlib_metadata#288 # noqa: E501
7781

7882

0 commit comments

Comments
 (0)