[tor-commits] [stem/master] Update PyPI links

atagar at torproject.org atagar at torproject.org
Wed Apr 17 20:38:19 UTC 2019


commit f4c40e7a73055933641f4fc99a9d0629511ad392
Author: Illia Volochii <illia.volochii at gmail.com>
Date:   Thu Apr 11 22:18:31 2019 +0300

    Update PyPI links
---
 docs/change_log.rst                          |  3 ++-
 docs/download.rst                            |  8 ++++----
 docs/faq.rst                                 |  4 ++--
 run_tests.py                                 |  4 ++--
 setup.py                                     |  4 ++--
 stem/descriptor/hidden_service_descriptor.py |  2 +-
 stem/descriptor/remote.py                    |  6 +++---
 stem/descriptor/server_descriptor.py         |  2 +-
 stem/prereq.py                               | 10 +++++-----
 stem/util/ordereddict.py                     |  2 +-
 stem/util/term.py                            |  4 ++--
 test/task.py                                 |  4 ++--
 12 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/docs/change_log.rst b/docs/change_log.rst
index c647c001..44153d55 100644
--- a/docs/change_log.rst
+++ b/docs/change_log.rst
@@ -83,6 +83,7 @@ The following are only available within Stem's `git repository
  * **Website**
 
   * Added NetBSD to our `download page <download.html>`_
+  * `Update PyPI links <https://packaging.python.org/guides/migrating-to-pypi-org/>`_ (:trac:`30137`)
 
  * **Interpreter**
 
@@ -202,7 +203,7 @@ Year long accumulation of fixes and improvements in support of the `Nyx 2.0 rele
   * Supporting `descriptor creation <tutorials/mirror_mirror_on_the_wall.html#can-i-create-descriptors>`_ (:trac:`10227`)
   * Support and validation for `ed25519 certificates <api/descriptor/certificate.html>`_ (`spec <https://gitweb.torproject.org/torspec.git/tree/cert-spec.txt>`_, :trac:`21558`)
   * Added :func:`~stem.descriptor.networkstatus.NetworkStatusDocumentV3.validate_signatures` to check our key certificate signatures (:trac:`11045`)
-  * Moved from the deprecated `pycrypto <https://www.dlitz.net/software/pycrypto/>`_ module to `cryptography <https://pypi.python.org/pypi/cryptography>`_ for validating signatures (:trac:`21086`)
+  * Moved from the deprecated `pycrypto <https://www.dlitz.net/software/pycrypto/>`_ module to `cryptography <https://pypi.org/project/cryptography/>`_ for validating signatures (:trac:`21086`)
   * Sped descriptor reading by ~25% by deferring defaulting when validating
   * Added server descriptor's new extra_info_sha256_digest attribute (:spec:`0f03581`)
   * Added server descriptor's new protocol attribute (:spec:`eb4fb3c`)
diff --git a/docs/download.rst b/docs/download.rst
index 5b675d2e..dcf7c7ad 100644
--- a/docs/download.rst
+++ b/docs/download.rst
@@ -74,16 +74,16 @@ Download
    :header-rows: 0
 
    * - .. image:: /_static/section/download/pypi.png
-          :target: https://pypi.python.org/pypi/stem/
+          :target: https://pypi.org/project/stem/
 
      - .. image:: /_static/label/python_package_index.png
-          :target: https://pypi.python.org/pypi/stem/
+          :target: https://pypi.org/project/stem/
 
        Signed releases and instructions for both Python 2.x and 3.x. You can
        easily install from its `tarball
-       <https://pypi.python.org/packages/11/d5/e51983f81b38408ae2f0e166481ad867962f6fa07610fe71119534e12d41/stem-1.6.0.tar.gz>`_
+       <https://files.pythonhosted.org/packages/7f/71/d82f4204e88be00220cc54eedb2972fd05081cb0e5ebdc537d8940b064ea/stem-1.7.1.tar.gz>`_
        (`sig
-       <https://pypi.python.org/packages/11/d5/e51983f81b38408ae2f0e166481ad867962f6fa07610fe71119534e12d41/stem-1.6.0.tar.gz.asc>`_),
+       <https://files.pythonhosted.org/packages/7f/71/d82f4204e88be00220cc54eedb2972fd05081cb0e5ebdc537d8940b064ea/stem-1.7.1.tar.gz.asc>`_),
        or with **pip**...
 
        ::
diff --git a/docs/faq.rst b/docs/faq.rst
index ceaeaf78..b8596024 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -53,7 +53,7 @@ Does Stem have any dependencies?
 **No.** All you need in order to use Stem is Python.
 
 When it is available Stem will use `cryptography
-<https://pypi.python.org/pypi/cryptography>`_ to validate descriptor signatures.
+<https://pypi.org/project/cryptography/>`_ to validate descriptor signatures.
 However, there is no need to install cryptography unless you need this
 functionality.
 
