Skip to content

Commit 57e4210

Browse files
committed
Get exclude_newer_than from option
1 parent 798a66f commit 57e4210

File tree

5 files changed

+2
-10
lines changed

5 files changed

+2
-10
lines changed

src/pip/_internal/cli/req_command.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from __future__ import annotations
99

10-
import datetime
1110
import logging
1211
import os
1312
from functools import partial
@@ -352,7 +351,6 @@ def _build_package_finder(
352351
session: PipSession,
353352
target_python: TargetPython | None = None,
354353
ignore_requires_python: bool | None = None,
355-
exclude_newer_than: datetime.datetime | None = None,
356354
) -> PackageFinder:
357355
"""
358356
Create a package finder appropriate to this requirement command.
@@ -373,5 +371,5 @@ def _build_package_finder(
373371
link_collector=link_collector,
374372
selection_prefs=selection_prefs,
375373
target_python=target_python,
376-
exclude_newer_than=exclude_newer_than,
374+
exclude_newer_than=options.exclude_newer_than,
377375
)

src/pip/_internal/commands/download.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def run(self, options: Values, args: list[str]) -> int:
9696
session=session,
9797
target_python=target_python,
9898
ignore_requires_python=options.ignore_requires_python,
99-
exclude_newer_than=options.exclude_newer_than,
10099
)
101100

102101
build_tracker = self.enter_context(get_build_tracker())

src/pip/_internal/commands/index.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
import datetime
43
import json
54
import logging
65
from collections.abc import Iterable
@@ -88,7 +87,6 @@ def _build_package_finder(
8887
session: PipSession,
8988
target_python: TargetPython | None = None,
9089
ignore_requires_python: bool | None = None,
91-
exclude_newer_than: datetime.datetime | None = None,
9290
) -> PackageFinder:
9391
"""
9492
Create a package finder appropriate to the index command.
@@ -106,7 +104,7 @@ def _build_package_finder(
106104
link_collector=link_collector,
107105
selection_prefs=selection_prefs,
108106
target_python=target_python,
109-
exclude_newer_than=exclude_newer_than,
107+
exclude_newer_than=options.exclude_newer_than,
110108
)
111109

112110
def get_available_package_versions(self, options: Values, args: list[Any]) -> None:
@@ -122,7 +120,6 @@ def get_available_package_versions(self, options: Values, args: list[Any]) -> No
122120
session=session,
123121
target_python=target_python,
124122
ignore_requires_python=options.ignore_requires_python,
125-
exclude_newer_than=options.exclude_newer_than,
126123
)
127124

128125
versions: Iterable[Version] = (

src/pip/_internal/commands/install.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ def run(self, options: Values, args: list[str]) -> int:
347347
session=session,
348348
target_python=target_python,
349349
ignore_requires_python=options.ignore_requires_python,
350-
exclude_newer_than=options.exclude_newer_than,
351350
)
352351
build_tracker = self.enter_context(get_build_tracker())
353352

src/pip/_internal/commands/wheel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ def run(self, options: Values, args: list[str]) -> int:
110110
finder = self._build_package_finder(
111111
options=options,
112112
session=session,
113-
exclude_newer_than=options.exclude_newer_than,
114113
)
115114

116115
options.wheel_dir = normalize_path(options.wheel_dir)

0 commit comments

Comments
 (0)