Skip to content

Commit e515d72

Browse files
authored
Merge branch 'main' into diagnostic-error-on-pip-uninstall
2 parents 22cc32d + 93fa89c commit e515d72

File tree

12 files changed

+15
-14
lines changed

12 files changed

+15
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
strategy:
113113
fail-fast: true
114114
matrix:
115-
os: [ubuntu-latest, macos-12, macos-latest]
115+
os: [ubuntu-latest, macos-13, macos-latest]
116116
python:
117117
- "3.8"
118118
- "3.9"

news/12964.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A valid, but non-existent URL used in a test case was corrected to be a valid URL.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ select = [
181181
"PLR0",
182182
"W",
183183
"RUF100",
184-
"UP032",
184+
"UP",
185185
]
186186

187187
[tool.ruff.lint.isort]

src/pip/_internal/cli/index_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class SessionCommandMixin(CommandContextMixIn):
5454

5555
def __init__(self) -> None:
5656
super().__init__()
57-
self._session: Optional["PipSession"] = None
57+
self._session: Optional[PipSession] = None
5858

5959
@classmethod
6060
def _get_index_urls(cls, options: Values) -> Optional[List[str]]:

src/pip/_internal/commands/list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def run(self, options: Values, args: List[str]) -> int:
176176
if options.excludes:
177177
skip.update(canonicalize_name(n) for n in options.excludes)
178178

179-
packages: "_ProcessedDists" = [
179+
packages: _ProcessedDists = [
180180
cast("_DistWithLatestInfo", d)
181181
for d in get_environment(options.path).iter_installed_distributions(
182182
local_only=options.local,

src/pip/_internal/commands/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def transform_hits(hits: List[Dict[str, str]]) -> List["TransformedHit"]:
8989
packages with the list of versions stored inline. This converts the
9090
list from pypi into one we can use.
9191
"""
92-
packages: Dict[str, "TransformedHit"] = OrderedDict()
92+
packages: Dict[str, TransformedHit] = OrderedDict()
9393
for hit in hits:
9494
name = hit["name"]
9595
summary = hit["summary"]

src/pip/_internal/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ class HashErrors(InstallationError):
431431
"""Multiple HashError instances rolled into one for reporting"""
432432

433433
def __init__(self) -> None:
434-
self.errors: List["HashError"] = []
434+
self.errors: List[HashError] = []
435435

436436
def append(self, error: "HashError") -> None:
437437
self.errors.append(error)

src/pip/_internal/req/constructors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _set_requirement_extras(req: Requirement, new_extras: Set[str]) -> Requireme
8080
assert (
8181
pre is not None and post is not None
8282
), f"regex group selection for requirement {req} failed, this should never happen"
83-
extras: str = "[%s]" % ",".join(sorted(new_extras)) if new_extras else ""
83+
extras: str = "[{}]".format(",".join(sorted(new_extras)) if new_extras else "")
8484
return get_requirement(f"{pre}{extras}{post}")
8585

8686

tests/functional/test_bad_url.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
def test_filenotfound_error_message(script: Any) -> None:
88
# Test the error message returned when using a bad 'file:' URL.
99
# make pip to fail and get an error message
10-
# by running "pip install -r file:nonexistent_file"
11-
proc = script.pip("install", "-r", "file:unexistent_file", expect_error=True)
10+
# by running "pip install -r file:///nonexistent_file"
11+
proc = script.pip("install", "-r", "file:///unexistent_file", expect_error=True)
1212
assert proc.returncode == 1
1313
expect = (
1414
"ERROR: 404 Client Error: FileNotFoundError for url: file:///unexistent_file"

tests/functional/test_search.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_pypi_xml_transformation() -> None:
4545
"version": "1.0",
4646
},
4747
]
48-
expected: List["TransformedHit"] = [
48+
expected: List[TransformedHit] = [
4949
{
5050
"versions": ["1.0", "2.0"],
5151
"name": "foo",
@@ -159,7 +159,7 @@ def test_latest_prerelease_install_message(
159159
"""
160160
Test documentation for installing pre-release packages is displayed
161161
"""
162-
hits: List["TransformedHit"] = [
162+
hits: List[TransformedHit] = [
163163
{
164164
"name": "ni",
165165
"summary": "For knights who say Ni!",
@@ -188,7 +188,7 @@ def test_search_print_results_should_contain_latest_versions(
188188
"""
189189
Test that printed search results contain the latest package versions
190190
"""
191-
hits: List["TransformedHit"] = [
191+
hits: List[TransformedHit] = [
192192
{
193193
"name": "testlib1",
194194
"summary": "Test library 1.",

0 commit comments

Comments
 (0)