The errors were
************* Module linkcheck.ansicolor
linkcheck/ansicolor.py:190:21: E0606: Possibly using variable 'WinColor' before assignment (possibly-used-before-assignment)
************* Module linkcheck.plugins.locationinfo
linkcheck/plugins/locationinfo.py:107:12: E0606: Possibly using variable 'geoip_error' before assignment (possibly-used-before-assignment)
and while it's true that the variables (WinColor, geoip_error) are
assigned conditionally, their use is protected (indirectly) by the same
conditionals.
linkchecker/linkcheck/httputil.py:31: CryptographyDeprecationWarning:
Properties that return a naïve datetime object have been deprecated. Please switch to not_valid_after_utc.
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
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)
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
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)
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.
Default values are defined in LoggerArgs.
When args.get() was first used LoggerArgs did not exist:
3b5e28ff5 ("Improved log end output: print number of duplicate error and warnings", 2008-06-11)
output_encoding is set in _Logger.__init__().
When this line was introduced the base Logger made utf-8 the default:
01c417c3c ("Default output encoding is now utf-8", 2009-02-18)
but that changed to i18n.default_encoding in:
f0b911b60 ("Use codecs module for proper output encoding.", 2010-11-21)
Remove code for old-style classes:
better_exchook2.py:238:62: E1101: Module 'types' has no 'InstanceType' member (no-member)
Command-line equivalent of 9a33c2a65 ("Make requesting login form password work on Python 3", 2020-04-14):
command/setup_config.py:167:36: E1101: Module 'linkcheck.director.console' has no 'encode' member (no-member)
Add missing argument:
plugins/parseword.py:141:31: E1120: No value for argument 'wrange' in function call (no-value-for-parameter)
Hasn't tried to find LinkChecker cacert.pem since:
a9ab4d847 ("Remove get_share_file()", 2021-12-30)
which hasn't been installed since:
e3ab9024 ("Remove platform-specific installer stuff and ensure a build .whl wheel file can be built.", 2016-01-17)
In Python 2 StringIO could accept either Unicode or 8-bit strings.
Similar change made for HttpUrl:
06fdd78f9 ("Python3: fix TypeError in HttpUrl.read_content()",
2019-09-15)
Non-existent FtpUrl.max_size introduced in:
7b34be590 ("Introduce check plugins, use Python requests for http/s
connections, and some code cleanups and improvements.", 2014-03-01)
Additional self.direct() not added in:
f107092a8 ("Fix handling of user/password info in URLs.", 2012-06-10)