@@ -254,7 +254,7 @@ def from_dict(cls, d: Dict[str, Any]) -> Self:
254
254
class PackageArchive :
255
255
url : Optional [str ]
256
256
path : Optional [str ]
257
- # (not supported) size: Optional[int]
257
+ size : Optional [int ]
258
258
# (not supported) upload_time: Optional[datetime]
259
259
hashes : Dict [str , str ]
260
260
subdirectory : Optional [str ]
@@ -267,6 +267,7 @@ def from_dict(cls, d: Dict[str, Any]) -> Self:
267
267
return cls (
268
268
url = _get (d , str , "url" ),
269
269
path = _get (d , str , "path" ),
270
+ size = _get (d , int , "size" ),
270
271
hashes = _get_required (d , dict , "hashes" ),
271
272
subdirectory = _get (d , str , "subdirectory" ),
272
273
)
@@ -278,7 +279,7 @@ class PackageSdist:
278
279
# (not supported) upload_time: Optional[datetime]
279
280
url : Optional [str ]
280
281
path : Optional [str ]
281
- # (not supported) size: Optional[int]
282
+ size : Optional [int ]
282
283
hashes : Dict [str , str ]
283
284
284
285
def __post_init__ (self ) -> None :
@@ -290,6 +291,7 @@ def from_dict(cls, d: Dict[str, Any]) -> Self:
290
291
name = _get_required (d , str , "name" ),
291
292
url = _get (d , str , "url" ),
292
293
path = _get (d , str , "path" ),
294
+ size = _get (d , int , "size" ),
293
295
hashes = _get_required (d , dict , "hashes" ),
294
296
)
295
297
@@ -300,7 +302,7 @@ class PackageWheel:
300
302
# (not supported) upload_time: Optional[datetime]
301
303
url : Optional [str ]
302
304
path : Optional [str ]
303
- # (not supported) size: Optional[int]
305
+ size : Optional [int ]
304
306
hashes : Dict [str , str ]
305
307
306
308
def __post_init__ (self ) -> None :
@@ -312,6 +314,7 @@ def from_dict(cls, d: Dict[str, Any]) -> Self:
312
314
name = _get_required (d , str , "name" ),
313
315
url = _get (d , str , "url" ),
314
316
path = _get (d , str , "path" ),
317
+ size = _get (d , int , "size" ),
315
318
hashes = _get_required (d , dict , "hashes" ),
316
319
)
317
320
return wheel
@@ -396,6 +399,7 @@ def from_install_requirement(cls, ireq: InstallRequirement, base_dir: Path) -> S
396
399
package_archive = PackageArchive (
397
400
url = download_info .url ,
398
401
path = None ,
402
+ size = None ,
399
403
hashes = download_info .info .hashes ,
400
404
subdirectory = download_info .subdirectory ,
401
405
)
@@ -414,6 +418,7 @@ def from_install_requirement(cls, ireq: InstallRequirement, base_dir: Path) -> S
414
418
name = link .filename ,
415
419
url = download_info .url ,
416
420
path = None ,
421
+ size = None ,
417
422
hashes = download_info .info .hashes ,
418
423
)
419
424
]
@@ -422,6 +427,7 @@ def from_install_requirement(cls, ireq: InstallRequirement, base_dir: Path) -> S
422
427
name = link .filename ,
423
428
url = download_info .url ,
424
429
path = None ,
430
+ size = None ,
425
431
hashes = download_info .info .hashes ,
426
432
)
427
433
else :
0 commit comments