Skip to content

Commit

Permalink
debug: add warnings about its provisional status
Browse files Browse the repository at this point in the history
  • Loading branch information
xavfernandez committed Jul 18, 2019
1 parent d70edc8 commit ab10b8c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/html/reference/pip_debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Usage
.. pip-command-usage:: debug


.. warning::
This command is only meant for debugging.
Its options and outputs are provisional and may change without notice.


Description
***********

Expand Down
6 changes: 6 additions & 0 deletions docs/man/commands/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Usage

.. pip-command-usage:: debug


.. warning::
This command is only meant for debugging.
Its options and outputs are provisional and may change without notice.


Options
*******

Expand Down
6 changes: 6 additions & 0 deletions src/pip/_internal/commands/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ def __init__(self, *args, **kw):

def run(self, options, args):
# type: (Values, List[Any]) -> int
logger.warning(
"This command is only meant for debugging. "
"Do not use this with automation for parsing and getting these "
"details, since the output and options of this command may "
"change without notice."
)
show_value('pip version', get_pip_version())
show_value('sys.version', sys.version)
show_value('sys.executable', sys.executable)
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_debug(script, args):
Check simple option cases.
"""
args = ['debug'] + args
result = script.pip(*args)
result = script.pip(*args, allow_stderr_warning=True)
stdout = result.stdout

assert 'sys.executable: ' in stdout
Expand Down Expand Up @@ -43,7 +43,7 @@ def test_debug__target_options(script, args, expected):
Check passing target-related options.
"""
args = ['debug'] + args
result = script.pip(*args)
result = script.pip(*args, allow_stderr_warning=True)
stdout = result.stdout

assert 'Compatible tags: ' in stdout
Expand Down

0 comments on commit ab10b8c

Please sign in to comment.