From 5368be6e8862e7211e70ce079ce8bdb0afff06e8 Mon Sep 17 00:00:00 2001 From: Andrey Potapov Date: Sun, 11 Apr 2021 22:09:37 +0200 Subject: [PATCH] fix setenv usages in documentation examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #1999 Co-authored-by: Jürgen Gmach --- docs/changelog/1999.doc.rst | 2 ++ docs/example/basic.rst | 16 ++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 docs/changelog/1999.doc.rst diff --git a/docs/changelog/1999.doc.rst b/docs/changelog/1999.doc.rst new file mode 100644 index 000000000..de8ed9fa0 --- /dev/null +++ b/docs/changelog/1999.doc.rst @@ -0,0 +1,2 @@ +Update examples in the documentation to use ``setenv`` in the ``[testenv]`` sections, not wrongly in the ``[tox]`` main section. +- by :user:`AndreyNautilus` diff --git a/docs/example/basic.rst b/docs/example/basic.rst index 90048af88..8b97a746d 100644 --- a/docs/example/basic.rst +++ b/docs/example/basic.rst @@ -172,7 +172,7 @@ This variable can be also set in ``tox.ini``: .. code-block:: ini - [tox] + [testenv] setenv = PIP_INDEX_URL = https://pypi.my-alternative-index.org @@ -180,7 +180,7 @@ Alternatively, a configuration where ``PIP_INDEX_URL`` could be overriden from e .. code-block:: ini - [tox] + [testenv] setenv = PIP_INDEX_URL = {env:PIP_INDEX_URL:https://pypi.my-alternative-index.org} @@ -192,11 +192,9 @@ multiple PyPI servers, using ``PIP_EXTRA_INDEX_URL`` environment variable: .. code-block:: ini - [tox] + [testenv] setenv = PIP_EXTRA_INDEX_URL = https://mypypiserver.org - - [testenv] deps = # docutils will be installed directly from PyPI docutils @@ -204,9 +202,15 @@ multiple PyPI servers, using ``PIP_EXTRA_INDEX_URL`` environment variable: mypackage This configuration will install ``docutils`` from the default -Python PYPI server and will install the ``mypackage`` from +Python PyPI server and will install the ``mypackage`` from our index server at ``https://mypypiserver.org`` URL. +.. warning:: + + Using an extra PyPI index for installing private packages may cause security issues. + For example, if ``mypackage`` is registered with the default PyPI index, pip will install ``mypackage`` + from the default PyPI index, not from the custom one. + Further customizing installation ---------------------------------