tests: Reduce the number of warnings raised
TODO
-
pytest: - Unknown
pytest.mark.inbound_message
- unused pytest
asyncio_mode
config option
- Unknown
-
Converter 'swhid' is already registered -
Vault & Indexer storage DeprecationWarning
while init using args -
docutils: -
frontend.OptionParser
is deprecated - use
Node.findall
instead ofNode.traverse
-
-
UrlField
's default scheme -> transitional setting + silence warning -
Naive datetime value used for an aware field -
Re-implemented GitLoaderFromDisk
to remove the last dependency to the deprecatedswh.loader.git.from_disk
-
Identifying contents by sha1 instead of hash dicts {"sha1": b"..."}
is deprecated -
test_message method is not a test
Will be fixed elsewhere
-
Commit.extra
is deprecated swh-loader-git!189 (merged) -
The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed. https://bugs.launchpad.net/beautifulsoup/+bug/2076897
Wontfix here
- warnings related to pybadges:
pkg_resources
is deprecated in py3.12 (a pr exists to fix this since June) andimghdr
in py3.13 (needs an external replacement like filetype) - warning related to htmlmin:
cgi
is deprecated and slated for removal in Python 3.13, package is not maintenained anymore, maybe we should switch to its fork https://github.com/wilhelmer/htmlmin or something else (like django-minify-html
Results
Down from 41630 warnings in master to 1185, mostly (1136) due to a deprecation warning fixed in swh-loader-git!189 (merged)
The only change impacting swh-web behavior is setting https the default scheme for UrlFields (hence the change in e2e tests).
Edited by Renaud Boyer