Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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
  • Loading branch information
stefanor committed Feb 27, 2022
commit 00b48e97a5cc58613dd125aeb47c42c9a14871d0
10 changes: 7 additions & 3 deletions twine/cli.py
Original file line number Diff line number Diff line change
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