-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding install_test_requirements
- Loading branch information
Showing
8 changed files
with
939 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ pytest-cov | |
pylint | ||
flake8 | ||
black | ||
pytak |
36 changes: 36 additions & 0 deletions
36
t/0001-Don-t-create-default-SSLContext-if-CA-bundle-isn-t-p.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From 08e863f94fe93b4b3bd2e8267234be7a23350b1d Mon Sep 17 00:00:00 2001 | ||
From: Adam Williamson <[email protected]> | ||
Date: Thu, 1 Aug 2024 12:58:38 -0700 | ||
Subject: [PATCH] Don't create default SSLContext if CA bundle isn't present | ||
|
||
Similar to e18879932287c2bf4bcee4ddf6ccb8a69b6fc656 , this also | ||
skips creation of the default SSLContext on FileNotFoundError, | ||
which is raised if DEFAULT_CA_BUNDLE_PATH does not exist. | ||
|
||
See: https://bugzilla.redhat.com/show_bug.cgi?id=2297632 | ||
|
||
Signed-off-by: Adam Williamson <[email protected]> | ||
--- | ||
src/requests/adapters.py | 5 +++-- | ||
1 file changed, 3 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/requests/adapters.py b/src/requests/adapters.py | ||
index 9a58b160..fb151a95 100644 | ||
--- a/src/requests/adapters.py | ||
+++ b/src/requests/adapters.py | ||
@@ -81,9 +81,10 @@ try: | ||
_preloaded_ssl_context.load_verify_locations( | ||
extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH) | ||
) | ||
-except ImportError: | ||
+except (ImportError, FileNotFoundError): | ||
# Bypass default SSLContext creation when Python | ||
- # interpreter isn't built with the ssl module. | ||
+ # interpreter isn't built with the ssl module, or | ||
+ # DEFAULT_CA_BUNDLE_PATH isn't present | ||
_preloaded_ssl_context = None | ||
|
||
|
||
-- | ||
2.45.2 | ||
|
Binary file not shown.
Oops, something went wrong.