Commit graph

7125 commits

Author SHA1 Message Date
Chris Mayo
64e5cc1083
Merge pull request #799 from cjmayo/ignoreerrors
Remove space from ignoreerrors example in linkcheckerrc
2024-02-26 19:22:36 +00:00
Chris Mayo
907d97755c Remove space from ignoreerrors example in linkcheckerrc
Was not matching "Error: SSLError: ...".
2024-02-15 19:33:47 +00:00
Chris Mayo
156f987ac6
Merge pull request #798 from cjmayo/advertencia
Fix Spanish translation of warning
2024-02-13 19:49:36 +00:00
Chris Mayo
ed31e097ab Fix Spanish translation of warning 2024-02-13 19:46:42 +00:00
nodet
28f6743778
Add ignorewarningsforurls to ignore specific warnings (#794)
We want to allow specifying a warning to ignore for
each URL. If no regex is specified for the warning to ignore,
we'll ignore all warnings.

The tests still pass as they are, which means that unknown
values in the configuration file are simply ignored.

* [#782] Add values to configuration file

* [#782] Parse new configuration values

* [#782] Actually ignore a warning

* [#782] Confirm side cases work as expected

* [#782] Add logging when deciding to ignore warnings

* [#782] Documentation for ignorewarningsforurls

* [#782] Update (generated) man pages

* [#782] These tests pass without network, actually

* [#782] Fix copy/paste error in symbol naming

* [#782] The regex matches the name of the warning, not the message

* [#782] Better wording

* [#782] Update (generated) man pages

* [#782] We match the type, not the message
2024-02-13 19:43:29 +00:00
Chris Mayo
12e47c9877
Merge pull request #780 from cjmayo/no-sigstore
Stop generating Sigstore signatures on release
2023-12-11 19:46:50 +00:00
Chris Mayo
0a5a615c5d Stop generating Sigstore signatures on release
Failing to complete.
2023-12-11 19:44:17 +00:00
Chris Mayo
08e6ef91d9
Merge pull request #777 from cjmayo/rel104
Release 10.4.0
2023-12-11 19:33:11 +00:00
Chris Mayo
829dae8652
Merge pull request #779 from cjmayo/docker312
Update Docker image to Python 3.12
2023-12-11 19:32:22 +00:00
Chris Mayo
b372116cbe
Merge pull request #776 from cjmayo/man-updates
Update man pages and translation catalogs
2023-12-11 19:28:05 +00:00
Chris Mayo
cc1054c568 Update Docker image to Python 3.12 2023-12-11 19:26:59 +00:00
Chris Mayo
10adf4c8a1 Documentation for release 10.4.0 2023-12-04 19:25:01 +00:00
Chris Mayo
042aa2c915 Update IANA schemes 2023-12-04 19:25:01 +00:00
Chris Mayo
f64dd7b06e Fix SslCertificateCheck.__init__() docstring 2023-12-04 19:25:01 +00:00
LinkChecker
ad2168f242 Update application translation catalogs 2023-12-04 19:24:38 +00:00
LinkChecker
1578393a14 Update man pages 2023-12-04 19:24:38 +00:00
LinkChecker
6df0338e39 Update doc translation catalogs 2023-12-04 19:24:25 +00:00
Chris Mayo
268799ee0f
Merge pull request #770 from cjmayo/py39 2023-12-04 19:22:05 +00:00
Chris Mayo
33b21e4bcd Avoid deprecated use of floats with ngettext
tests/test_cgi.py::TestWsgi::test_application
  linkcheck/strformat.py:190: DeprecationWarning: Plural value must be an integer, got float
    time_str.append(_n(single, plural, unit) % unit)
2023-11-27 19:22:08 +00:00
Chris Mayo
f390b7da33 Replace deprecated importlib.resources.path() 2023-11-27 19:22:08 +00:00
Chris Mayo
284969e7bb Raise minimum Python version to 3.9 2023-11-27 19:22:08 +00:00
Chris Mayo
d13ef0448b
Merge pull request #774 from cjmayo/gh-action-sigstore-python-2.1.0
Update gh-action-sigstore-python to v2.1.0
2023-11-13 19:27:05 +00:00
Chris Mayo
18b837188f
Merge pull request #773 from cjmayo/cryptography
Use cryptography to generate certificate in TestHttps
2023-11-13 19:26:43 +00:00
Chris Mayo
5fafcea359
Merge pull request #771 from cjmayo/cookiefile
Fix setting config["cookiefile"] regardless of checks
2023-11-13 19:26:21 +00:00
Chris Mayo
ac8495cb18 Add tests for missing and empty FILENAMEs 2023-11-13 19:22:12 +00:00
Chris Mayo
73b099ad4c Exit if FILENAME does not exist or is not readable 2023-11-13 19:22:12 +00:00
Chris Mayo
7a3be9ba93 Avoid FileNotFoundError if FILENAME does not exist
File ".../linkcheck/fileutil.py", line 110, in is_valid_config_source
    return os.path.isfile(filename) or stat.S_ISFIFO(os.stat(filename).st_mode)
                                                     ^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
2023-11-13 19:22:12 +00:00
Chris Mayo
eeee80ec4f Check cookie file has entries 2023-11-13 19:22:12 +00:00
Chris Mayo
2e8cd48f3c Catch exception if cookie file could not be parsed 2023-11-13 19:22:12 +00:00
Chris Mayo
82a38e6bd0 Check cookie file exists 2023-11-13 19:22:12 +00:00
Chris Mayo
db30833511 Fix setting config["cookiefile"] regardless of check
config["cookiefile"] is set correctly later on in setup_config().

Not working since check added in:
7b34be590 ("Introduce check plugins, use Python requests for http/s
connections, and some code cleanups and improvements.", 2014-03-01)
2023-11-13 19:22:12 +00:00
Chris Mayo
fa2bb932e6 Check config file has sections
RawConfigParser does not raise an error if the file is empty.
2023-11-13 19:22:12 +00:00
Chris Mayo
219c17aa63 Use cryptography to generate certificate in TestHttps
Replacing deprecated use of pyOpenSSL.

linkchecker/tests/checker/test_https.py:45: DeprecationWarning: X509Extension support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
   [crypto.X509Extension(b"subjectAltName", False, b"DNS:localhost")])
2023-11-07 19:30:59 +00:00
Chris Mayo
260350abfc Update gh-action-sigstore-python to v2.1.0
Python 3.12 compatibility.
2023-11-06 19:32:09 +00:00
Chris Mayo
f5ba538184
Merge pull request #769 from cjmayo/pyftpdlib
pyftpdlib released with Python 3.12 support
2023-11-06 19:22:39 +00:00
Chris Mayo
b3b3cd5206
Merge pull request #767 from cdown/cdown/2023-10-31/fifo
Allow FIFOs to be used as config files
2023-11-06 19:22:07 +00:00
Chris Mayo
7f50c62b6b
Merge pull request #766 from cjmayo/ms-windows-store
Add ms-windows-store scheme
2023-11-06 19:21:32 +00:00
Chris Mayo
01947910cb pyftpdlib released with Python 3.12 support 2023-11-01 19:26:48 +00:00
Chris Down
85ce9841eb Allow FIFOs to be used as config files
There are some config options which have no equivalent command line
option. Some may want to set these options dynamically or on a one-off
basis where a static config file is not ideal, and one very easy way to
do that is using process substitution:

    linkchecker --config <(printf '%s\n' '[filtering]' 'ignorewarnings=http-redirected') ...

This, however, does not work in the current code because these are
typically implemented as FIFOs, which don't pass the `os.path.isfile`
check:

    WARNING linkcheck.cmdline 2023-10-31 00:12:09,678 MainThread Unreadable config file: '/dev/fd/63'

Allow reading FIFOs as config input so that this is possible.
`fileutil.is_readable` also now doesn't check if the path leads to a
regular file: this is only used as part of cookie and config file input,
and in both cases that's not really relevant.
2023-10-31 00:31:28 +00:00
Chris Mayo
187ded1d9b Add ms-windows-store scheme
https://learn.microsoft.com/en-us/windows/uwp/launch-resume/launch-store-app
2023-10-30 19:23:46 +00:00
Chris Mayo
2cc17a36eb Document updating IANA schemes as a release step 2023-10-30 19:23:46 +00:00
Chris Mayo
8ae3783c3f
Merge pull request #764 from cjmayo/replace_cgihandler
Replace deprecated http.server.CGIHTTPRequestHandler for TestLoginUrl
2023-10-30 19:23:10 +00:00
Chris Mayo
c3d0787654 Replace deprecated http.server.CGIHTTPRequestHandler for TestLoginUrl
Scheduled for removal in Python 3.15.
2023-10-16 19:23:43 +01:00
Marius Gedminas
1ffb62a1f0
Merge pull request #763 from linkchecker/py312
Python 3.12 final is out, stop using -dev
2023-10-14 12:43:22 +03:00
Marius Gedminas
287474abfe Python 3.12 final is out, stop using -dev
Fixes the check-python-versions job in CI.
2023-10-14 12:39:20 +03:00
Chris Mayo
227cfed5a5
Merge pull request #761 from cjmayo/fixes
Fix make homepage and release workflow publish step
2023-09-25 19:27:31 +01:00
Chris Mayo
00da28f5bc Document that --verbose overrides --no-warnings 2023-09-25 19:22:19 +01:00
Chris Mayo
0c9b98deb5 Fix release workflow publish step
gh-action-pypi-publish failing on twine check:

 Checking dist/LinkChecker-10.3.0-py3-none-any.whl.crt: ERROR    InvalidDistribution: Unknown distribution format:
         'LinkChecker-10.3.0-py3-none-any.whl.crt'
2023-09-25 19:22:19 +01:00
Chris Mayo
d414c4ab1c Rename upload step of release workflow
Sigstore files are uploaded as well as distribution files.
2023-09-25 19:22:19 +01:00
Chris Mayo
40e0628716 Fix make homepage
make -C doc code
make[1]: Entering directory '/var/tmp/linkchecker/doc'
make[1]: *** No rule to make target 'code'.  Stop.

code target was removed in:
c7989eb05 ("Turn all warnings into errors when building website", 2022-11-02)
2023-09-25 19:22:19 +01:00