Skip to content

Commit

Permalink
Explicitly select packages for User-Agent inclusion
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stefanor committed Feb 27, 2022
1 parent d405a06 commit 00b48e9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions twine/cli.py
Expand Up @@ -20,7 +20,6 @@
import rich.highlighter
import rich.logging
import rich.theme
from packaging import requirements

import twine

Expand Down Expand Up @@ -71,8 +70,13 @@ def configure_output() -> None:


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


Expand Down

0 comments on commit 00b48e9

Please sign in to comment.