Skip to content

Commit

Permalink
pythongh-91838: Use HTTPS links in docs for resources which redirect …
Browse files Browse the repository at this point in the history
…to HTTPS (pythonGH-95527)

If an HTTP link is redirected to a same looking HTTPS link, the latter can
be used directly without changes in readability and behavior.
It protects from a men-in-the-middle attack.

This change does not affect Python examples.
  • Loading branch information
serhiy-storchaka committed Aug 4, 2022
1 parent bcc74d5 commit c00f59f
Show file tree
Hide file tree
Showing 40 changed files with 69 additions and 290 deletions.
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ Build Status

- main

+ `Stable buildbots <http://buildbot.python.org/3.x.stable/>`_
+ `Stable buildbots <https://buildbot.python.org/3.x.stable/>`_

- 3.9

+ `Stable buildbots <http://buildbot.python.org/3.9.stable/>`_
+ `Stable buildbots <https://buildbot.python.org/3.9.stable/>`_

- 3.8

+ `Stable buildbots <http://buildbot.python.org/3.8.stable/>`_
+ `Stable buildbots <https://buildbot.python.org/3.8.stable/>`_

- 3.7

+ `Stable buildbots <http://buildbot.python.org/3.7.stable/>`_
+ `Stable buildbots <https://buildbot.python.org/3.7.stable/>`_


Thank You
Expand Down
4 changes: 2 additions & 2 deletions Doc/extending/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Recommended third party tools

This guide only covers the basic tools for creating extensions provided
as part of this version of CPython. Third party tools like
`Cython <http://cython.org/>`_, `cffi <https://cffi.readthedocs.io>`_,
`SWIG <http://www.swig.org>`_ and `Numba <https://numba.pydata.org/>`_
`Cython <https://cython.org/>`_, `cffi <https://cffi.readthedocs.io>`_,
`SWIG <https://www.swig.org>`_ and `Numba <https://numba.pydata.org/>`_
offer both simpler and more sophisticated approaches to creating C and C++
extensions for Python.

Expand Down
8 changes: 4 additions & 4 deletions Doc/faq/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ is exactly the same type of object that a lambda expression yields) is assigned!
Can Python be compiled to machine code, C or some other language?
-----------------------------------------------------------------

`Cython <http://cython.org/>`_ compiles a modified version of Python with
optional annotations into C extensions. `Nuitka <http://www.nuitka.net/>`_ is
`Cython <https://cython.org/>`_ compiles a modified version of Python with
optional annotations into C extensions. `Nuitka <https://www.nuitka.net/>`_ is
an up-and-coming compiler of Python into C++ code, aiming to support the full
Python language.

Expand All @@ -338,8 +338,8 @@ cycles and deletes the objects involved. The :mod:`gc` module provides functions
to perform a garbage collection, obtain debugging statistics, and tune the
collector's parameters.

Other implementations (such as `Jython <http://www.jython.org>`_ or
`PyPy <http://www.pypy.org>`_), however, can rely on a different mechanism
Other implementations (such as `Jython <https://www.jython.org>`_ or
`PyPy <https://www.pypy.org>`_), however, can rely on a different mechanism
such as a full-blown garbage collector. This difference can cause some
subtle porting problems if your Python code depends on the behavior of the
reference counting implementation.
Expand Down
8 changes: 4 additions & 4 deletions Doc/faq/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ on what you're trying to do.

.. XXX make sure these all work
`Cython <http://cython.org>`_ and its relative `Pyrex
`Cython <https://cython.org>`_ and its relative `Pyrex
<https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers
that accept a slightly modified form of Python and generate the corresponding
C code. Cython and Pyrex make it possible to write an extension without having
to learn Python's C API.

If you need to interface to some C or C++ library for which no Python extension
currently exists, you can try wrapping the library's data types and functions
with a tool such as `SWIG <http://www.swig.org>`_. `SIP
with a tool such as `SWIG <https://www.swig.org>`_. `SIP
<https://riverbankcomputing.com/software/sip/intro>`__, `CXX
<http://cxx.sourceforge.net/>`_ `Boost
<http://www.boost.org/libs/python/doc/index.html>`_, or `Weave
<https://www.boost.org/libs/python/doc/index.html>`_, or `Weave
<https://github.com/scipy/weave>`_ are also
alternatives for wrapping C++ libraries.

