Skip to content

Commit 5f9005d

Browse files
committed
lock: update to latest PEP 751
1 parent 2a331a3 commit 5f9005d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/pip/_internal/models/pylock.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class PackageArchive:
4545
url: Optional[str]
4646
# (not supported) path: Optional[str]
4747
# (not supported) size: Optional[int]
48+
# (not supported) upload_time: Optional[datetime]
4849
hashes: Dict[str, str]
4950
subdirectory: Optional[str]
5051

@@ -76,7 +77,6 @@ class Package:
7677
# (not supported) marker: Optional[str]
7778
# (not supported) requires_python: Optional[str]
7879
# (not supported) dependencies
79-
direct: Optional[bool] = None
8080
vcs: Optional[PackageVcs] = None
8181
directory: Optional[PackageDirectory] = None
8282
archive: Optional[PackageArchive] = None
@@ -92,8 +92,7 @@ def from_install_requirement(cls, ireq: InstallRequirement, base_dir: Path) -> S
9292
download_info = ireq.download_info
9393
assert download_info
9494
package = cls(name=dist.canonical_name)
95-
package.direct = ireq.is_direct if ireq.is_direct else None
96-
if package.direct:
95+
if ireq.is_direct:
9796
if isinstance(download_info.info, VcsInfo):
9897
package.vcs = PackageVcs(
9998
type=download_info.info.vcs,
@@ -158,6 +157,8 @@ class Pylock:
158157
lock_version: str = "1.0"
159158
# (not supported) environments: Optional[List[str]]
160159
# (not supported) requires_python: Optional[str]
160+
# (not supported) extras: List[str] = []
161+
# (not supported) dependency_groups: List[str] = []
161162
created_by: str = "pip"
162163
packages: List[Package] = dataclasses.field(default_factory=list)
163164
# (not supported) tool: Optional[Dict[str, Any]]

0 commit comments

Comments
 (0)