Skip to content

Commit 36167d6

Browse files
committed
Replace 'pip search' docs with 'pip index versions'
1 parent 094dac8 commit 36167d6

File tree

5 files changed

+103
-1
lines changed

5 files changed

+103
-1
lines changed

docs/html/cli/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ pip_wheel
3131
pip_hash
3232
```
3333

34+
```{toctree}
35+
:maxdepth: 1
36+
:caption: Package Index information
37+
38+
pip_index
39+
```
40+
3441
```{toctree}
3542
:maxdepth: 1
3643
:caption: Managing pip itself

docs/html/cli/pip_index.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.. _`pip index`:
2+
3+
=========
4+
pip index
5+
=========
6+
7+
Usage
8+
=====
9+
10+
.. tab:: Unix/macOS
11+
12+
.. pip-command-usage:: index "python -m pip"
13+
14+
.. tab:: Windows
15+
16+
.. pip-command-usage:: index "py -m pip"
17+
18+
19+
Description
20+
===========
21+
22+
.. pip-command-description:: index
23+
24+
25+
Options
26+
=======
27+
28+
.. pip-command-options:: index
29+
30+
31+
Examples
32+
========
33+
34+
#. Search for "peppercorn"
35+
36+
.. tab:: Unix/macOS
37+
38+
.. code-block:: console
39+
40+
$ python -m pip index versions peppercorn
41+
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
42+
peppercorn (0.6)
43+
Available versions: 0.6, 0.5, 0.4, 0.3, 0.2, 0.1
44+
45+
.. tab:: Windows
46+
47+
.. code-block:: console
48+
49+
C:\> py -m pip index versions peppercorn
50+
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
51+
peppercorn (0.6)
52+
Available versions: 0.6, 0.5, 0.4, 0.3, 0.2, 0.1

docs/html/user_guide.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,28 @@ For more information and examples, see the :ref:`pip list` and :ref:`pip show`
428428
reference pages.
429429

430430

431+
Searching for Packages
432+
======================
433+
434+
pip can search `PyPI`_ for packages using the ``pip index versions``
435+
subcommand:
436+
437+
.. tab:: Unix/macOS
438+
439+
.. code-block:: shell
440+
441+
python -m pip index versions "package"
442+
443+
.. tab:: Windows
444+
445+
.. code-block:: shell
446+
447+
py -m pip index versions "package"
448+
449+
This lists all available versions of a given package.
450+
451+
For more information and examples, see the :ref:`pip index` reference.
452+
431453
.. _`Configuration`:
432454

433455

docs/man/commands/index.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
:orphan:
2+
3+
==========
4+
pip-index
5+
==========
6+
7+
Description
8+
***********
9+
10+
.. pip-command-description:: indx
11+
12+
Usage
13+
*****
14+
15+
.. pip-command-usage:: index
16+
17+
Options
18+
*******
19+
20+
.. pip-command-options:: index

news/5216.removal.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Remove the ``pip search`` command as it is basically a no-op with PyPI.
1+
Remove the ``pip search`` command because it no longer works. The command was never
2+
standardised and common uses can be replaced with ``pip index``.

0 commit comments

Comments
 (0)