From 145a61b30c2c56f099717cdbfb0757a84dc44570 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 13 Feb 2026 12:36:56 -0800 Subject: [PATCH] Don't accept zstd encoding for conda-forge.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default headers accepting zstd encoding have been regularly causing errors during linkcheck of conda-forge.org with the message "Zstandard data is incomplete". A custom header without zstd (the default before zstd support was added in urllib3 v2)¹ gets around the error. Note: I wasn't able to reproduce the error locally (even after manually installing urllib v2 + zstandard in the development environment), so it is likely specific to the GitHub Actions network connection. ¹ https://urllib3.readthedocs.io/en/2.0.0/changelog.html --- doc/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index d1ad2b36..a9500917 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -129,3 +129,11 @@ 'https://console.aws.amazon.com/ec2/v2/home', ]), ] + +linkcheck_request_headers = { + # conda-forge returns truncated zstd-encoded responses on some networks. + # Ask for a non-zstd encoding instead. + "https://conda-forge.org/": { + "Accept-Encoding": "gzip, deflate", + }, +}