bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124)

This commit is contained in:
Hugo van Kemenade 2022-03-30 14:00:27 +03:00 committed by GitHub
parent d8f530fe32
commit 6881ea936e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 28 additions and 29 deletions

View file

@ -731,10 +731,10 @@ class ServerHTMLDoc(pydoc.HTMLDoc):
url = escape(all).replace('"', '"')
results.append('<a href="%s">%s</a>' % (url, url))
elif rfc:
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
url = 'https://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
results.append('<a href="%s">%s</a>' % (url, escape(all)))
elif pep:
url = 'https://www.python.org/dev/peps/pep-%04d/' % int(pep)
url = 'https://peps.python.org/pep-%04d/' % int(pep)
results.append('<a href="%s">%s</a>' % (url, escape(all)))
elif text[end:end+1] == '(':
results.append(self.namelink(name, methods, funcs, classes))