Skip to content

Commit bf348bf

Browse files
committed
Merge branch 'main' into ai-docs-rewrite
2 parents cefe4c2 + 072e64c commit bf348bf

File tree

216 files changed

+4280
-21728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+4280
-21728
lines changed

news/6400.vendor.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Vendor in ``pip==25.1.1`` latest.

pipenv/patched/patched.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pip==25.0.1
1+
pip==25.1.1

pipenv/patched/pip/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import List, Optional
22

3-
__version__ = "25.0.1"
3+
__version__ = "25.1.1"
44

55

66
def main(args: Optional[List[str]] = None) -> int:

pipenv/patched/pip/__pip-runner__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import sys
1010

1111
# Copied from pyproject.toml
12-
PYTHON_REQUIRES = (3, 8)
12+
PYTHON_REQUIRES = (3, 9)
1313

1414

1515
def version_str(version): # type: ignore

pipenv/patched/pip/_internal/build_env.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Build Environment used for isolation during sdist building
2-
"""
1+
"""Build Environment used for isolation during sdist building"""
32

43
import logging
54
import os
@@ -241,6 +240,10 @@ def _install_requirements(
241240
prefix.path,
242241
"--no-warn-script-location",
243242
"--disable-pip-version-check",
243+
# As the build environment is ephemeral, it's wasteful to
244+
# pre-compile everything, especially as not every Python
245+
# module will be used/compiled in most cases.
246+
"--no-compile",
244247
# The prefix specified two lines above, thus
245248
# target from config file or env var should be ignored
246249
"--target",

pipenv/patched/pip/_internal/cache.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Cache Management
2-
"""
1+
"""Cache Management"""
32

43
import hashlib
54
import json
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
"""Subpackage containing all of pip's command line interface related code
2-
"""
1+
"""Subpackage containing all of pip's command line interface related code"""
32

43
# This file intentionally does not import submodules

