Skip to content

Commit

Permalink
pip inspect format declared stable
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Jan 28, 2023
1 parent e69e265 commit 2724a5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
7 changes: 2 additions & 5 deletions docs/html/reference/inspect-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ environment, including installed distributions.

The report is a JSON object with the following properties:

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

```json
{
"version": "0",
"version": "1",
"pip_version": "22.2.dev0",
"installed": [
{
Expand Down
7 changes: 1 addition & 6 deletions src/pip/_internal/commands/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,14 @@ def add_options(self) -> None:
self.parser.insert_option_group(0, self.cmd_opts)

def run(self, options: Values, args: List[str]) -> int:
logger.warning(
"pip inspect is currently an experimental command. "
"The output format may change in a future release without prior warning."
)

cmdoptions.check_list_path_option(options)
dists = get_environment(options.path).iter_installed_distributions(
local_only=options.local,
user_only=options.user,
skip=set(stdlib_pkgs),
)
output = {
"version": "0",
"version": "1",
"pip_version": __version__,
"installed": [self._dist_to_dict(dist) for dist in dists],
"environment": default_environment(),
Expand Down

0 comments on commit 2724a5f

Please sign in to comment.