Skip to content

Reduce requests for example.com from tests#869

Merged
cjmayo merged 2 commits intolinkchecker:masterfrom
cjmayo:github.io
Jul 28, 2025
Merged

Reduce requests for example.com from tests#869
cjmayo merged 2 commits intolinkchecker:masterfrom
cjmayo:github.io

Conversation

@cjmayo
Copy link
Copy Markdown
Contributor

@cjmayo cjmayo commented Jul 24, 2025

example.com, example.net and example.org are meant to be used in documentation and there is no guarantee for their HTTP service. This is leading to CI failures.

There is still some use of these in checker/test_bookmarks.py and checker/test_http_misc.py.

@cjmayo cjmayo force-pushed the github.io branch 6 times, most recently from 8cf8053 to dbe9a2f Compare July 27, 2025 16:42
cjmayo added 2 commits July 28, 2025 19:26
example.com, example.net and example.org are meant to be used in
documentation and there is no guarantee for their HTTP service. This is
leading to CI failures.

There is still some use of these in checker/test_bookmarks.py and
checker/test_http_misc.py.
Identified when http_slash.html "no scheme example" changed to use linkchecker.github.io:

tests/checker/test_http.py::TestHttp::test_html_internet
  /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'linkchecker.github.io'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
    warnings.warn(

Since Requests introduced:
7b34be5 ("Introduce check plugins, use Python requests for http/s connections, and some code cleanups and improvements.", 2014-03-01)
6bae3e0 ("Use the same request arguments for redirects.", 2014-04-23)

The Requests default for verify is True in Session.send() and
Session.resolve_redirects(), and is is recommended to only set it to
False for testing.
@cjmayo cjmayo merged commit 6eb0f7e into linkchecker:master Jul 28, 2025
29 of 31 checks passed
@cjmayo cjmayo deleted the github.io branch July 28, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant