Closed thwllms closed 6 months ago
Attention: Patch coverage is 80.00000%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 93.68%. Comparing base (
21435b0
) to head (c1a234c
). Report is 20 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
pystac_client/stac_api_io.py | 80.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Updated to include fallback to CURL_CA_BUNDLE
if REQUESTS_CA_BUNDLE
isn't set, following the pattern in requests
.
https://github.com/psf/requests/blob/2a438c27b5a5828c8ea0dc958112eecffca70b12/src/requests/sessions.py#L767
@thwllms thanks for the PR! When reviewing, it felt like we should try to use requests's environment lookup if possible. I've opened #669 with an alternate solution, let me know what you think.
Ah, I totally missed merge_environment_settings
when I was going through the docs! I like that solution better. 👍
Closing in favor of #669
Related Issue(s):
664
Description: By default, the basic
requests.get
,requests.post
, etc., functions look for an environment variableREQUESTS_CA_BUNDLE
(see docs), which can point to a custom certificate bundle file instead of the default bundle provided withcertifi
. This is common practice in e.g., corporate settings where HTTPS inspection is being performed with SSL certificate replacement, causing HTTPS responses with odd-looking certificates. This PR ensures thatpystac-client
also respects theREQUESTS_CA_BUNDLE
environment variable.PR Checklist: