Skip to content

Commit 99dddc1

Browse files
committed
pip inspect format declared stable
1 parent e69e265 commit 99dddc1

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

docs/html/reference/inspect-report.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ environment, including installed distributions.
1010

1111
The report is a JSON object with the following properties:
1212

13-
- `version`: the string `0`, denoting that the inspect command is an experimental
14-
feature. This value will change to `1`, when the feature is deemed stable after
15-
gathering user feedback (likely in pip 22.3 or 23.0). Backward incompatible changes
16-
may be introduced in version `1` without notice. After that, it will change only if
13+
- `version`: the string `1`. It will change only if
1714
and when backward incompatible changes are introduced, such as removing mandatory
1815
fields or changing the semantics or data type of existing fields. The introduction of
1916
backward incompatible changes will follow the usual pip processes such as the
@@ -72,7 +69,7 @@ this (metadata abriged for brevity):
7269

7370
```json
7471
{
75-
"version": "0",
72+
"version": "1",
7673
"pip_version": "22.2.dev0",
7774
"installed": [
7875
{

src/pip/_internal/commands/inspect.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,14 @@ def add_options(self) -> None:
4646
self.parser.insert_option_group(0, self.cmd_opts)
4747

4848
def run(self, options: Values, args: List[str]) -> int:
49-
logger.warning(
50-
"pip inspect is currently an experimental command. "
51-
"The output format may change in a future release without prior warning."
52-
)
53-
5449
cmdoptions.check_list_path_option(options)
5550
dists = get_environment(options.path).iter_installed_distributions(
5651
local_only=options.local,
5752
user_only=options.user,
5853
skip=set(stdlib_pkgs),
5954
)
6055
output = {
61-
"version": "0",
56+
"version": "1",
6257
"pip_version": __version__,
6358
"installed": [self._dist_to_dict(dist) for dist in dists],
6459
"environment": default_environment(),

tests/functional/test_inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_inspect_basic(simple_script: PipTestEnvironment) -> None:
2828
"""
2929
Test default behavior of inspect command.
3030
"""
31-
result = simple_script.pip("inspect", allow_stderr_warning=True)
31+
result = simple_script.pip("inspect")
3232
report = json.loads(result.stdout)
3333
installed = report["installed"]
3434
assert len(installed) == 4

0 commit comments

Comments
 (0)