From 622e740c0e16c0b4e8a9833fe48a7ccc6034e994 Mon Sep 17 00:00:00 2001 From: Ludovic LANGE Date: Fri, 14 Jun 2024 14:05:26 +0200 Subject: [PATCH] Skip buggy `requests` versions and resolve "certificate verify failed: self-signed certificate in certificate chain" error `requests` versions 2.32.0 to 2.32.3 (included) are affected by a bug breaking the ability to specify custom SSLContexts in sub-classes of HTTPAdapter (https://github.com/psf/requests/issues/6715) and another breaking the ability to load certificates with HTTPAdapters (https://github.com/psf/requests/issues/6730) We skip those versions (and hope that 2.32.4 will provide a fix for https://github.com/psf/requests/issues/6730) Cf #706 --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b407c08da..5a01ccd62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,10 @@ classifiers = [ requires-python = ">=3.7" dependencies = [ "lxml", - "requests >= 2.0.0", + # `requests` versions 2.32.0, 2.32.1, and 2.32.2 are affected by a bug breaking the ability to specify + # custom SSLContexts in sub-classes of HTTPAdapter (https://github.com/psf/requests/issues/6715) and another + # breaking the ability to load certificates with HTTPAdapters (https://github.com/psf/requests/issues/6730) + "requests >= 2.0.0, != 2.32.0, != 2.32.1, != 2.32.2, != 2.32.3", "python-dateutil", "PyYAML", "html2text >= 3.200",