Skip to content

Commit

Permalink
install_test_requirements
Browse files Browse the repository at this point in the history
Adding install_test_requirements
  • Loading branch information
ampledata committed Dec 26, 2024
1 parent e103cbd commit 8260ae2
Show file tree
Hide file tree
Showing 8 changed files with 939 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: sudo bash debian/install_pkg_build_deps.sh

- name: Create Debian Package
run: make clean package
run: make clean install_test_requirements package

- name: Upload Artifacts to GitHub
uses: actions/upload-artifact@master
Expand Down
1 change: 1 addition & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pytest-cov
pylint
flake8
black
pytak
36 changes: 36 additions & 0 deletions t/0001-Don-t-create-default-SSLContext-if-CA-bundle-isn-t-p.patch
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 added t/python-requests-2.32.3-3.fc41.src.rpm
Binary file not shown.
Loading

0 comments on commit 8260ae2

Please sign in to comment.