Repository navigation
v3.40.0
Reminder
Older Python versions are supported for 3 years after being obsoleted by a new major release. As Python 3.13 was
released on 7 October 2024, the codebase will be streamlined by removing support for Python 3.12 on or after 7
October 2027.
⚠ Upgrade Notes
- HTML reports: Markdown tables are now shown as tables whenever they can be reconstructed;
markdown_tables: false
restores the previous look (see https://webchanges.readthedocs.io/en/stable/jobs.html#markdown-tables). job_defaults: A misspelled directive or a wrong value now stops the run with an error naming it.html2textfilter: A misspelled sub-directive (e.g.pad_table) or a method given as one (e.g.
strip_tags: true) now fails the job instead of being ignored.- HTTPS:
httpx2, the new default HTTP client, checks certificates against the operating system's store instead of
certifi's; on a certificate error, setSSL_CERT_FILE. wdiffdiffer: Whitespace-only changes are no longer reported.http_client: curl_cffi: Now correctly sends the impersonated browser'sUser-Agent; some sites may report one
change.
Added
unifieddiffer: Newignore_whitespacesub-directive, to not report changes of whitespace only, such as one
space becoming two. See https://webchanges.readthedocs.io/en/stable/differs.html#ignore-whitespace. Recommended as a
default inconfig.yamlif you use an HTML reporter, as HTML does not show consecutive spaces.- Sample Dockerfile (
docker/Dockerfile,compose.yaml), tested in CI. See https://webchanges.readthedocs.io/en/stable/advanced.html#docker-sample. ai_googlediffer:diffsub-directive, choosing the differ of the diff shown after the summary (default
unified). See https://webchanges.readthedocs.io/en/stable/differs.html#ai-google-diff.
Changed
- Default HTTP client:
httpx2 <https://github.com/pydantic/httpx2>__, the maintained successor ofhttpx, then
httpx,requestsandcurl_cffi;http_client: httpxis an alias ofhttpx2. - HTML reports: Markdown tables are rendered as tables, also in
unifiedandwdiffdiffs. See
https://webchanges.readthedocs.io/en/stable/jobs.html#markdown-tables. wdiffdiffer: Works asgit diff --word-diff: 550 times faster on a 75 KB page, no matches across distant
lines, a rewritten phrase shown as one change. See https://webchanges.readthedocs.io/en/stable/differs.html#wdiff-diff.- Configuration and jobs file errors, and wrong filter, differ or reporter settings, are shown without a traceback.
- Wrong job directive values, also a
headersthat is not a mapping, are reported when the jobs file is loaded. xmppreporter: Works again, withslixmppinstead of the deadaioxmpp; one connection per report.- HTML reports: Images in Markdown content are at most 600 pixels wide.
Deprecated
ai_googlediffer:unifiedsub-directive, replaced bydiff: {name: unified, ...}. Still works, with a
warning.
Fixed
- Browser jobs with
data: MissingContent-Type, and strings were percent-encoded. - Browser jobs with
cookies: Now set for the hosts ofurlandinitialization_urlonly, and are also set
withconnect_over_cdp(were ignored). See https://webchanges.readthedocs.io/en/stable/jobs.html#cookies. - Installation: The JSON Schemas used by editors were not copied next to
config.yamlandjobs.yaml. - Markdown reporters (
telegram,matrix,gotify,github_issue;webhook/discordwith
markdown: true): A new job's first report and--testshowed a diff against nothing, and diff headers were
garbled. http_client: curl_cffi: Sent webchanges' ownUser-Agent(contradicting its TLS fingerprint), and no
cookiestourlafter aninitialization_urlon another host.- Browser jobs: Network errors (e.g.
net::ERR_TIMED_OUT) were not recognized, soignore_timeout_errorsand
ignore_too_many_redirectshad no effect; they are now reported by name. initialization_url: A landing URL with several;parameters failed with "did not find key".- Browser jobs:
wait_until: networkidle0ornetworkidle2failed validation; they work again, with a warning. - Browser jobs:
initialization_jsfailed with a dictwait_for_url. browserreporter: Not written in UTF-8, garbling characters such as€on Windows in Python <3.15.- Bundled JSON Schemas: False errors (e.g. files missing directives,
_remarks,wdiff'scolor) and missed
typos (sub-directives of sections, reporters andhtml2text). wdiffdiffer: Long data showed only@@withcolor: false; HTML reports garbled Markdown lists and
headings.- Minor:
github_issue's numericmilestonefailed validation;--featuresdescriptions; clearer errors
forai_googleretries and an invalidreofkeep_lines_containing/delete_lines_containing.
Internals impacting hooks.py
- Import
httpx2instead ofhttpx(same API); the two packages' classes don't mix. - Wrong settings raise
webchanges.util.SettingError(aValueError), which custom filters, differs and
reporters can raise too; catchValueErrorinstead ofTypeError,RuntimeErrororre.error. UrlJobBase.get_headers()no longer adds aCookieheader (noinclude_cookies): useget_cookies().- A duplicate
job_defaultskey raisesValueError(wasKeyError).
Internals
- The vendored fallback
Headersclass is nowhttpx2v2.16.0's (washttpxv0.28.1's).