Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-103484: Fix redirected permanently URLs #104001

Merged
merged 5 commits into from May 2, 2023

Conversation

rffontenelle
Copy link
Contributor

@rffontenelle rffontenelle commented Apr 30, 2023

This is another patch required to fix the current state of make linkcheck in Python Docs.

This pull request fixes occurrences of "redirected permanently" as reported by make linkcheck. The last one is "redirected with Found", which I plan to present after this one.

See the full output containing redirected permanently.

Note on backporting to 3.11:

  • The changes in 'main' to Doc/library/importlib.metadata.rst will fail because there is no change to apply to '3.11'
  • Need to apply changes (http->https and domain) to apiref.rst, examples.rst and setupscript.rst at Doc/distutils/

I collapsed the contents of this message to reduce the size of the original message and make easier to reach the comments.

Content no longer available

library/hashlib.rst:737: [redirected permanently] https://131002.net/blake/ to https://www.aumasson.jp/
whatsnew/3.5.rst:2214: [redirected permanently] https://www.visualstudio.com/ to https://visualstudio.microsoft.com/
whatsnew/2.4.rst:758: [redirected permanently] https://developer.gnome.org/glib/stable/ to https://docs.gtk.org/glib/
whatsnew/3.3.rst:1894: [redirected permanently] https://oss.oracle.com/projects/rds/ to https://oss.oracle.com:443/

I used wayback machine because the current website is not available anymore, or its current content does not reflect the contents from that time (e.g. visual studio was meant to be version 2015, which surely is different from today's).

Redirecting to new domain

faq/extending.rst:44: [redirected permanently] https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ to https://www.csse.canterbury.ac.nz/greg.ewing/python/Pyrex/
license.rst:22: [redirected permanently] https://www.zope.org/ to https://www.zope.dev/
library/zipfile.rst:132: [redirected permanently] http://www.info-zip.org/ to https://infozip.sourceforge.net/
using/mac.rst:62: [redirected permanently] https://macvim-dev.github.io/macvim/ to https://macvim.org/macvim/
library/unittest.mock-examples.rst:1074: [redirected permanently] https://twistedmatrix.com/documents/11.0.0/api/twisted.python.components.html to https://twisted.org/documents/11.0.0/api/twisted.python.components.html
whatsnew/2.6.rst:1436: [redirected permanently] https://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.2 to https://conservatory.scheme.org/schemers/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.2
library/ssl.rst:1722: [redirected permanently] https://vincent.bernat.im/en/blog/2011-ssl-perfect-forward-secrecy to https://vincent.bernat.ch/en/blog/2011-ssl-perfect-forward-secrecy

Simply updated the domain.

http to https

faq/programming.rst:64: [redirected permanently] http://mypy-lang.org/ to https://mypy-lang.org/
whatsnew/2.1.rst:611: [redirected permanently] http://pyunit.sourceforge.net/ to https://pyunit.sourceforge.net/
whatsnew/changelog.rst:38796: [redirected permanently] http://www.python.org/ to https://www.python.org/
whatsnew/2.6.rst:2366: [redirected permanently] http://tipc.sourceforge.net/ to https://tipc.sourceforge.net/
whatsnew/3.5.rst:425: [redirected permanently] http://mypy-lang.org to https://mypy-lang.org/
whatsnew/2.3.rst:1334: [redirected permanently] http://idlefork.sourceforge.net to https://idlefork.sourceforge.net/
whatsnew/2.0.rst:935: [redirected permanently] http://pyxml.sourceforge.net/topics/howto/xml-howto.html to https://pyxml.sourceforge.net/topics/howto/xml-howto.html

"http://www.python.org": kept as is and added to allowed redirects because its use was intentional in the doc (Misc/NEWS.d/3.5.0a1.rst)

The rest of them I simply replaced with the redirect.

Subdomain changed (www, ww2, man)

library/hashlib.rst:340: [redirected permanently] https://blake2.net to https://www.blake2.net/
library/unittest.rst:71: [redirected permanently] https://jenkins.io/ to https://www.jenkins.io/
library/statistics.rst:24: [redirected permanently] https://www.scipy.org/ to https://scipy.org/
reference/introduction.rst:72: [redirected permanently] https://pypy.org/ to https://www.pypy.org/
whatsnew/3.11.rst:219: [redirected permanently] https://python.org to https://www.python.org/
library/xmlrpc.client.rst:166: [redirected permanently] https://www.tldp.org/HOWTO/XML-RPC-HOWTO/index.html to https://tldp.org/HOWTO/XML-RPC-HOWTO/index.html
reference/datamodel.rst:1564: [redirected permanently] http://www.ocert.org/advisories/ocert-2011-003.html to http://ocert.org/advisories/ocert-2011-003.html
whatsnew/2.2.rst:634: [redirected permanently] https://www.cs.arizona.edu/icon/ to https://www2.cs.arizona.edu/icon/
library/os.rst:4594: [redirected permanently] https://www.freebsd.org/cgi/man.cgi?time(3) to https://man.freebsd.org/cgi/man.cgi?time(3)
library/resource.rst:243: [redirected permanently] https://www.freebsd.org/cgi/man.cgi?query=tuning&sektion=7 to https://man.freebsd.org/cgi/man.cgi?query=tuning&sektion=7
library/select.rst:508: [redirected permanently] https://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2 to https://man.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2

Simply replaced with the redirect.

App name changed

whatsnew/changelog.rst:27868: [redirected permanently] https://github.com/python/performance to https://github.com/python/pyperformance
library/importlib.metadata.rst:176: [redirected permanently] https://pypi.org/project/backports.entry_points_selectable to https://pypi.org/project/backports.entry-points-selectable/
whatsnew/3.11.rst:2491: [redirected permanently] https://github.com/python/pythoncapi_compat to https://github.com/python/pythoncapi-compat

Simply replaced with the redirect.

Microsoft redirecting to learn.microsoft.com

library/asyncio-eventloop.rst:1716: [redirected permanently] https://docs.microsoft.com/en-ca/windows/desktop/FileIO/i-o-completion-ports to https://learn.microsoft.com/en-ca/windows/win32/fileio/i-o-completion-ports
library/msilib.rst:131: [redirected permanently] https://msdn.microsoft.com/en-us/library/bb432265.aspx to https://learn.microsoft.com/en-us/windows/win32/api/fci/nf-fci-fcicreate?redirectedfrom=MSDN
library/venv.rst:93: [redirected permanently] https://go.microsoft.com/fwlink/?LinkID=135170 to https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3

The above lines are just examples. The output file shows several occurrences of these three redirects. I felt it would be better to use allowed redirect instead of replacing it for both reducing the commit lines and to keep history.

Redirecting to English version

faq/general.rst:337: [redirected permanently] https://www.redhat.com to https://www.redhat.com/en
whatsnew/3.11.rst:76: [redirected permanently] https://toml.io/ to https://toml.io/en/
These websites' well-known URLs redirect to their English versions. I added allowed redirect because felt using the URL without language looks cleaner.

Redirecting to proper landing page

faq/general.rst:36: [redirected permanently] https://www.python.org/psf/ to https://www.python.org/psf-landing/
faq/general.rst:57: [redirected permanently] https://www.python.org/psf/license/ to https://docs.python.org/3/license.html
howto/perf_profiling.rst:11: [redirected permanently] https://perf.wiki.kernel.org to https://perf.wiki.kernel.org/index.php/Main_Page
library/asyncio-eventloop.rst:532: [redirected permanently] https://tools.ietf.org/html/rfc6555 to https://datatracker.ietf.org/doc/html/rfc6555
library/http.client.rst:356: [redirected permanently] https://tools.ietf.org/html/rfc7231#section-4.3.6 to https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.6
library/struct.rst:173: [redirected permanently] https://tools.ietf.org/html/rfc1700 to https://datatracker.ietf.org/doc/html/rfc1700
library/sqlite3.rst:47: [redirected permanently] https://www.sqlite.org to https://www.sqlite.org/index.html
IETF URLs: I changed to the new one, as Tools website was decommissioned (as per authors.ietf.org, redirected from tools.ietf.org)

PSF License: I replaced with the redirected link and updated the text, there is no PSF license page linking to the full text of the license — it all goes to license page in Python's documentation

The rest of them I included to the allowed redirects because I felt they seemed better as they are now.

Redirecting to new structure in the website

faq/extending.rst:50: [redirected permanently] https://www.boost.org/libs/python/doc/index.html to https://www.boost.org/doc/libs/1_82_0/libs/python/doc/html/index.html
faq/general.rst:215: [redirected permanently] https://mail.python.org/mailman/listinfo/python-announce-list to https://mail.python.org/mailman3/lists/python-announce-list.python.org/
faq/general.rst:354: [redirected permanently] https://mail.python.org/mailman/listinfo/python-dev/ to https://mail.python.org/mailman3/lists/python-dev.python.org/
faq/windows.rst:283: [redirected permanently] https://support.microsoft.com/en-us/help/3118401/ to https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-322bf30f-4735-bb94-3949-49f5c49f4732
howto/functional.rst:1210: [redirected permanently] https://mitpress.mit.edu/sicp to https://mitpress.mit.edu/9780262510875/structure-and-interpretation-of-computer-programs/
library/hashlib.rst:621: [redirected permanently] https://csrc.nist.gov/publications/detail/sp/800-106/final to https://csrc.nist.gov/publications/detail/sp/800-106/archive/2009-02-25
whatsnew/3.8.rst:2228: [redirected permanently] https://www.python.org/downloads/mac-osx/ to https://www.python.org/downloads/macos/
whatsnew/3.2.rst:786: [redirected permanently] https://code.activestate.com/recipes/498245 to https://code.activestate.com:443/recipes/498245/
library/sys.rst:788: [redirected permanently] https://code.activestate.com/recipes/577504 to https://code.activestate.com:443/recipes/577504/
whatsnew/3.2.rst:786: [redirected permanently] https://code.activestate.com/recipes/577479 to https://code.activestate.com:443/recipes/577479/
using/windows.rst:545: [redirected permanently] https://www.activestate.com/activepython/ to https://www.activestate.com/products/python/
whatsnew/3.2.rst:2601: [redirected permanently] https://www.activestate.com/activetcl/downloads to https://www.activestate.com/products/tcl/
library/plistlib.rst:49: [redirected permanently] https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/PropertyLists/ to https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/PropertyLists/
using/windows.rst:549: [redirected permanently] https://www.anaconda.com/download/ to https://www.anaconda.com/products/distribution

boost: added to allowed redirect because the URL is used without mentioning specific version, so linking to boost 1.82 could not be as expected by the author. There is no "latest" URL -- I mean, it exists but redirects to the latest released version, 1.82 as of this PR.

support.microsoft.com: added to allowed redirect because it seems cleaner and more future proof than the redirected URL.

SICP: added to allowed redirect because the URL is not a hyperlink with other text, so replacing the redirected URL would look weird and huge.

activestate recipes: adding '/' to the end of the URL solved the redirect reported.

activetcl: The text refers to a specific old version, so I used wayback machine.

The rest of them I replaced with the redirect.

Doc/license.rst Outdated Show resolved Hide resolved
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Doc/conf.py Outdated Show resolved Hide resolved
Doc/conf.py Outdated Show resolved Hide resolved
Doc/library/importlib.metadata.rst Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@arhadthedev arhadthedev added the docs Documentation in the Doc dir label Apr 30, 2023
Doc/whatsnew/3.5.rst Outdated Show resolved Hide resolved
rffontenelle and others added 3 commits April 30, 2023 08:27
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
@rffontenelle
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@hugovk: please review the changes made to this pull request.

@hugovk hugovk merged commit 68ed2a2 into python:main May 2, 2023
19 of 22 checks passed
@hugovk
Copy link
Member

hugovk commented May 2, 2023

@rffontenelle Thanks again! Please could you create the 3.11 backport PR?

rffontenelle added a commit to rffontenelle/cpython that referenced this pull request May 2, 2023
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
(cherry picked from commit 68ed2a2)
@bedevere-bot
Copy link

GH-104088 is a backport of this pull request to the 3.11 branch.

@rffontenelle rffontenelle deleted the fix-redirected-permanently branch May 2, 2023 11:34
hugovk pushed a commit that referenced this pull request May 2, 2023
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Fix redirected permanently URLs (#104001)
carljm added a commit to carljm/cpython that referenced this pull request May 2, 2023
* main:
  pythongh-103822: [Calendar] change return value to enum for day and month APIs (pythonGH-103827)
  pythongh-65022: Fix description of tuple return value in copyreg (python#103892)
  pythonGH-103525: Improve exception message from `pathlib.PurePath()` (pythonGH-103526)
  pythongh-84436: Add integration C API tests for immortal objects (pythongh-103962)
  pythongh-103743: Add PyUnstable_Object_GC_NewWithExtraData (pythonGH-103744)
  pythongh-102997: Update Windows installer to SQLite 3.41.2. (python#102999)
  pythonGH-103484: Fix redirected permanently URLs (python#104001)
  Improve assert_type phrasing (python#104081)
  pythongh-102997: Update macOS installer to SQLite 3.41.2. (pythonGH-102998)
  pythonGH-103472: close response in HTTPConnection._tunnel (python#103473)
  pythongh-88496: IDLE - fix another test on macOS (python#104075)
  pythongh-94673: Hide Objects in PyTypeObject Behind Accessors (pythongh-104074)
  pythongh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter (pythongh-104072)
  pythongh-104016: Skip test for deeply neste f-strings on wasi (python#104071)
carljm added a commit to carljm/cpython that referenced this pull request May 2, 2023
* main: (760 commits)
  pythonGH-104102: Optimize `pathlib.Path.glob()` handling of `../` pattern segments (pythonGH-104103)
  pythonGH-104104: Optimize `pathlib.Path.glob()` by avoiding repeated calls to `os.path.normcase()` (pythonGH-104105)
  pythongh-103822: [Calendar] change return value to enum for day and month APIs (pythonGH-103827)
  pythongh-65022: Fix description of tuple return value in copyreg (python#103892)
  pythonGH-103525: Improve exception message from `pathlib.PurePath()` (pythonGH-103526)
  pythongh-84436: Add integration C API tests for immortal objects (pythongh-103962)
  pythongh-103743: Add PyUnstable_Object_GC_NewWithExtraData (pythonGH-103744)
  pythongh-102997: Update Windows installer to SQLite 3.41.2. (python#102999)
  pythonGH-103484: Fix redirected permanently URLs (python#104001)
  Improve assert_type phrasing (python#104081)
  pythongh-102997: Update macOS installer to SQLite 3.41.2. (pythonGH-102998)
  pythonGH-103472: close response in HTTPConnection._tunnel (python#103473)
  pythongh-88496: IDLE - fix another test on macOS (python#104075)
  pythongh-94673: Hide Objects in PyTypeObject Behind Accessors (pythongh-104074)
  pythongh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter (pythongh-104072)
  pythongh-104016: Skip test for deeply neste f-strings on wasi (python#104071)
  pythongh-104057: Fix direct invocation of test_super (python#104064)
  pythongh-87092: Expose assembler to unit tests (python#103988)
  pythongh-97696: asyncio eager tasks factory (python#102853)
  pythongh-84436: Immortalize in _PyStructSequence_InitBuiltinWithFlags() (pythongh-104054)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants