Use https:// URLs when referring to python.org hosts.
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index e1b9e10..8a55791 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -1686,7 +1686,7 @@
.. seealso::
- `pytz <http://pypi.python.org/pypi/pytz/>`_
+ `pytz <https://pypi.python.org/pypi/pytz/>`_
The standard library has :class:`timezone` class for handling arbitrary
fixed offsets from UTC and :attr:`timezone.utc` as UTC timezone instance.
diff --git a/Doc/library/distutils.rst b/Doc/library/distutils.rst
index a7ad837..e3d1314 100644
--- a/Doc/library/distutils.rst
+++ b/Doc/library/distutils.rst
@@ -30,7 +30,7 @@
The recommended `pip <https://pip.pypa.io/>`__ installer runs all
``setup.py`` scripts with ``setuptools``, even if the script itself only
imports ``distutils``. Refer to the
-`Python Packaging User Guide <http://packaging.python.org>`_ for more
+`Python Packaging User Guide <https://packaging.python.org>`_ for more
information.
For the benefits of packaging tool authors and users seeking a deeper
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 3766d43..06ead8c 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1292,7 +1292,7 @@
example, sort by department, then by salary grade).
For sorting examples and a brief sorting tutorial, see `Sorting HowTo
- <http://wiki.python.org/moin/HowTo/Sorting/>`_\.
+ <https://wiki.python.org/moin/HowTo/Sorting/>`_\.
.. function:: staticmethod(function)
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 09a5d71..8ebb440 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -29,7 +29,7 @@
:ref:`import`
The language reference for the :keyword:`import` statement.
- `Packages specification <http://www.python.org/doc/essays/packages.html>`__
+ `Packages specification <https://www.python.org/doc/essays/packages.html>`__
Original specification of packages. Some semantics have changed since
the writing of this document (e.g. redirecting based on ``None``
in :data:`sys.modules`).
diff --git a/Doc/library/index.rst b/Doc/library/index.rst
index 277feb1..ac7ab91 100644
--- a/Doc/library/index.rst
+++ b/Doc/library/index.rst
@@ -30,7 +30,7 @@
In addition to the standard library, there is a growing collection of
several thousand components (from individual programs and modules to
packages and entire application development frameworks), available from
-the `Python Package Index <http://pypi.python.org/pypi>`_.
+the `Python Package Index <https://pypi.python.org/pypi>`_.
.. toctree::
diff --git a/Doc/library/othergui.rst b/Doc/library/othergui.rst
index eb49b99..2d51491 100644
--- a/Doc/library/othergui.rst
+++ b/Doc/library/othergui.rst
@@ -56,7 +56,7 @@
PyGTK, PyQt, and wxPython, all have a modern look and feel and more
widgets than Tkinter. In addition, there are many other GUI toolkits for
Python, both cross-platform, and platform-specific. See the `GUI Programming
-<http://wiki.python.org/moin/GuiProgramming>`_ page in the Python Wiki for a
+<https://wiki.python.org/moin/GuiProgramming>`_ page in the Python Wiki for a
much more complete list, and also for links to documents where the
different GUI toolkits are compared.
diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst
index 3f520e8..eebd501 100644
--- a/Doc/library/pydoc.rst
+++ b/Doc/library/pydoc.rst
@@ -76,7 +76,7 @@
Python interpreter and typed ``import spam``.
Module docs for core modules are assumed to reside in
-``http://docs.python.org/X.Y/library/`` where ``X`` and ``Y`` are the
+``https://docs.python.org/X.Y/library/`` where ``X`` and ``Y`` are the
major and minor version numbers of the Python interpreter. This can
be overridden by setting the :envvar:`PYTHONDOCS` environment variable
to a different URL or to a local directory containing the Library
diff --git a/Doc/library/unittest.mock-examples.rst b/Doc/library/unittest.mock-examples.rst
index 1c43bfe..b203598 100644
--- a/Doc/library/unittest.mock-examples.rst
+++ b/Doc/library/unittest.mock-examples.rst
@@ -513,7 +513,7 @@
~~~~~~~~~~~~~~~
In some tests I wanted to mock out a call to `datetime.date.today()
-<http://docs.python.org/library/datetime.html#datetime.date.today>`_ to return
+<https://docs.python.org/library/datetime.html#datetime.date.today>`_ to return
a known date, but I didn't want to prevent the code under test from
creating new date objects. Unfortunately `datetime.date` is written in C, and
so I couldn't just monkey-patch out the static `date.today` method.
@@ -557,13 +557,13 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~
A Python generator is a function or method that uses the `yield statement
-<http://docs.python.org/reference/simple_stmts.html#the-yield-statement>`_ to
+<https://docs.python.org/reference/simple_stmts.html#the-yield-statement>`_ to
return a series of values when iterated over [#]_.
A generator method / function is called to return the generator object. It is
the generator object that is then iterated over. The protocol method for
iteration is `__iter__
-<http://docs.python.org/library/stdtypes.html#container.__iter__>`_, so we can
+<https://docs.python.org/library/stdtypes.html#container.__iter__>`_, so we can
mock this using a `MagicMock`.
Here's an example class with an "iter" method implemented as a generator:
@@ -1254,7 +1254,7 @@
`AssertionError` directly and provide a more useful failure message.
As of version 1.5, the Python testing library `PyHamcrest
-<http://pypi.python.org/pypi/PyHamcrest>`_ provides similar functionality,
+<https://pypi.python.org/pypi/PyHamcrest>`_ provides similar functionality,
that may be useful here, in the form of its equality matcher
(`hamcrest.library.integration.match_equality
-<http://packages.python.org/PyHamcrest/integration.html#hamcrest.library.integration.match_equality>`_).
+<http://pythonhosted.org/PyHamcrest/integration.html#hamcrest.library.integration.match_equality>`_).
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index cb72a68..cb1bac9 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -30,7 +30,7 @@
used by many mocking frameworks.
There is a backport of `unittest.mock` for earlier versions of Python,
-available as `mock on PyPI <http://pypi.python.org/pypi/mock>`_.
+available as `mock on PyPI <https://pypi.python.org/pypi/mock>`_.
**Source code:** :source:`Lib/unittest/mock.py`
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 32cf94f..a4bed7a 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -55,7 +55,7 @@
Third-party unittest frameworks with a lighter-weight syntax for writing
tests. For example, ``assert func(10) == 42``.
- `The Python Testing Tools Taxonomy <http://wiki.python.org/moin/PythonTestingToolsTaxonomy>`_
+ `The Python Testing Tools Taxonomy <https://wiki.python.org/moin/PythonTestingToolsTaxonomy>`_
An extensive list of Python testing tools including functional testing
frameworks and mock object libraries.