From 1c511da6468ab6e22a6eb0361e884f74d9e55913 Mon Sep 17 00:00:00 2001 From: meowmeowcat <68463158+meowmeowmeowcat@users.noreply.github.com> Date: Sat, 18 Sep 2021 22:05:22 +0800 Subject: [PATCH 1/8] Add a section about proxy support --- docs/index.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 4b336654..39ac72d6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -151,6 +151,19 @@ on a CI/build server). * ``TWINE_NON_INTERACTIVE`` - Do not interactively prompt for username/password if the required credentials are missing. +Proxy Support +^^^^^^^^^^^^^ + +Twine allows you to upload your distributions with/without proxy via these environment variables: + +* ``HTTP_PROXY`` - Upload your distributions with HTTP proxy. +* ``HTTPS_PROXY`` - Upload your distributions with HTTPS proxy. +* ``NO_PROXY`` - Upload your distributions without proxy. + +For more information, please visit +`"Proxies" section in requests docs `_ +or read `an article about proxy `_. + Keyring Support --------------- From f027989b8b28711113d450aac14f60f1179dbe89 Mon Sep 17 00:00:00 2001 From: meowmeowcat <68463158+meowmeowmeowcat@users.noreply.github.com> Date: Sat, 18 Sep 2021 22:08:14 +0800 Subject: [PATCH 2/8] Fix linting error --- docs/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 39ac72d6..41f5caa2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -154,7 +154,8 @@ on a CI/build server). Proxy Support ^^^^^^^^^^^^^ -Twine allows you to upload your distributions with/without proxy via these environment variables: +Twine allows you to upload your distributions with/without proxy via +these environment variables: * ``HTTP_PROXY`` - Upload your distributions with HTTP proxy. * ``HTTPS_PROXY`` - Upload your distributions with HTTPS proxy. From 857fdf4b6cde6afd91bac68f0692c32352e1f7cf Mon Sep 17 00:00:00 2001 From: meowmeowcat <68463158+meowmeowmeowcat@users.noreply.github.com> Date: Sun, 19 Sep 2021 18:26:52 +0800 Subject: [PATCH 3/8] Provide a minimal example --- docs/index.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 41f5caa2..16236020 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -161,9 +161,20 @@ these environment variables: * ``HTTPS_PROXY`` - Upload your distributions with HTTPS proxy. * ``NO_PROXY`` - Upload your distributions without proxy. -For more information, please visit -`"Proxies" section in requests docs `_ -or read `an article about proxy `_. +For example: + +.. code-block:: bash + + export HTTPS_PROXY=socks5://user:pass@host:port + + twine upload dist/* + + +For more information, see the Requests documentation on +`proxies `_ and +`SOCKS `_ , and +`an in-depth article about proxy environment variables +`_. Keyring Support --------------- From c89dd1280edd602c3104d70b7790810e96179f54 Mon Sep 17 00:00:00 2001 From: meowmeowcat Date: Sun, 19 Sep 2021 20:33:04 +0800 Subject: [PATCH 4/8] Use an example for the section Co-authored-by: Brian Rutledge --- docs/index.rst | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 16236020..f711deed 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -154,14 +154,7 @@ on a CI/build server). Proxy Support ^^^^^^^^^^^^^ -Twine allows you to upload your distributions with/without proxy via -these environment variables: - -* ``HTTP_PROXY`` - Upload your distributions with HTTP proxy. -* ``HTTPS_PROXY`` - Upload your distributions with HTTPS proxy. -* ``NO_PROXY`` - Upload your distributions without proxy. - -For example: +Twine can be configured to use a proxy by setting environment variables. For example: .. code-block:: bash From 44539e3efc7ee464b1d436e7baa6578ad9f97113 Mon Sep 17 00:00:00 2001 From: meowmeowcat <68463158+meowmeowmeowcat@users.noreply.github.com> Date: Sun, 19 Sep 2021 20:38:32 +0800 Subject: [PATCH 5/8] Fix linting error --- docs/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index f711deed..b5925c5a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -154,7 +154,8 @@ on a CI/build server). Proxy Support ^^^^^^^^^^^^^ -Twine can be configured to use a proxy by setting environment variables. For example: +Twine can be configured to use a proxy by setting environment variables. +For example: .. code-block:: bash From 48ac52d3ece46d118ad15f36f95dc3ccd7020f5d Mon Sep 17 00:00:00 2001 From: meowmeowcat Date: Sun, 19 Sep 2021 23:52:01 +0800 Subject: [PATCH 6/8] Add one more example Co-authored-by: Ian Stapleton Cordasco --- docs/index.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index b5925c5a..56ce64d0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -163,6 +163,13 @@ For example: twine upload dist/* +Alternatively, one can set the environment variable for the command itself without exporting it for other tools as well + +.. code-block:: bash + + HTTPS_PROXY=socks5://user:pass@host:port twine upload dist/* + + For more information, see the Requests documentation on `proxies `_ and From 11cbb462c7b08c811b06bd065768710b7f0a766d Mon Sep 17 00:00:00 2001 From: meowmeowcat <68463158+meowmeowmeowcat@users.noreply.github.com> Date: Sun, 19 Sep 2021 23:58:51 +0800 Subject: [PATCH 7/8] Fix linting error --- docs/index.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 56ce64d0..71bbbc86 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -163,14 +163,13 @@ For example: twine upload dist/* -Alternatively, one can set the environment variable for the command itself without exporting it for other tools as well +Alternatively, one can set the environment variable for the command +itself without exporting it for other tools as well: .. code-block:: bash HTTPS_PROXY=socks5://user:pass@host:port twine upload dist/* - - For more information, see the Requests documentation on `proxies `_ and `SOCKS `_ , and From cb791dad7b1f038f759704efb49cae3399a1fe94 Mon Sep 17 00:00:00 2001 From: meowmeowcat Date: Mon, 20 Sep 2021 00:03:23 +0800 Subject: [PATCH 8/8] Make the section simpler Co-authored-by: Brian Rutledge --- docs/index.rst | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 71bbbc86..9b2ae695 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -155,16 +155,8 @@ Proxy Support ^^^^^^^^^^^^^ Twine can be configured to use a proxy by setting environment variables. -For example: - -.. code-block:: bash - - export HTTPS_PROXY=socks5://user:pass@host:port - - twine upload dist/* - -Alternatively, one can set the environment variable for the command -itself without exporting it for other tools as well: +For example, to use a proxy for just the ``twine`` command, +without ``export``-ing it for other tools: .. code-block:: bash