pipenv/patched/pip/_internal/cli/autocompletion.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Logic that powers autocompletion installed by ``pip completion``.
2-
"""
1+
"""Logic that powers autocompletion installed by ``pip completion``."""
32

43
import optparse
54
import os

pipenv/patched/pip/_internal/cli/base_command.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
NetworkConnectionError,
3030
PreviousBuildDirError,
3131
)
32-
from pipenv.patched.pip._internal.utils.deprecation import deprecated
3332
from pipenv.patched.pip._internal.utils.filesystem import check_path_owner
3433
from pipenv.patched.pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging
3534
from pipenv.patched.pip._internal.utils.misc import get_prog, normalize_path
@@ -172,6 +171,8 @@ def _main(self, args: List[str]) -> int:
172171

173172
# Set verbosity so that it can be used elsewhere.
174173
self.verbosity = options.verbose - options.quiet
174+
if options.debug_mode:
175+
self.verbosity = 2
175176

176177
reconfigure(no_color=options.no_color)
177178
level_number = setup_logging(
@@ -229,12 +230,4 @@ def _main(self, args: List[str]) -> int:
229230
)
230231
options.cache_dir = None
231232

232-
if options.no_python_version_warning:
233-
deprecated(
234-
reason="--no-python-version-warning is deprecated.",
235-
replacement="to remove the flag as it's a no-op",
236-
gone_in="25.1",
237-
issue=13154,
238-
)
239-
240233
return self._run_wrapper(level_number, options, args)

pipenv/patched/pip/_internal/cli/cmdoptions.py

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import importlib.util
1414
import logging
1515
import os
16+
import pathlib
1617
import textwrap
1718
from functools import partial
1819
from optparse import SUPPRESS_HELP, Option, OptionGroup, OptionParser, Values
@@ -280,8 +281,17 @@ class PipOption(Option):
280281
dest="retries",
281282
type="int",
282283
default=5,
283-
help="Maximum number of retries each connection should attempt "
284-
"(default %default times).",
284+
help="Maximum attempts to establish a new HTTP connection. (default: %default)",
285+
)
286+
287+
resume_retries: Callable[..., Option] = partial(
288+
Option,
289+
"--resume-retries",
290+
dest="resume_retries",
291+
type="int",
292+
default=0,
293+
help="Maximum attempts to resume or restart an incomplete download. "
294+
"(default: %default)",
285295
)
286296

287297
timeout: Callable[..., Option] = partial(
@@ -733,6 +743,46 @@ def _handle_no_cache_dir(
733743
help="Don't install package dependencies.",
734744
)
735745

746+
747+
def _handle_dependency_group(
748+
option: Option, opt: str, value: str, parser: OptionParser
749+
) -> None:
750+
"""
751+
Process a value provided for the --group option.
752+
753+
Splits on the rightmost ":", and validates that the path (if present) ends
754+
in `pyproject.toml`. Defaults the path to `pyproject.toml` when one is not given.
755+
756+
`:` cannot appear in dependency group names, so this is a safe and simple parse.
757+
758+
This is an optparse.Option callback for the dependency_groups option.
759+
"""
760+
path, sep, groupname = value.rpartition(":")
761+
if not sep:
762+
path = "pyproject.toml"
763+
else:
764+
# check for 'pyproject.toml' filenames using pathlib
765+
if pathlib.PurePath(path).name != "pyproject.toml":
766+
msg = "group paths use 'pyproject.toml' filenames"
767+
raise_option_error(parser, option=option, msg=msg)
768+
769+
parser.values.dependency_groups.append((path, groupname))
770+
771+
772+
dependency_groups: Callable[..., Option] = partial(
773+
Option,
774+
"--group",
775+
dest="dependency_groups",
776+
default=[],
777+
type=str,
778+
action="callback",
779+
callback=_handle_dependency_group,
780+
metavar="[path:]group",
781+
help='Install a named dependency-group from a "pyproject.toml" file. '
782+
'If a path is given, the name of the file must be "pyproject.toml". '
783+
'Defaults to using "pyproject.toml" in the current directory.',
784+
)
785+
736786
ignore_requires_python: Callable[..., Option] = partial(
737787
Option,
738788
"--ignore-requires-python",
@@ -783,9 +833,9 @@ def _handle_no_use_pep517(
783833
"""
784834
raise_option_error(parser, option=option, msg=msg)
785835

786-
# If user doesn't wish to use pep517, we check if setuptools and wheel are installed
836+
# If user doesn't wish to use pep517, we check if setuptools is installed
787837
# and raise error if it is not.
788-
packages = ("setuptools", "wheel")
838+
packages = ("setuptools",)
789839
if not all(importlib.util.find_spec(package) for package in packages):
790840
msg = (
791841
f"It is not possible to use --no-use-pep517 "
@@ -887,6 +937,14 @@ def _handle_config_settings(
887937
"pip only finds stable versions.",
888938
)
889939

940+
json: Callable[..., Option] = partial(
941+
Option,
942+
"--json",
943+
action="store_true",
944+
default=False,
945+
help="Output data in a machine-readable JSON format.",
946+
)
947+
890948
disable_pip_version_check: Callable[..., Option] = partial(
891949
Option,
892950
"--disable-pip-version-check",
@@ -990,7 +1048,7 @@ def check_list_path_option(options: Values) -> None:
9901048
dest="no_python_version_warning",
9911049
action="store_true",
9921050
default=False,
993-
help="Silence deprecation warnings for upcoming unsupported Pythons.",
1051+
help=SUPPRESS_HELP, # No-op, a hold-over from the Python 2->3 transition.
9941052
)
9951053

9961054

@@ -1028,7 +1086,6 @@ def check_list_path_option(options: Values) -> None:
10281086
help=("Enable deprecated functionality, that will be removed in the future."),
10291087
)
10301088

1031-
10321089
##########
10331090
# groups #
10341091
##########
@@ -1061,6 +1118,7 @@ def check_list_path_option(options: Values) -> None:
10611118
no_python_version_warning,
10621119
use_new_feature,
10631120
use_deprecated_feature,
1121+
resume_retries,
10641122
],
10651123
}
10661124

0 commit comments

Comments
 (0)