Skip to content

Commit 6cf2bec

Browse files
committed
Get exclude_newer_than from option
1 parent 703cdc4 commit 6cf2bec

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
from functools import partial
1312
from optparse import Values
@@ -329,7 +328,6 @@ def _build_package_finder(
329328
session: PipSession,
330329
target_python: TargetPython | None = None,
331330
ignore_requires_python: bool | None = None,
332-
exclude_newer_than: datetime.datetime | None = None,
333331
) -> PackageFinder:
334332
"""
335333
Create a package finder appropriate to this requirement command.
@@ -350,5 +348,5 @@ def _build_package_finder(
350348
link_collector=link_collector,
351349
selection_prefs=selection_prefs,
352350
target_python=target_python,
353-
exclude_newer_than=exclude_newer_than,
351+
exclude_newer_than=options.exclude_newer_than,
354352
)

src/pip/_internal/commands/download.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ def run(self, options: Values, args: list[str]) -> int:
9494
session=session,
9595
target_python=target_python,
9696
ignore_requires_python=options.ignore_requires_python,
97-
exclude_newer_than=options.exclude_newer_than,
9897
)
9998

10099
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
@@ -345,7 +345,6 @@ def run(self, options: Values, args: list[str]) -> int:
345345
session=session,
346346
target_python=target_python,
347347
ignore_requires_python=options.ignore_requires_python,
348-
exclude_newer_than=options.exclude_newer_than,
349348
)
350349
build_tracker = self.enter_context(get_build_tracker())
351350

src/pip/_internal/commands/wheel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ def run(self, options: Values, args: list[str]) -> int:
107107
finder = self._build_package_finder(
108108
options=options,
109109
session=session,
110-
exclude_newer_than=options.exclude_newer_than,
111110
)
112111

113112
options.wheel_dir = normalize_path(options.wheel_dir)

0 commit comments

Comments
 (0)