Expand Down Expand Up @@ -286,6 +286,6 @@ Can I create an object class with some methods implemented in C and others in Py
Yes, you can inherit from built-in classes such as :class:`int`, :class:`list`,
:class:`dict`, etc.

The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index.html)
The Boost Python Library (BPL, https://www.boost.org/libs/python/doc/index.html)
provides a way of doing this from C++ (i.e. you can inherit from an extension
class written in C++ using the BPL).
2 changes: 1 addition & 1 deletion Doc/faq/programming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ performance levels:
detrimental to readability).

If you have reached the limit of what pure Python can allow, there are tools
to take you further away. For example, `Cython <http://cython.org>`_ can
to take you further away. For example, `Cython <https://cython.org>`_ can
compile a slightly modified version of Python code into a C extension, and
can be used on many different platforms. Cython can take advantage of
compilation (and optional type annotations) to make your code significantly
Expand Down
2 changes: 1 addition & 1 deletion Doc/howto/cporting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ We recommend the following resources for porting extension modules to Python 3:

.. _Migrating C extensions: http://python3porting.com/cextensions.html
.. _Porting guide: https://py3c.readthedocs.io/en/latest/guide.html
.. _Cython: http://cython.org/
.. _Cython: https://cython.org/
.. _CFFI: https://cffi.readthedocs.io/en/latest/
4 changes: 2 additions & 2 deletions Doc/howto/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,10 @@ Patches adding support for these would be welcome; see
`the Python Developer's Guide <https://devguide.python.org/>`_ to
learn more about submitting patches to Python.

* `Writing Programs with NCURSES <http://invisible-island.net/ncurses/ncurses-intro.html>`_:
* `Writing Programs with NCURSES <https://invisible-island.net/ncurses/ncurses-intro.html>`_:
a lengthy tutorial for C programmers.
* `The ncurses man page <https://linux.die.net/man/3/ncurses>`_
* `The ncurses FAQ <http://invisible-island.net/ncurses/ncurses.faq.html>`_
* `The ncurses FAQ <https://invisible-island.net/ncurses/ncurses.faq.html>`_
* `"Use curses... don't swear" <https://www.youtube.com/watch?v=eN1eZtjLEnU>`_:
video of a PyCon 2013 talk on controlling terminals using curses or Urwid.
* `"Console Applications with Urwid" <http://www.pyvideo.org/video/1568/console-applications-with-urwid>`_:
Expand Down
4 changes: 2 additions & 2 deletions Doc/howto/functional.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ flow inside a program. The book uses Scheme for its examples, but many of the
design approaches described in these chapters are applicable to functional-style
Python code.

http://www.defmacro.org/ramblings/fp.html: A general introduction to functional
https://www.defmacro.org/ramblings/fp.html: A general introduction to functional
programming that uses Java examples and has a lengthy historical introduction.

https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia entry
Expand All @@ -1228,7 +1228,7 @@ https://en.wikipedia.org/wiki/Currying: Entry for the concept of currying.
Python-specific
---------------

http://gnosis.cx/TPiP/: The first chapter of David Mertz's book
https://gnosis.cx/TPiP/: The first chapter of David Mertz's book
:title-reference:`Text Processing in Python` discusses functional programming
for text processing, in the section titled "Utilizing Higher-Order Functions in
Text Processing".
Expand Down
6 changes: 3 additions & 3 deletions Doc/howto/pyporting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,9 @@ to make sure everything functions as expected in both versions of Python.


.. _caniusepython3: https://pypi.org/project/caniusepython3
.. _cheat sheet: http://python-future.org/compatible_idioms.html
.. _cheat sheet: https://python-future.org/compatible_idioms.html
.. _coverage.py: https://pypi.org/project/coverage
.. _Futurize: http://python-future.org/automatic_conversion.html
.. _Futurize: https://python-future.org/automatic_conversion.html
.. _importlib2: https://pypi.org/project/importlib2
.. _Modernize: https://python-modernize.readthedocs.io/
.. _mypy: http://mypy-lang.org/
Expand All @@ -445,7 +445,7 @@ to make sure everything functions as expected in both versions of Python.
.. _Python 3 Q & A: https://ncoghlan-devs-python-notes.readthedocs.io/en/latest/python3/questions_and_answers.html

.. _pytype: https://github.com/google/pytype
.. _python-future: http://python-future.org/
.. _python-future: https://python-future.org/
.. _python-porting: https://mail.python.org/pipermail/python-porting/
.. _six: https://pypi.org/project/six
.. _tox: https://pypi.org/project/tox
Expand Down
6 changes: 3 additions & 3 deletions Doc/howto/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ On the Computerphile Youtube channel, Tom Scott briefly
(9 minutes 36 seconds).

To help understand the standard, Jukka Korpela has written `an introductory
guide <http://jkorpela.fi/unicode/guide.html>`_ to reading the
guide <https://jkorpela.fi/unicode/guide.html>`_ to reading the
Unicode character tables.

Another `good introductory article <https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/>`_
Expand Down Expand Up @@ -735,7 +735,7 @@ References
----------

One section of `Mastering Python 3 Input/Output
<http://pyvideo.org/video/289/pycon-2010--mastering-python-3-i-o>`_,
<https://pyvideo.org/video/289/pycon-2010--mastering-python-3-i-o>`_,
a PyCon 2010 talk by David Beazley, discusses text processing and binary data handling.

The `PDF slides for Marc-André Lemburg's presentation "Writing Unicode-aware
Expand All @@ -745,7 +745,7 @@ discuss questions of character encodings as well as how to internationalize
and localize an application. These slides cover Python 2.x only.

`The Guts of Unicode in Python
<http://pyvideo.org/video/1768/the-guts-of-unicode-in-python>`_
<https://pyvideo.org/video/1768/the-guts-of-unicode-in-python>`_
is a PyCon 2013 talk by Benjamin Peterson that discusses the internal Unicode
representation in Python 3.3.

Expand Down
2 changes: 1 addition & 1 deletion Doc/howto/urllib2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ fetched, particularly the headers sent by the server. It is currently an
:class:`http.client.HTTPMessage` instance.

Typical headers include 'Content-length', 'Content-type', and so on. See the
`Quick Reference to HTTP Headers <http://jkorpela.fi/http.html>`_
`Quick Reference to HTTP Headers <https://jkorpela.fi/http.html>`_
for a useful listing of HTTP headers with brief explanations of their meaning
and use.

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ added elements by appending to the right and popping to the left::

def moving_average(iterable, n=3):
# moving_average([40, 30, 50, 46, 39, 44]) --> 40.0 42.0 45.0 43.0
# http://en.wikipedia.org/wiki/Moving_average
# https://en.wikipedia.org/wiki/Moving_average
it = iter(iterable)
d = deque(itertools.islice(it, n-1))
d.appendleft(0)
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/difflib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,9 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.

.. seealso::

`Pattern Matching: The Gestalt Approach <http://www.drdobbs.com/database/pattern-matching-the-gestalt-approach/184407970>`_
`Pattern Matching: The Gestalt Approach <https://www.drdobbs.com/database/pattern-matching-the-gestalt-approach/184407970>`_
Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. This
was published in `Dr. Dobb's Journal <http://www.drdobbs.com/>`_ in July, 1988.
was published in `Dr. Dobb's Journal <https://www.drdobbs.com/>`_ in July, 1988.


.. _sequence-matcher:
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/gettext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ There are a few tools to extract the strings meant for translation.
The original GNU :program:`gettext` only supported C or C++ source
code but its extended version :program:`xgettext` scans code written
in a number of languages, including Python, to find strings marked as
translatable. `Babel <http://babel.pocoo.org/>`__ is a Python
translatable. `Babel <https://babel.pocoo.org/>`__ is a Python
internationalization library that includes a :file:`pybabel` script to
extract and compile message catalogs. François Pinard's program
called :program:`xpot` does a similar job and is available as part of
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/http.client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ Here is an example session that shows how to ``POST`` requests::
302 Found
>>> data = response.read()
>>> data
b'Redirecting to <a href="http://bugs.python.org/issue12524">http://bugs.python.org/issue12524</a>'
b'Redirecting to <a href="https://bugs.python.org/issue12524">https://bugs.python.org/issue12524</a>'
>>> conn.close()

Client side ``HTTP PUT`` requests are very similar to ``POST`` requests. The
Expand Down
Loading

0 comments on commit c00f59f

Please sign in to comment.