Skip to content

Commit cc188ae

Browse files
authored
Merge branch 'main' into topic/repeatable-installs
2 parents b9d27d6 + 1f1e1d6 commit cc188ae

File tree

122 files changed

+2176
-3032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+2176
-3032
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ contact_links:
66
about: |
77
Please ask typical Q&A here: general ideas for Python packaging,
88
questions about structuring projects and so on
9-
- name: '💬 IRC: #pypa @ Freenode'
10-
url: https://webchat.freenode.net/#pypa
9+
- name: '💬 IRC: #pypa'
10+
url: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
1111
about: Chat with devs

.github/ISSUE_TEMPLATE/~good-first-issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ labels: ["good first issue"]
1212

1313
---
1414

15-
**Good First Issue**: This issue is a good starting point for first time contributors -- the process of fixing this should be a good introduction to pip's development workflow. If you've already contributed to pip, work on [another issue without this label](https://github.com/pypa/pip/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+-label%3A%22good+first+issue%22) instead. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our [Getting Started Guide](https://pip.pypa.io/en/latest/development/getting-started/). If you are working on this issue and have questions, feel free to ask them here, [`#pypa-dev` on Freenode](https://webchat.freenode.net/?channels=%23pypa-dev), or the [distutils-sig mailing list](https://mail.python.org/mailman3/lists/distutils-sig.python.org/).
15+
**Good First Issue**: This issue is a good starting point for first time contributors -- the process of fixing this should be a good introduction to pip's development workflow. If you've already contributed to pip, work on [another issue without this label](https://github.com/pypa/pip/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+-label%3A%22good+first+issue%22) instead. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our [Getting Started Guide](https://pip.pypa.io/en/latest/development/getting-started/). If you are working on this issue and have questions, feel free to ask them here, [`#pypa-dev` on Libera.chat](https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev), or the [distutils-sig mailing list](https://mail.python.org/mailman3/lists/distutils-sig.python.org/).

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ tests/data/common_wheels/
3232
*~
3333
.*.sw?
3434
.env/
35+
.venv/
3536

3637
# For IntelliJ IDEs (basically PyCharm)
3738
.idea/

NEWS.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
1010
.. towncrier release notes start
1111
12+
21.1.3 (2021-06-26)
13+
===================
14+
15+
Bug Fixes
16+
---------
17+
18+
- Remove unused optional ``tornado`` import in vendored ``tenacity`` to prevent old versions of Tornado from breaking pip. (`#10020 <https://github.com/pypa/pip/issues/10020>`_)
19+
- Require ``setup.cfg``-only projects to be built via PEP 517, by requiring an explicit dependency on setuptools declared in pyproject.toml. (`#10031 <https://github.com/pypa/pip/issues/10031>`_)
20+
21+
1222
21.1.2 (2021-05-23)
1323
===================
1424

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.
5757
.. _Issue tracking: https://github.com/pypa/pip/issues
5858
.. _Discourse channel: https://discuss.python.org/c/packaging
5959
.. _Development mailing list: https://mail.python.org/mailman3/lists/distutils-sig.python.org/
60-
.. _User IRC: https://webchat.freenode.net/?channels=%23pypa
61-
.. _Development IRC: https://webchat.freenode.net/?channels=%23pypa-dev
60+
.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
61+
.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev
6262
.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md

docs/html/cli/pip_install.rst

Lines changed: 4 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ for the name and project version (this is in theory slightly less reliable
6666
than using the ``egg_info`` command, but avoids downloading and processing
6767
unnecessary numbers of files).
6868

69-
Any URL may use the ``#egg=name`` syntax (see :ref:`VCS Support`) to
69+
Any URL may use the ``#egg=name`` syntax (see :doc:`../topics/vcs-support`) to
7070
explicitly state the project name.
7171

7272
Satisfying Requirements
@@ -372,168 +372,7 @@ that enables installation of pre-releases and development releases.
372372
VCS Support
373373
-----------
374374

375-
pip supports installing from Git, Mercurial, Subversion and Bazaar, and detects
376-
the type of VCS using URL prefixes: ``git+``, ``hg+``, ``svn+``, and ``bzr+``.
377-
378-
pip requires a working VCS command on your path: ``git``, ``hg``, ``svn``, or
379-
``bzr``.
380-
381-
VCS projects can be installed in :ref:`editable mode <editable-installs>` (using
382-
the :ref:`--editable <install_--editable>` option) or not.
383-
384-
* For editable installs, the clone location by default is ``<venv
385-
path>/src/SomeProject`` in virtual environments, and
386-
``<cwd>/src/SomeProject``
387-
for global installs. The :ref:`--src <install_--src>` option can be used to
388-
modify this location.
389-
* For non-editable installs, the project is built locally in a temp dir and then
390-
installed normally. Note that if a satisfactory version of the package is
391-
already installed, the VCS source will not overwrite it without an
392-
``--upgrade`` flag. VCS requirements pin the package version (specified
393-
in the ``setup.py`` file) of the target commit, not necessarily the commit
394-
itself.
395-
* The :ref:`pip freeze` subcommand will record the VCS requirement specifier
396-
(referencing a specific commit) if and only if the install is done using the
397-
editable option.
398-
399-
The "project name" component of the URL suffix ``egg=<project name>``
400-
is used by pip in its dependency logic to identify the project prior
401-
to pip downloading and analyzing the metadata. For projects
402-
where ``setup.py`` is not in the root of project, the "subdirectory" component
403-
is used. The value of the "subdirectory" component should be a path starting
404-
from the root of the project to where ``setup.py`` is located.
405-
406-
If your repository layout is::
407-
408-
pkg_dir
409-
├── setup.py # setup.py for package "pkg"
410-
└── some_module.py
411-
other_dir
412-
└── some_file
413-
some_other_file
414-
415-
Then, to install from this repository, the syntax would be:
416-
417-
.. tab:: Unix/macOS
418-
419-
.. code-block:: shell
420-
421-
python -m pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
422-
423-
.. tab:: Windows
424-
425-
.. code-block:: shell
426-
427-
py -m pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
428-
429-
430-
Git
431-
^^^
432-
433-
pip currently supports cloning over ``git``, ``git+http``, ``git+https``,
434-
``git+ssh``, ``git+git`` and ``git+file``.
435-
436-
.. warning::
437-
438-
Note that the use of ``git``, ``git+git``, and ``git+http`` is discouraged.
439-
The former two use `the Git Protocol`_, which lacks authentication, and HTTP is
440-
insecure due to lack of TLS based encryption.
441-
442-
Here are the supported forms::
443-
444-
[-e] git+http://git.example.com/MyProject#egg=MyProject
445-
[-e] git+https://git.example.com/MyProject#egg=MyProject
446-
[-e] git+ssh://git.example.com/MyProject#egg=MyProject
447-
[-e] git+file:///home/user/projects/MyProject#egg=MyProject
448-
449-
Passing a branch name, a commit hash, a tag name or a git ref is possible like so::
450-
451-
[-e] git+https://git.example.com/MyProject.git@main#egg=MyProject
452-
[-e] git+https://git.example.com/[email protected]#egg=MyProject
453-
[-e] git+https://git.example.com/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject
454-
[-e] git+https://git.example.com/MyProject.git@refs/pull/123/head#egg=MyProject
455-
456-
When passing a commit hash, specifying a full hash is preferable to a partial
457-
hash because a full hash allows pip to operate more efficiently (e.g. by
458-
making fewer network calls).
459-
460-
.. _`the Git Protocol`: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
461-
462-
Mercurial
463-
^^^^^^^^^
464-
465-
The supported schemes are: ``hg+file``, ``hg+http``, ``hg+https``,
466-
``hg+static-http``, and ``hg+ssh``.
467-
468-
Here are the supported forms::
469-
470-
[-e] hg+http://hg.myproject.org/MyProject#egg=MyProject
471-
[-e] hg+https://hg.myproject.org/MyProject#egg=MyProject
472-
[-e] hg+ssh://hg.myproject.org/MyProject#egg=MyProject
473-
[-e] hg+file:///home/user/projects/MyProject#egg=MyProject
474-
475-
You can also specify a revision number, a revision hash, a tag name or a local
476-
branch name like so::
477-
478-
[-e] hg+http://hg.example.com/MyProject@da39a3ee5e6b#egg=MyProject
479-
[-e] hg+http://hg.example.com/MyProject@2019#egg=MyProject
480-
[-e] hg+http://hg.example.com/[email protected]#egg=MyProject
481-
[-e] hg+http://hg.example.com/MyProject@special_feature#egg=MyProject
482-
483-
Subversion
484-
^^^^^^^^^^
485-
486-
pip supports the URL schemes ``svn``, ``svn+svn``, ``svn+http``, ``svn+https``, ``svn+ssh``.
487-
488-
Here are some of the supported forms::
489-
490-
[-e] svn+https://svn.example.com/MyProject#egg=MyProject
491-
[-e] svn+ssh://svn.example.com/MyProject#egg=MyProject
492-
[-e] svn+ssh://[email protected]/MyProject#egg=MyProject
493-
494-
You can also give specific revisions to an SVN URL, like so::
495-
496-
[-e] svn+svn://svn.example.com/svn/MyProject#egg=MyProject
497-
[-e] svn+http://svn.example.com/svn/MyProject/trunk@2019#egg=MyProject
498-
499-
which will check out revision 2019. ``@{20080101}`` would also check
500-
out the revision from 2008-01-01. You can only check out specific
501-
revisions using ``-e svn+...``.
502-
503-
Bazaar
504-
^^^^^^
505-
506-
pip supports Bazaar using the ``bzr+http``, ``bzr+https``, ``bzr+ssh``,
507-
``bzr+sftp``, ``bzr+ftp`` and ``bzr+lp`` schemes.
508-
509-
Here are the supported forms::
510-
511-
[-e] bzr+http://bzr.example.com/MyProject/trunk#egg=MyProject
512-
[-e] bzr+sftp://[email protected]/MyProject/trunk#egg=MyProject
513-
[-e] bzr+ssh://[email protected]/MyProject/trunk#egg=MyProject
514-
[-e] bzr+ftp://[email protected]/MyProject/trunk#egg=MyProject
515-
[-e] bzr+lp:MyProject#egg=MyProject
516-
517-
Tags or revisions can be installed like so::
518-
519-
[-e] bzr+https://bzr.example.com/MyProject/trunk@2019#egg=MyProject
520-
[-e] bzr+http://bzr.example.com/MyProject/[email protected]#egg=MyProject
521-
522-
Using Environment Variables
523-
^^^^^^^^^^^^^^^^^^^^^^^^^^^
524-
525-
Since version 10, pip also makes it possible to use environment variables which
526-
makes it possible to reference private repositories without having to store
527-
access tokens in the requirements file. For example, a private git repository
528-
allowing Basic Auth for authentication can be refenced like this::
529-
530-
[-e] git+http://${AUTH_USER}:${AUTH_PASSWORD}@git.example.com/MyProject#egg=MyProject
531-
[-e] git+https://${AUTH_USER}:${AUTH_PASSWORD}@git.example.com/MyProject#egg=MyProject
532-
533-
.. note::
534-
535-
Only ``${VARIABLE}`` is supported, other formats like ``$VARIABLE`` or
536-
``%VARIABLE%`` won't work.
375+
This is now covered in :doc:`../topics/vcs-support`.
537376

538377
Finding Packages
539378
----------------
@@ -801,7 +640,7 @@ You can install local projects or VCS projects in "editable" mode:
801640
py -m pip install -e git+http://repo/my_project.git#egg=SomeProject
802641
803642
804-
(See the :ref:`VCS Support` section above for more information on VCS-related syntax.)
643+
(See the :doc:`../topics/vcs-support` section above for more information on VCS-related syntax.)
805644

806645
For local projects, the "SomeProject.egg-info" directory is created relative to
807646
the project path. This is one advantage over just using ``setup.py develop``,
@@ -992,7 +831,7 @@ Examples
992831
py -m pip install SomeProject@git+https://git.repo/[email protected]
993832
994833
995-
#. Install a project from VCS in "editable" mode. See the sections on :ref:`VCS Support <VCS Support>` and :ref:`Editable Installs <editable-installs>`.
834+
#. Install a project from VCS in "editable" mode. See the sections on :doc:`../topics/vcs-support` and :ref:`Editable Installs <editable-installs>`.
996835

997836
.. tab:: Unix/macOS
998837

docs/html/development/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ of all forms. The sections below will help you get started with development,
77
testing, and documentation.
88

99
You can also join ``#pypa`` (general packaging discussion and user support) and
10-
``#pypa-dev`` (discussion about development of packaging tools) `on Freenode`_,
10+
``#pypa-dev`` (discussion about development of packaging tools) `on Libera.chat`_,
1111
or the `distutils-sig mailing list`_, to ask questions or get involved.
1212

1313
.. toctree::
@@ -26,5 +26,5 @@ or the `distutils-sig mailing list`_, to ask questions or get involved.
2626
pip's development documentation has been rearranged and some older
2727
references might be broken.
2828

29-
.. _`on Freenode`: https://webchat.freenode.net/?channels=%23pypa-dev,pypa
29+
.. _`on Libera.chat`: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev
3030
.. _`distutils-sig mailing list`: https://mail.python.org/mailman3/lists/distutils-sig.python.org/

docs/html/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $ pip install git+https://github.com/pypa/sampleproject.git@main
4747
Successfully installed sampleproject
4848
```
4949

50-
See {ref}`VCS Support` for more information about this syntax.
50+
See {doc}`topics/vcs-support` for more information about this syntax.
5151

5252
### Install a package from a distribution file
5353

docs/html/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ lists or chat rooms:
4545
[pypi]: https://pypi.org/
4646
[issue-tracker]: https://github.com/pypa/pip/issues/
4747
[packaging-discourse]: https://discuss.python.org/c/packaging/14
48-
[irc-pypa]: https://webchat.freenode.net/#pypa
49-
[irc-pypa-dev]: https://webchat.freenode.net/#pypa-dev
48+
[irc-pypa]: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
49+
[irc-pypa-dev]: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev

docs/html/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Usually, pip is automatically installed if you are:
1313
If your Python environment does not have pip installed, there are 2 mechanisms
1414
to install pip supported directly by pip's maintainers:
1515

16-
- [`ensurepip`](#using-ensurepip)
17-
- [`get-pip.py`](#using-get-pip-py)
16+
- [`ensurepip`](#ensurepip)
17+
- [`get-pip.py`](#get-pip-py)
1818

1919
### `ensurepip`
2020

0 commit comments

Comments
 (0)