Skip to content

Commit 126e6f6

Browse files
committed
Install report format declared stable
1 parent 99dddc1 commit 126e6f6

File tree

4 files changed

+3
-23
lines changed

4 files changed

+3
-23
lines changed

docs/html/reference/installation-report.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ When considering use cases, please bear in mind that
2323

2424
The report is a JSON object with the following properties:
2525

26-
- `version`: the string `0`, denoting that the installation report is an experimental
27-
feature. This value will change to `1`, when the feature is deemed stable after
28-
gathering user feedback (likely in pip 22.3 or 23.0). Backward incompatible changes
29-
may be introduced in version `1` without notice. After that, it will change only if
26+
- `version`: the string `1`. It will change only if
3027
and when backward incompatible changes are introduced, such as removing mandatory
3128
fields or changing the semantics or data type of existing fields. The introduction of
3229
backward incompatible changes will follow the usual pip processes such as the
@@ -92,7 +89,7 @@ will produce an output similar to this (metadata abriged for brevity):
9289

9390
```json
9491
{
95-
"version": "0",
92+
"version": "1",
9693
"pip_version": "22.2",
9794
"install": [
9895
{

src/pip/_internal/commands/install.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,6 @@ def run(self, options: Values, args: List[str]) -> int:
417417
)
418418

419419
if options.json_report_file:
420-
logger.warning(
421-
"--report is currently an experimental option. "
422-
"The output format may change in a future release "
423-
"without prior warning."
424-
)
425-
426420
report = InstallationReport(requirement_set.requirements_to_install)
427421
if options.json_report_file == "-":
428422
print_json(data=report.to_dict())

src/pip/_internal/models/installation_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _install_req_to_dict(cls, ireq: InstallRequirement) -> Dict[str, Any]:
3838

3939
def to_dict(self) -> Dict[str, Any]:
4040
return {
41-
"version": "0",
41+
"version": "1",
4242
"pip_version": __version__,
4343
"install": [
4444
self._install_req_to_dict(ireq) for ireq in self._install_requirements

tests/functional/test_install_report.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def test_install_report_basic(
2626
str(shared_data.root / "packages/"),
2727
"--report",
2828
str(report_path),
29-
allow_stderr_warning=True,
3029
)
3130
report = json.loads(report_path.read_text())
3231
assert "install" in report
@@ -59,7 +58,6 @@ def test_install_report_dep(
5958
str(shared_data.root / "packages/"),
6059
"--report",
6160
str(report_path),
62-
allow_stderr_warning=True,
6361
)
6462
report = json.loads(report_path.read_text())
6563
assert len(report["install"]) == 2
@@ -78,7 +76,6 @@ def test_install_report_index(script: PipTestEnvironment, tmp_path: Path) -> Non
7876
"Paste[openid]==1.7.5.1",
7977
"--report",
8078
str(report_path),
81-
allow_stderr_warning=True,
8279
)
8380
report = json.loads(report_path.read_text())
8481
assert len(report["install"]) == 2
@@ -114,7 +111,6 @@ def test_install_report_vcs_and_wheel_cache(
114111
str(cache_dir),
115112
"--report",
116113
str(report_path),
117-
allow_stderr_warning=True,
118114
)
119115
report = json.loads(report_path.read_text())
120116
assert len(report["install"]) == 1
@@ -142,7 +138,6 @@ def test_install_report_vcs_and_wheel_cache(
142138
str(cache_dir),
143139
"--report",
144140
str(report_path),
145-
allow_stderr_warning=True,
146141
)
147142
assert "Using cached pip_test_package" in result.stdout
148143
report = json.loads(report_path.read_text())
@@ -176,7 +171,6 @@ def test_install_report_vcs_editable(
176171
"#egg=pip-test-package",
177172
"--report",
178173
str(report_path),
179-
allow_stderr_warning=True,
180174
)
181175
report = json.loads(report_path.read_text())
182176
assert len(report["install"]) == 1
@@ -203,11 +197,6 @@ def test_install_report_to_stdout(
203197
str(shared_data.root / "packages/"),
204198
"--report",
205199
"-",
206-
allow_stderr_warning=True,
207-
)
208-
assert result.stderr == (
209-
"WARNING: --report is currently an experimental option. "
210-
"The output format may change in a future release without prior warning.\n"
211200
)
212201
report = json.loads(result.stdout)
213202
assert "install" in report

0 commit comments

Comments
 (0)