Skip to content

Commit 8260ae2

Browse files
committed
install_test_requirements
Adding install_test_requirements
1 parent e103cbd commit 8260ae2

8 files changed

+939
-1
lines changed

.github/workflows/debian.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: sudo bash debian/install_pkg_build_deps.sh
2020

2121
- name: Create Debian Package
22-
run: make clean package
22+
run: make clean install_test_requirements package
2323

2424
- name: Upload Artifacts to GitHub
2525
uses: actions/upload-artifact@master

requirements_test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ pytest-cov
33
pylint
44
flake8
55
black
6+
pytak
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From 08e863f94fe93b4b3bd2e8267234be7a23350b1d Mon Sep 17 00:00:00 2001
2+
From: Adam Williamson <[email protected]>
3+
Date: Thu, 1 Aug 2024 12:58:38 -0700
4+
Subject: [PATCH] Don't create default SSLContext if CA bundle isn't present
5+
6+
Similar to e18879932287c2bf4bcee4ddf6ccb8a69b6fc656 , this also
7+
skips creation of the default SSLContext on FileNotFoundError,
8+
which is raised if DEFAULT_CA_BUNDLE_PATH does not exist.
9+
10+
See: https://bugzilla.redhat.com/show_bug.cgi?id=2297632
11+
12+
Signed-off-by: Adam Williamson <[email protected]>
13+
---
14+
src/requests/adapters.py | 5 +++--
15+
1 file changed, 3 insertions(+), 2 deletions(-)
16+
17+
diff --git a/src/requests/adapters.py b/src/requests/adapters.py
18+
index 9a58b160..fb151a95 100644
19+
--- a/src/requests/adapters.py
20+
+++ b/src/requests/adapters.py
21+
@@ -81,9 +81,10 @@ try:
22+
_preloaded_ssl_context.load_verify_locations(
23+
extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
24+
)
25+
-except ImportError:
26+
+except (ImportError, FileNotFoundError):
27+
# Bypass default SSLContext creation when Python
28+
- # interpreter isn't built with the ssl module.
29+
+ # interpreter isn't built with the ssl module, or
30+
+ # DEFAULT_CA_BUNDLE_PATH isn't present
31+
_preloaded_ssl_context = None
32+
33+
34+
--
35+
2.45.2
36+
3.92 MB
Binary file not shown.

0 commit comments

Comments
 (0)