Commit b69019b7 by David Hotham Committed by Bartosz Sokorski

pkginfo has published types, fix resulting errors

includes a change to the format of cached information held about
individual packages
parent ef89e90f
...@@ -909,14 +909,14 @@ ptyprocess = ">=0.5" ...@@ -909,14 +909,14 @@ ptyprocess = ">=0.5"
[[package]] [[package]]
name = "pkginfo" name = "pkginfo"
version = "1.9.2" version = "1.9.4"
description = "Query metadatdata from sdists / bdists / installed packages." description = "Query metadatdata from sdists / bdists / installed packages."
category = "main" category = "main"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=3.6"
files = [ files = [
{file = "pkginfo-1.9.2-py3-none-any.whl", hash = "sha256:d580059503f2f4549ad6e4c106d7437356dbd430e2c7df99ee1efe03d75f691e"}, {file = "pkginfo-1.9.4-py3-none-any.whl", hash = "sha256:7fc056f8e6b93355925083373b0f6bfbabe84ee3f29854fd155c9d6a4211267d"},
{file = "pkginfo-1.9.2.tar.gz", hash = "sha256:ac03e37e4d601aaee40f8087f63fc4a2a6c9814dda2c8fa6aab1b1829653bdfa"}, {file = "pkginfo-1.9.4.tar.gz", hash = "sha256:e769fd353593d43e0c9f47e17e25f09a8efcddcdf9a71674ea3ba444ff31bb44"},
] ]
[package.extras] [package.extras]
...@@ -1455,14 +1455,14 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( ...@@ -1455,14 +1455,14 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (
[[package]] [[package]]
name = "shellingham" name = "shellingham"
version = "1.5.0" version = "1.5.0.post1"
description = "Tool to Detect Surrounding Shell" description = "Tool to Detect Surrounding Shell"
category = "main" category = "main"
optional = false optional = false
python-versions = ">=3.4" python-versions = ">=3.7"
files = [ files = [
{file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, {file = "shellingham-1.5.0.post1-py2.py3-none-any.whl", hash = "sha256:368bf8c00754fd4f55afb7bbb86e272df77e4dc76ac29dbcbb81a59e9fc15744"},
{file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, {file = "shellingham-1.5.0.post1.tar.gz", hash = "sha256:823bc5fb5c34d60f285b624e7264f4dda254bc803a3774a147bf99c0e3004a28"},
] ]
[[package]] [[package]]
...@@ -1798,4 +1798,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" ...@@ -1798,4 +1798,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.7" python-versions = "^3.7"
content-hash = "c9064502080fd8c4c3195efac3b59202d51d7ca3498a4c92e9e7173fbc46480a" content-hash = "bbc71952916c7ee1c404e4a85e611189347955d63d5560b5bdb23073a07afde6"
...@@ -63,7 +63,7 @@ lockfile = "^0.12.2" ...@@ -63,7 +63,7 @@ lockfile = "^0.12.2"
# packaging uses calver, so version is unclamped # packaging uses calver, so version is unclamped
packaging = ">=20.4" packaging = ">=20.4"
pexpect = "^4.7.0" pexpect = "^4.7.0"
pkginfo = "^1.5" pkginfo = "^1.9.4"
platformdirs = "^2.5.2" platformdirs = "^2.5.2"
requests = "^2.18" requests = "^2.18"
requests-toolbelt = ">=0.9.1,<0.11.0" requests-toolbelt = ">=0.9.1,<0.11.0"
...@@ -174,7 +174,6 @@ module = [ ...@@ -174,7 +174,6 @@ module = [
'cachecontrol.*', 'cachecontrol.*',
'lockfile.*', 'lockfile.*',
'pexpect.*', 'pexpect.*',
'pkginfo.*',
'requests_toolbelt.*', 'requests_toolbelt.*',
'shellingham.*', 'shellingham.*',
'virtualenv.*', 'virtualenv.*',
......
...@@ -74,7 +74,6 @@ class PackageInfo: ...@@ -74,7 +74,6 @@ class PackageInfo:
name: str | None = None, name: str | None = None,
version: str | None = None, version: str | None = None,
summary: str | None = None, summary: str | None = None,
platform: str | None = None,
requires_dist: list[str] | None = None, requires_dist: list[str] | None = None,
requires_python: str | None = None, requires_python: str | None = None,
files: list[dict[str, str]] | None = None, files: list[dict[str, str]] | None = None,
...@@ -84,7 +83,6 @@ class PackageInfo: ...@@ -84,7 +83,6 @@ class PackageInfo:
self.name = name self.name = name
self.version = version self.version = version
self.summary = summary self.summary = summary
self.platform = platform
self.requires_dist = requires_dist self.requires_dist = requires_dist
self.requires_python = requires_python self.requires_python = requires_python
self.files = files or [] self.files = files or []
...@@ -102,7 +100,6 @@ class PackageInfo: ...@@ -102,7 +100,6 @@ class PackageInfo:
self.name = other.name or self.name self.name = other.name or self.name
self.version = other.version or self.version self.version = other.version or self.version
self.summary = other.summary or self.summary self.summary = other.summary or self.summary
self.platform = other.platform or self.platform
self.requires_dist = other.requires_dist or self.requires_dist self.requires_dist = other.requires_dist or self.requires_dist
self.requires_python = other.requires_python or self.requires_python self.requires_python = other.requires_python or self.requires_python
self.files = other.files or self.files self.files = other.files or self.files
...@@ -117,7 +114,6 @@ class PackageInfo: ...@@ -117,7 +114,6 @@ class PackageInfo:
"name": self.name, "name": self.name,
"version": self.version, "version": self.version,
"summary": self.summary, "summary": self.summary,
"platform": self.platform,
"requires_dist": self.requires_dist, "requires_dist": self.requires_dist,
"requires_python": self.requires_python, "requires_python": self.requires_python,
"files": self.files, "files": self.files,
...@@ -262,7 +258,6 @@ class PackageInfo: ...@@ -262,7 +258,6 @@ class PackageInfo:
name=dist.name, name=dist.name,
version=dist.version, version=dist.version,
summary=dist.summary, summary=dist.summary,
platform=dist.supported_platforms,
requires_dist=requirements, requires_dist=requirements,
requires_python=dist.requires_python, requires_python=dist.requires_python,
) )
...@@ -423,6 +418,7 @@ class PackageInfo: ...@@ -423,6 +418,7 @@ class PackageInfo:
else: else:
directories = list(cls._find_dist_info(path=path)) directories = list(cls._find_dist_info(path=path))
dist: pkginfo.BDist | pkginfo.SDist | pkginfo.Wheel
for directory in directories: for directory in directories:
try: try:
if directory.suffix == ".egg-info": if directory.suffix == ".egg-info":
...@@ -460,7 +456,6 @@ class PackageInfo: ...@@ -460,7 +456,6 @@ class PackageInfo:
name=package.name, name=package.name,
version=str(package.version), version=str(package.version),
summary=package.description, summary=package.description,
platform=package.platform,
requires_dist=list(requires), requires_dist=list(requires),
requires_python=package.python_versions, requires_python=package.python_versions,
files=package.files, files=package.files,
......
...@@ -22,7 +22,7 @@ if TYPE_CHECKING: ...@@ -22,7 +22,7 @@ if TYPE_CHECKING:
class CachedRepository(Repository, ABC): class CachedRepository(Repository, ABC):
CACHE_VERSION = parse_constraint("1.1.0") CACHE_VERSION = parse_constraint("2.0.0")
def __init__( def __init__(
self, name: str, disable_cache: bool = False, config: Config | None = None self, name: str, disable_cache: bool = False, config: Config | None = None
......
...@@ -123,7 +123,6 @@ class LegacyRepository(HTTPRepository): ...@@ -123,7 +123,6 @@ class LegacyRepository(HTTPRepository):
name=name, name=name,
version=version.text, version=version.text,
summary="", summary="",
platform=None,
requires_dist=[], requires_dist=[],
requires_python=None, requires_python=None,
files=[], files=[],
......
...@@ -162,7 +162,6 @@ class PyPiRepository(HTTPRepository): ...@@ -162,7 +162,6 @@ class PyPiRepository(HTTPRepository):
name=info["name"], name=info["name"],
version=info["version"], version=info["version"],
summary=info["summary"], summary=info["summary"],
platform=info["platform"],
requires_dist=info["requires_dist"], requires_dist=info["requires_dist"],
requires_python=info["requires_python"], requires_python=info["requires_python"],
files=info.get("files", []), files=info.get("files", []),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment