Skip to content

Commit be42c06

Browse files
authored
Update URLs in comments and metadata to use HTTPS (GH-27458)
1 parent ea4673e commit be42c06

39 files changed

+58
-58
lines changed

Doc/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
# Custom sidebar templates, filenames relative to this file.
8787
html_sidebars = {
88-
# Defaults taken from http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars
88+
# Defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
8989
# Removes the quick search block
9090
'**': ['localtoc.html', 'relations.html', 'customsourcelink.html'],
9191
'index': ['indexsidebar.html'],

Doc/library/ast.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ Function and class definitions
17951795
* ``bases`` is a list of nodes for explicitly specified base classes.
17961796
* ``keywords`` is a list of :class:`keyword` nodes, principally for 'metaclass'.
17971797
Other keywords will be passed to the metaclass, as per `PEP-3115
1798-
<http://www.python.org/dev/peps/pep-3115/>`_.
1798+
<https://www.python.org/dev/peps/pep-3115/>`_.
17991799
* ``starargs`` and ``kwargs`` are each a single node, as in a function call.
18001800
starargs will be expanded to join the list of base classes, and kwargs will
18011801
be passed to the metaclass.

Doc/library/contextlib.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Functions and classes provided:
171171
from contextlib import closing
172172
from urllib.request import urlopen
173173

174-
with closing(urlopen('http://www.python.org')) as page:
174+
with closing(urlopen('https://www.python.org')) as page:
175175
for line in page:
176176
print(line)
177177

Doc/library/functools.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ The :mod:`functools` module defines the following functions:
202202
@lru_cache(maxsize=32)
203203
def get_pep(num):
204204
'Retrieve text of a Python Enhancement Proposal'
205-
resource = 'http://www.python.org/dev/peps/pep-%04d/' % num
205+
resource = 'https://www.python.org/dev/peps/pep-%04d/' % num
206206
try:
207207
with urllib.request.urlopen(resource) as s:
208208
return s.read()

Doc/library/re.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,8 @@ form.
931931
This is useful if you want to match an arbitrary literal string that may
932932
have regular expression metacharacters in it. For example::
933933

934-
>>> print(re.escape('http://www.python.org'))
935-
http://www\.python\.org
934+
>>> print(re.escape('https://www.python.org'))
935+
https://www\.python\.org
936936

937937
>>> legal_chars = string.ascii_lowercase + string.digits + "!#$%&'*+-.^_`|~:"
938938
>>> print('[%s]+' % re.escape(legal_chars))

Doc/library/webbrowser.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ parameters: ``-n`` opens the URL in a new browser window, if possible;
3939
``-t`` opens the URL in a new browser page ("tab"). The options are,
4040
naturally, mutually exclusive. Usage example::
4141

42-
python -m webbrowser -t "http://www.python.org"
42+
python -m webbrowser -t "https://www.python.org"
4343

4444
The following exception is defined:
4545

@@ -176,7 +176,7 @@ Notes:
176176

177177
Here are some simple examples::
178178

179-
url = 'http://docs.python.org/'
179+
url = 'https://docs.python.org/'
180180

181181
# Open URL in a new tab, if a browser window is already open.
182182
webbrowser.open_new_tab(url)

Lib/ctypes/test/test_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class S8I(Structure):
389389
(9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9))
390390

391391
def test_sf1651235(self):
392-
# see http://www.python.org/sf/1651235
392+
# see https://www.python.org/sf/1651235
393393

394394
proto = CFUNCTYPE(c_int, RECT, POINT)
395395
def callback(*args):

Lib/ctypes/test/test_loading.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_1703286_A(self):
9393
# NOT fit into a 32-bit integer. FreeLibrary must be able
9494
# to accept this address.
9595

96-
# These are tests for http://www.python.org/sf/1703286
96+
# These are tests for https://www.python.org/sf/1703286
9797
handle = LoadLibrary("advapi32")
9898
FreeLibrary(handle)
9999

Lib/distutils/README

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ This directory contains the Distutils package.
22

33
There's a full documentation available at:
44

5-
http://docs.python.org/distutils/
5+
https://docs.python.org/distutils/
66

77
The Distutils-SIG web page is also a good starting point:
88

9-
http://www.python.org/sigs/distutils-sig/
9+
https://www.python.org/sigs/distutils-sig/
1010

1111
$Id$

Lib/functools.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ def lru_cache(maxsize=128, typed=False):
492492
with f.cache_info(). Clear the cache and statistics with f.cache_clear().
493493
Access the underlying function with f.__wrapped__.
494494
495-
See: http://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)
495+
See: https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)
496496
497497
"""
498498

@@ -660,7 +660,7 @@ def cache(user_function, /):
660660
def _c3_merge(sequences):
661661
"""Merges MROs in *sequences* to a single MRO using the C3 algorithm.
662662
663-
Adapted from http://www.python.org/download/releases/2.3/mro/.
663+
Adapted from https://www.python.org/download/releases/2.3/mro/.
664664
665665
"""
666666
result = []

Lib/idlelib/macosx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def tkVersionWarning(root):
8383
return False
8484
return ("WARNING: The version of Tcl/Tk ({0}) in use may"
8585
" be unstable.\n"
86-
"Visit http://www.python.org/download/mac/tcltk/"
86+
"Visit https://www.python.org/download/mac/tcltk/"
8787
" for current information.".format(patchlevel))
8888
else:
8989
return False

Lib/lib2to3/tests/data/py2_test_grammar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ def testSelectors(self):
735735
s = a[-5:]
736736
s = a[:-1]
737737
s = a[-4:-3]
738-
# A rough test of SF bug 1333982. http://python.org/sf/1333982
738+
# A rough test of SF bug 1333982. https://python.org/sf/1333982
739739
# The testing here is fairly incomplete.
740740
# Test cases should include: commas with 1 and 2 colons
741741
d = {}

Lib/lib2to3/tests/data/py3_test_grammar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ def testSelectors(self):
714714
s = a[-5:]
715715
s = a[:-1]
716716
s = a[-4:-3]
717-
# A rough test of SF bug 1333982. http://python.org/sf/1333982
717+
# A rough test of SF bug 1333982. https://python.org/sf/1333982
718718
# The testing here is fairly incomplete.
719719
# Test cases should include: commas with 1 and 2 colons
720720
d = {}

Lib/pydoc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ def markup(self, text, escape=None, funcs={}, classes={}, methods={}):
694694
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
695695
results.append('<a href="%s">%s</a>' % (url, escape(all)))
696696
elif pep:
697-
url = 'http://www.python.org/dev/peps/pep-%04d/' % int(pep)
697+
url = 'https://www.python.org/dev/peps/pep-%04d/' % int(pep)
698698
results.append('<a href="%s">%s</a>' % (url, escape(all)))
699699
elif selfdot:
700700
# Create a link for methods like 'self.method(...)'

Lib/test/test_docxmlrpc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def test_autolinking(self):
133133
self.assertIn(
134134
(b'<dl><dt><a name="-add"><strong>add</strong></a>(x, y)</dt><dd>'
135135
b'<tt>Add&nbsp;two&nbsp;instances&nbsp;together.&nbsp;This&nbsp;'
136-
b'follows&nbsp;<a href="http://www.python.org/dev/peps/pep-0008/">'
136+
b'follows&nbsp;<a href="https://www.python.org/dev/peps/pep-0008/">'
137137
b'PEP008</a>,&nbsp;but&nbsp;has&nbsp;nothing<br>\nto&nbsp;do&nbsp;'
138138
b'with&nbsp;<a href="http://www.rfc-editor.org/rfc/rfc1952.txt">'
139139
b'RFC1952</a>.&nbsp;Case&nbsp;should&nbsp;matter:&nbsp;pEp008&nbsp;'

Lib/turtle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
----- turtle.py
3939
4040
This module is an extended reimplementation of turtle.py from the
41-
Python standard distribution up to Python 2.5. (See: http://www.python.org)
41+
Python standard distribution up to Python 2.5. (See: https://www.python.org)
4242
4343
It tries to keep the merits of turtle.py and to be (nearly) 100%
4444
compatible with it. This means in the first place to enable the

Lib/urllib/request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
# install it
6565
urllib.request.install_opener(opener)
6666
67-
f = urllib.request.urlopen('http://www.python.org/')
67+
f = urllib.request.urlopen('https://www.python.org/')
6868
"""
6969

7070
# XXX issues:

Lib/weakref.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
This module is an implementation of PEP 205:
44
5-
http://www.python.org/dev/peps/pep-0205/
5+
https://www.python.org/dev/peps/pep-0205/
66
"""
77

88
# Naming convention: Variables named "wr" are weak reference objects;

Lib/xml/etree/ElementInclude.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# --------------------------------------------------------------------
4343

4444
# Licensed to PSF under a Contributor Agreement.
45-
# See http://www.python.org/psf/license for licensing details.
45+
# See https://www.python.org/psf/license for licensing details.
4646

4747
##
4848
# Limited XInclude support for the ElementTree package.

Lib/xml/etree/ElementPath.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# --------------------------------------------------------------------
4949

5050
# Licensed to PSF under a Contributor Agreement.
51-
# See http://www.python.org/psf/license for licensing details.
51+
# See https://www.python.org/psf/license for licensing details.
5252

5353
##
5454
# Implementation module for XPath support. There's usually no reason

Lib/xml/etree/ElementTree.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
#---------------------------------------------------------------------
3737
# Licensed to PSF under a Contributor Agreement.
38-
# See http://www.python.org/psf/license for licensing details.
38+
# See https://www.python.org/psf/license for licensing details.
3939
#
4040
# ElementTree
4141
# Copyright (c) 1999-2008 by Fredrik Lundh. All rights reserved.
@@ -1283,7 +1283,7 @@ class XMLPullParser:
12831283
def __init__(self, events=None, *, _parser=None):
12841284
# The _parser argument is for internal use only and must not be relied
12851285
# upon in user code. It will be removed in a future release.
1286-
# See http://bugs.python.org/issue17741 for more details.
1286+
# See https://bugs.python.org/issue17741 for more details.
12871287

12881288
self._events_queue = collections.deque()
12891289
self._parser = _parser or XMLParser(target=TreeBuilder())

Lib/xml/etree/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
# --------------------------------------------------------------------
3131

3232
# Licensed to PSF under a Contributor Agreement.
33-
# See http://www.python.org/psf/license for licensing details.
33+
# See https://www.python.org/psf/license for licensing details.

Lib/xmlrpc/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def markup(self, text, escape=None, funcs={}, classes={}, methods={}):
750750
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
751751
results.append('<a href="%s">%s</a>' % (url, escape(all)))
752752
elif pep:
753-
url = 'http://www.python.org/dev/peps/pep-%04d/' % int(pep)
753+
url = 'https://www.python.org/dev/peps/pep-%04d/' % int(pep)
754754
results.append('<a href="%s">%s</a>' % (url, escape(all)))
755755
elif text[end:end+1] == '(':
756756
results.append(self.namelink(name, methods, funcs, classes))

Mac/BuildScript/resources/License.rtf

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Python was created in the early 1990s by Guido van Rossum at Stichting Mathemati
1616
\
1717
In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) in Reston, Virginia where he released several versions of the software.\
1818
\
19-
In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation, see http://www.zope.org). In 2001, the Python Software Foundation (PSF, see http://www.python.org/psf/) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF.\
19+
In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation, see http://www.zope.org). In 2001, the Python Software Foundation (PSF, see https://www.python.org/psf/) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF.\
2020
\
2121
All Python releases are Open Source (see http://www.opensource.org for the Open Source Definition). Historically, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various releases.\
2222
\

Mac/README.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ distribution, this is installed by default on macOS 10.4 or later. Be
226226
aware, though, that the Cocoa-based AquaTk's supplied starting with macOS
227227
10.6 have proven to be unstable. If possible, you should consider
228228
installing a newer version before building on macOS 10.6 or later, such as
229-
the ActiveTcl 8.6. See http://www.python.org/download/mac/tcltk/. If you
229+
the ActiveTcl 8.6. See https://www.python.org/download/mac/tcltk/. If you
230230
are building with an SDK, ensure that the newer Tcl and Tk frameworks are
231231
seen in the SDK's ``Library/Frameworks`` directory; you may need to
232232
manually create symlinks to their installed location, ``/Library/Frameworks``.
@@ -293,7 +293,7 @@ GUI programs. As of 3.4.0, the ``pythonwx.x`` aliases are no longer installed.
293293
How do I create a binary distribution?
294294
======================================
295295

296-
Download and unpack the source release from http://www.python.org/download/.
296+
Download and unpack the source release from https://www.python.org/download/.
297297
Go to the directory ``Mac/BuildScript``. There you will find a script
298298
``build-installer.py`` that does all the work. This will download and build
299299
a number of 3rd-party libaries, configures and builds a framework Python,
@@ -334,9 +334,9 @@ The configure script sometimes emits warnings like the one below::
334334
configure: WARNING: libintl.h: section "Present But Cannot Be Compiled"
335335
configure: WARNING: libintl.h: proceeding with the preprocessor's result
336336
configure: WARNING: libintl.h: in the future, the compiler will take precedence
337-
configure: WARNING: ## -------------------------------------- ##
338-
configure: WARNING: ## Report this to http://bugs.python.org/ ##
339-
configure: WARNING: ## -------------------------------------- ##
337+
configure: WARNING: ## --------------------------------------- ##
338+
configure: WARNING: ## Report this to https://bugs.python.org/ ##
339+
configure: WARNING: ## --------------------------------------- ##
340340

341341
This almost always means you are trying to build a universal binary for
342342
Python and have libraries in ``/usr/local`` that don't contain the required
@@ -399,8 +399,8 @@ The basic implementation pattern is:
399399
Resources
400400
=========
401401

402-
* http://www.python.org/download/mac/
402+
* https://www.python.org/downloads/macos/
403403

404-
* http://www.python.org/community/sigs/current/pythonmac-sig/
404+
* https://www.python.org/community/sigs/current/pythonmac-sig/
405405

406406
* https://devguide.python.org/

Modules/_cursesmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
3636
A number of SysV or ncurses functions don't have wrappers yet; if you
3737
need a given function, add it and send a patch. See
38-
http://www.python.org/dev/patches/ for instructions on how to submit
38+
https://www.python.org/dev/patches/ for instructions on how to submit
3939
patches to Python.
4040
4141
Here's a list of currently unsupported functions:

Modules/_elementtree.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*--------------------------------------------------------------------
22
* Licensed to PSF under a Contributor Agreement.
3-
* See http://www.python.org/psf/license for licensing details.
3+
* See https://www.python.org/psf/license for licensing details.
44
*
55
* _elementtree - C accelerator for xml.etree.ElementTree
66
* Copyright (c) 1999-2009 by Secret Labs AB. All rights reserved.

Modules/_winapi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*/
3333

3434
/* Licensed to PSF under a Contributor Agreement. */
35-
/* See http://www.python.org/2.4/license for licensing details. */
35+
/* See https://www.python.org/2.4/license for licensing details. */
3636

3737
#include "Python.h"
3838
#include "pycore_moduleobject.h" // _PyModule_GetState()

Modules/gc_weakref.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ soon as we execute Python code, threads other than the gc thread can run
4747
too, and they can do ordinary things with weakrefs that end up resurrecting
4848
CT while gc is running.
4949

50-
http://www.python.org/sf/1055820
50+
https://www.python.org/sf/1055820
5151

5252
shows how innocent it can be, and also how nasty. Variants of the three
5353
focussed test cases attached to that bug report are now part of Python's

Parser/tokenizer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ ensure_utf8(char *line, struct tok_state *tok)
545545
"Non-UTF-8 code starting with '\\x%.2x' "
546546
"in file %U on line %i, "
547547
"but no encoding declared; "
548-
"see http://python.org/dev/peps/pep-0263/ for details",
548+
"see https://python.org/dev/peps/pep-0263/ for details",
549549
badchar, tok->filename, tok->lineno + 1);
550550
return 0;
551551
}

Tools/freeze/README

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,4 @@ module ...: Additional Python modules (referenced by pathname)
293293

294294

295295

296-
--Guido van Rossum (home page: http://www.python.org/~guido/)
296+
--Guido van Rossum (home page: https://www.python.org/~guido/)

Tools/i18n/pygettext.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
pygettext searches only for _() by default, but see the -k/--keyword flag
5353
below for how to augment this.
5454
55-
[1] http://www.python.org/workshops/1997-10/proceedings/loewis.html
56-
[2] http://www.gnu.org/software/gettext/gettext.html
55+
[1] https://www.python.org/workshops/1997-10/proceedings/loewis.html
56+
[2] https://www.gnu.org/software/gettext/gettext.html
5757
5858
NOTE: pygettext attempts to be option and feature compatible with GNU
5959
xgettext where ever possible. However some options are still missing or are

Tools/msi/README.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ The following properties may be passed when building these projects.
167167
by providing a unique URI for this property. It does not need to be an
168168
active internet address. Defaults to $(ComputerName).
169169

170-
Official releases use http://www.python.org/(architecture name)
170+
Official releases use https://www.python.org/(architecture name)
171171

172172
/p:DownloadUrlBase=(any URI)
173173
Specifies the base of a URL where missing parts of the installer layout

Tools/msi/buildrelease.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ rem
1212
rem The following substitutions will be applied to the release URI:
1313
rem Variable Description Example
1414
rem {arch} architecture amd64, win32
15-
set RELEASE_URI=http://www.python.org/{arch}
15+
set RELEASE_URI=https://www.python.org/{arch}
1616

1717
rem This is the URL that will be used to download installation files.
1818
rem The files available from the default URL *will* conflict with your

Tools/msi/bundle/bundle.wxs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Version="$(var.Version)"
88
IconSourceFile="..\..\..\PC\icons\setup.ico"
99
Manufacturer="!(loc.Manufacturer)"
10-
AboutUrl="http://www.python.org/"
10+
AboutUrl="https://www.python.org/"
1111
Compressed="no"
1212
dep:ProviderKey="CPython-$(var.MajorVersionNumber).$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
1313
<BootstrapperApplication Id="PythonBA" SourceFile="$(var.BootstrapApp)">

Tools/msi/common_en-US.wxl_template

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
<String Id="NoDowngrade">A newer version of !(loc.ProductName) is already installed.</String>
1515
<String Id="IncorrectCore">An incorrect version of a prerequisite package is installed. Please uninstall any other versions of !(loc.ProductName) and try installing this again.</String>
1616
<String Id="NoTargetDir">The TARGETDIR variable must be provided when invoking this installer.</String>
17-
<String Id="ManufacturerSupportUrl">http://www.python.org/</String>
17+
<String Id="ManufacturerSupportUrl">https://www.python.org/</String>
1818
</WixLocalization>

Tools/msi/exe/exe_en-US.wxl_template

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
<String Id="ShortDescriptor">executable</String>
55
<String Id="ShortcutName">Python {{ShortVersion}} ({{Bitness}})</String>
66
<String Id="ShortcutDescription">Launches the !(loc.ProductName) interpreter.</String>
7-
<String Id="SupportUrl">http://www.python.org/</String>
7+
<String Id="SupportUrl">https://www.python.org/</String>
88
</WixLocalization>

Tools/msi/msi.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
that intend to bundle Python should rebuild these modules with their
2929
own URI to avoid conflicting with the official releases.
3030
31-
The official releases use "http://www.python.org/$(ArchName)"
31+
The official releases use "https://www.python.org/$(ArchName)"
3232
3333
This is not the same as the DownloadUrl property used in the bundle
3434
projects.

0 commit comments

Comments
 (0)