@@ -468,7 +468,7 @@ you will need to decompress the archives yourself.
 
 With modern versions of tar you can simply decompress archives via **tar xf
 archive.tar.xz**, or programmatically using `lzma
-<https://pypi.python.org/pypi/pyliblzma>`_.
+<https://pypi.org/project/pyliblzma/>`_.
 
 .. _what_is_that_with_keyword_i_keep_seeing_in_the_tutorials:
 
diff --git a/run_tests.py b/run_tests.py
index 8f71a20b..d5a16651 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -53,14 +53,14 @@ CONFIG = stem.util.conf.config_dict('test', {
 MOCK_UNAVAILABLE_MSG = """\
 To run stem's tests you'll need mock...
 
-https://pypi.python.org/pypi/mock/
+https://pypi.org/project/mock/
 """
 
 MOCK_OUT_OF_DATE_MSG = """\
 To run stem's tests you'll need mock. You have version %s, but you need
 version 0.8.0 or later...
 
-https://pypi.python.org/pypi/mock/
+https://pypi.org/project/mock/
 """
 
 NEW_CAPABILITIES_FOUND = """\
diff --git a/setup.py b/setup.py
index 0375e94f..dd487558 100644
--- a/setup.py
+++ b/setup.py
@@ -50,11 +50,11 @@
 #   |- git tag -u 9ABBEEC6 -m "stem release 1.0.0" 1.0.0 d0bb81a
 #   +- git push --tags
 #
-# * Dry-run release on https://pypi.python.org/pypi/stem/
+# * Dry-run release on https://pypi.org/project/stem/
 #   |- python setup.py sdist --dryrun
 #   |- gpg --detach-sig --armor dist/stem-dry-run-1.0.0.tar.gz
 #   |- twine upload dist/*
-#   +- Check that https://pypi.python.org/pypi/stem-dry-run/ looks correct, comparing it to https://pypi.python.org/pypi/stem/
+#   +- Check that https://pypi.org/project/stem-dry-run/ looks correct, comparing it to https://pypi.org/project/stem/
 #      +- Don't worry about the 'Bug Tracker' being missing. That's an attribute of the project itself.
 #
 # * Final release
diff --git a/stem/descriptor/hidden_service_descriptor.py b/stem/descriptor/hidden_service_descriptor.py
index b5bcc2fc..bd35a19d 100644
--- a/stem/descriptor/hidden_service_descriptor.py
+++ b/stem/descriptor/hidden_service_descriptor.py
@@ -207,7 +207,7 @@ class HiddenServiceDescriptor(Descriptor):
   .. versionchanged:: 1.6.0
      Moved from the deprecated `pycrypto
      <https://www.dlitz.net/software/pycrypto/>`_ module to `cryptography
-     <https://pypi.python.org/pypi/cryptography>`_ for validating signatures.
+     <https://pypi.org/project/cryptography/>`_ for validating signatures.
 
   .. versionchanged:: 1.6.0
      Added the **skip_crypto_validation** constructor argument.
diff --git a/stem/descriptor/remote.py b/stem/descriptor/remote.py
index d3e07b6a..c663276b 100644
--- a/stem/descriptor/remote.py
+++ b/stem/descriptor/remote.py
@@ -87,7 +87,7 @@ content. For example...
   =============== ===========
   **PLAINTEXT**   Uncompressed data.
   **GZIP**        `GZip compression <https://www.gnu.org/software/gzip/>`_.
-  **ZSTD**        `Zstandard compression <https://www.zstd.net>`_, this requires the `zstandard module <https://pypi.python.org/pypi/zstandard>`_.
+  **ZSTD**        `Zstandard compression <https://www.zstd.net>`_, this requires the `zstandard module <https://pypi.org/project/zstandard/>`_.
   **LZMA**        `LZMA compression <https://en.wikipedia.org/wiki/LZMA>`_, this requires the 'lzma module <https://docs.python.org/3/library/lzma.html>`_.
   =============== ===========
 """
@@ -297,7 +297,7 @@ class Query(object):
   =============================================== ===========
 
   **ZSTD** compression requires `zstandard
-  <https://pypi.python.org/pypi/zstandard>`_, and **LZMA** requires the `lzma
+  <https://pypi.org/project/zstandard/>`_, and **LZMA** requires the `lzma
   module <https://docs.python.org/3/library/lzma.html>`_.
 
   For legacy reasons if our resource has a '.z' suffix then our **compression**
@@ -1041,7 +1041,7 @@ def _decompress(data, encoding):
     return zlib.decompress(data, zlib.MAX_WBITS | 32)
   elif encoding == Compression.ZSTD:
     if not stem.prereq.is_zstd_available():
-      raise ImportError('Decompressing zstd data requires https://pypi.python.org/pypi/zstandard')
+      raise ImportError('Decompressing zstd data requires https://pypi.org/project/zstandard/')
 
     import zstd
     output_buffer = io.BytesIO()
diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index fc03a711..88003fe0 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -802,7 +802,7 @@ class RelayDescriptor(ServerDescriptor):
   .. versionchanged:: 1.6.0
      Moved from the deprecated `pycrypto
      <https://www.dlitz.net/software/pycrypto/>`_ module to `cryptography
-     <https://pypi.python.org/pypi/cryptography>`_ for validating signatures.
+     <https://pypi.org/project/cryptography/>`_ for validating signatures.
 
   .. versionchanged:: 1.6.0
      Added the certificate attribute.
diff --git a/stem/prereq.py b/stem/prereq.py
index 1e4450c7..4cb51113 100644
--- a/stem/prereq.py
+++ b/stem/prereq.py
@@ -26,8 +26,8 @@ import inspect
 import platform
 import sys
 
-CRYPTO_UNAVAILABLE = "Unable to import the cryptography module. Because of this we'll be unable to verify descriptor signature integrity. You can get cryptography from: https://pypi.python.org/pypi/cryptography"
-ZSTD_UNAVAILABLE = 'ZSTD compression requires the zstandard module (https://pypi.python.org/pypi/zstandard)'
+CRYPTO_UNAVAILABLE = "Unable to import the cryptography module. Because of this we'll be unable to verify descriptor signature integrity. You can get cryptography from: https://pypi.org/project/cryptography/"
+ZSTD_UNAVAILABLE = 'ZSTD compression requires the zstandard module (https://pypi.org/project/zstandard/)'
 LZMA_UNAVAILABLE = 'LZMA compression requires the lzma module (https://docs.python.org/3/library/lzma.html)'
 ED25519_UNSUPPORTED = 'Unable to verify descriptor ed25519 certificate integrity. ed25519 is not supported by installed versions of OpenSSL and/or cryptography'
 
@@ -143,7 +143,7 @@ def is_crypto_available():
 
 def is_zstd_available():
   """
-  Checks if the `zstd module <https://pypi.python.org/pypi/zstandard>`_ is
+  Checks if the `zstd module <https://pypi.org/project/zstandard/>`_ is
   available.
 
   .. versionadded:: 1.7.0
@@ -153,7 +153,7 @@ def is_zstd_available():
 
   try:
     # Unfortunately the zstandard module uses the same namespace as another
-    # zstd module (https://pypi.python.org/pypi/zstd), so we need to
+    # zstd module (https://pypi.org/project/zstd/), so we need to
     # differentiate them.
 
     import zstd
@@ -187,7 +187,7 @@ def is_mock_available():
   """
   Checks if the mock module is available. In python 3.3 and up it is a builtin
   unittest module, but before this it needed to be `installed separately
-  <https://pypi.python.org/pypi/mock/>`_. Imports should be as follows....
+  <https://pypi.org/project/mock/>`_. Imports should be as follows....
 
   ::
 
diff --git a/stem/util/ordereddict.py b/stem/util/ordereddict.py
index 07c7d4ea..ec228f31 100644
--- a/stem/util/ordereddict.py
+++ b/stem/util/ordereddict.py
@@ -1,5 +1,5 @@
 # Drop in replacement for python 2.7's OrderedDict, from...
-# http://pypi.python.org/pypi/ordereddict
+# https://pypi.org/project/ordereddict/
 #
 # Stem users should *not* rely upon this module. It will be removed when we
 # drop support for python 2.6 and below.
diff --git a/stem/util/term.py b/stem/util/term.py
index e53c3350..48ab1e23 100644
--- a/stem/util/term.py
+++ b/stem/util/term.py
@@ -112,8 +112,8 @@ def format(msg, *attr):
   The following are some toolkits providing similar capabilities:
 
   * `django.utils.termcolors <https://github.com/django/django/blob/master/django/utils/termcolors.py>`_
-  * `termcolor <https://pypi.python.org/pypi/termcolor>`_
-  * `colorama <https://pypi.python.org/pypi/colorama>`_
+  * `termcolor <https://pypi.org/project/termcolor/>`_
+  * `colorama <https://pypi.org/project/colorama/>`_
 
   .. versionchanged:: 1.6.0
      Normalized return value to be unicode to better support python 2/3
diff --git a/test/task.py b/test/task.py
index 7b75aa47..832b397f 100644
--- a/test/task.py
+++ b/test/task.py
@@ -68,8 +68,8 @@ SRC_PATHS = [os.path.join(test.STEM_BASE, path) for path in (
   os.path.join('docs', 'roles.py'),
 )]
 
-PYFLAKES_UNAVAILABLE = 'Static error checking requires pyflakes version 0.7.3 or later. Please install it from ...\n  http://pypi.python.org/pypi/pyflakes\n'
-PYCODESTYLE_UNAVAILABLE = 'Style checks require pycodestyle version 1.4.2 or later. Please install it from...\n  http://pypi.python.org/pypi/pycodestyle\n'
+PYFLAKES_UNAVAILABLE = 'Static error checking requires pyflakes version 0.7.3 or later. Please install it from ...\n  https://pypi.org/project/pyflakes/\n'
+PYCODESTYLE_UNAVAILABLE = 'Style checks require pycodestyle version 1.4.2 or later. Please install it from...\n  https://pypi.org/project/pycodestyle/\n'
 
 
 def _check_stem_version():



More information about the tor-commits mailing list