File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/pip/_internal/resolution/resolvelib Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change
1
+ Fix slowness on Python 3.11 when updating an existing large environment.
Original file line number Diff line number Diff line change @@ -341,6 +341,7 @@ def __init__(
341
341
self .dist = dist
342
342
self ._ireq = _make_install_req_from_dist (dist , template )
343
343
self ._factory = factory
344
+ self ._version = None
344
345
345
346
# This is just logging some messages, so we can do it eagerly.
346
347
# The returned dist would be exactly the same as self.dist because we
@@ -376,7 +377,9 @@ def name(self) -> str:
376
377
377
378
@property
378
379
def version (self ) -> CandidateVersion :
379
- return self .dist .version
380
+ if self ._version is None :
381
+ self ._version = self .dist .version
382
+ return self ._version
380
383
381
384
@property
382
385
def is_editable (self ) -> bool :
You can’t perform that action at this time.
0 commit comments