external-systems 0.101.0rc2__py3-none-any.whl → 0.103.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of external-systems might be problematic. Click here for more details.
- external_systems/_version.py +1 -1
- external_systems/sources/_proxies.py +9 -6
- external_systems/sources/_sources.py +1 -1
- {external_systems-0.101.0rc2.dist-info → external_systems-0.103.0.dist-info}/METADATA +1 -1
- {external_systems-0.101.0rc2.dist-info → external_systems-0.103.0.dist-info}/RECORD +7 -7
- {external_systems-0.101.0rc2.dist-info → external_systems-0.103.0.dist-info}/LICENSE.txt +0 -0
- {external_systems-0.101.0rc2.dist-info → external_systems-0.103.0.dist-info}/WHEEL +0 -0
external_systems/_version.py
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
import os
|
|
15
16
|
from functools import cache
|
|
16
17
|
from typing import Any, Mapping, Optional, Union
|
|
17
18
|
|
|
@@ -20,18 +21,20 @@ from requests.adapters import HTTPAdapter
|
|
|
20
21
|
from urllib3.util.retry import Retry
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
class
|
|
24
|
+
class CustomCaBundleSession(Session):
|
|
24
25
|
"""
|
|
25
26
|
A wrapper for requests.Session to override 'verify' property, ignoring REQUESTS_CA_BUNDLE environment variable.
|
|
26
27
|
|
|
27
|
-
This is a workaround for https://github.com/
|
|
28
|
+
This is a workaround for https://github.com/psf/requests/issues/3829 (will be fixed in requests 3.0.0)
|
|
28
29
|
"""
|
|
29
30
|
|
|
30
31
|
def merge_environment_settings(self, url, proxies, stream, verify, *args, **kwargs): # type: ignore[no-untyped-def]
|
|
31
|
-
if isinstance(self.verify, str):
|
|
32
|
+
if isinstance(self.verify, str) and os.path.exists(self.verify):
|
|
32
33
|
verify = self.verify
|
|
33
34
|
|
|
34
|
-
return super(
|
|
35
|
+
return super(CustomCaBundleSession, self).merge_environment_settings(
|
|
36
|
+
url, proxies, stream, verify, *args, **kwargs
|
|
37
|
+
)
|
|
35
38
|
|
|
36
39
|
|
|
37
40
|
class RetryingTimeoutHttpAdapter(HTTPAdapter):
|
|
@@ -97,7 +100,7 @@ def create_proxy_session(proxy_url: str, proxy_token: str) -> Session:
|
|
|
97
100
|
"""
|
|
98
101
|
|
|
99
102
|
adapter = ProxyAdapter(proxy_auth={proxy_url: f"Bearer {proxy_token}"})
|
|
100
|
-
session =
|
|
103
|
+
session = CustomCaBundleSession()
|
|
101
104
|
session.mount("http://", adapter)
|
|
102
105
|
session.mount("https://", adapter)
|
|
103
106
|
session.proxies = {"all": proxy_url}
|
|
@@ -124,7 +127,7 @@ def create_session(
|
|
|
124
127
|
timeout (Optional[Union[float, tuple[float, float], tuple[float, None]]]): Timeout settings for the session.
|
|
125
128
|
"""
|
|
126
129
|
|
|
127
|
-
session =
|
|
130
|
+
session = CustomCaBundleSession()
|
|
128
131
|
|
|
129
132
|
if cert:
|
|
130
133
|
session.cert = cert
|
|
@@ -104,7 +104,7 @@ class Source:
|
|
|
104
104
|
new_ca_contents.append(required_ca)
|
|
105
105
|
|
|
106
106
|
with NamedTemporaryFile(delete=False, mode="w") as ca_bundle_file:
|
|
107
|
-
ca_bundle_file.write(
|
|
107
|
+
ca_bundle_file.write(os.linesep.join(new_ca_contents) + os.linesep)
|
|
108
108
|
return ca_bundle_file.name
|
|
109
109
|
|
|
110
110
|
@cached_property
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
external_systems/__init__.py,sha256=xXDUDD6_qRO-nHuXZx-fXp0R0vc3N_OOsB1F5mF_kpU,651
|
|
2
|
-
external_systems/_version.py,sha256=
|
|
2
|
+
external_systems/_version.py,sha256=jwaVJJ827utqXHAnJanJMiX4nKb1l2z-cy79iB6zks4,749
|
|
3
3
|
external_systems/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
external_systems/sources/__init__.py,sha256=aqXbMIy_pnyIC1uPRzQfApLCbhYB4N8iRFnpOX4RdAk,1156
|
|
5
5
|
external_systems/sources/_api.py,sha256=NV7oNIgzSWz4ROFW8uPpUJjDN5vfFzdTs3yKC37S39k,3262
|
|
6
6
|
external_systems/sources/_connections.py,sha256=h82npEks29NALAAfMHrXcSnB7TY_OLeXgL3QN9Cssus,2509
|
|
7
|
-
external_systems/sources/_proxies.py,sha256=
|
|
7
|
+
external_systems/sources/_proxies.py,sha256=tkml1q3pkNwKsyG_z-JcObTz8pCdCCHCgz_n1mA82Xk,5764
|
|
8
8
|
external_systems/sources/_refreshable.py,sha256=0pa5XW0_2gTMW-ZymKhlhh3Kka_bWTWffThKvrTTifc,4421
|
|
9
9
|
external_systems/sources/_sockets.py,sha256=XH51adVnloqg8XYVHPxl6K8R_q2BCh6WZ77cq1L8nRg,4473
|
|
10
|
-
external_systems/sources/_sources.py,sha256
|
|
10
|
+
external_systems/sources/_sources.py,sha256=-DP1QzuCtXOnsijwTNxI9x2vyEmxgyRB47ZTVQshfXA,10829
|
|
11
11
|
external_systems/sources/_utils.py,sha256=EmUKKiKRDOZ2cZs7FZ4qCSan_lq1K_tquh3kxleB-jA,1004
|
|
12
|
-
external_systems-0.
|
|
13
|
-
external_systems-0.
|
|
14
|
-
external_systems-0.
|
|
15
|
-
external_systems-0.
|
|
12
|
+
external_systems-0.103.0.dist-info/LICENSE.txt,sha256=NAk6Uc9K_N_J5V75k9qECpzUnO-ujT-mKK_jk_mboUE,569
|
|
13
|
+
external_systems-0.103.0.dist-info/METADATA,sha256=ZsWtPQw31-qmCm1gYUF07ON9hcWRpEBakSSwUEXHchA,4765
|
|
14
|
+
external_systems-0.103.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
15
|
+
external_systems-0.103.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|