external-systems 0.103.0rc4__tar.gz → 0.104.0rc1__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: external-systems
3
- Version: 0.103.0rc4
3
+ Version: 0.104.0rc1
4
4
  Summary: A Python library for interacting with Foundry Sources
5
5
  License: Apache-2.0
6
6
  Keywords: Palantir,Foundry,Sources,Compute Modules,Python Functions,Transforms
@@ -16,4 +16,4 @@
16
16
  # The version is set during the publishing step (since we can't know the version in advance)
17
17
  # using the autorelease bot
18
18
 
19
- __version__ = "0.103.0-rc4"
19
+ __version__ = "0.104.0-rc1"
@@ -26,12 +26,24 @@ class CustomCaBundleSession(Session):
26
26
  A wrapper for requests.Session to override 'verify' property, ignoring REQUESTS_CA_BUNDLE environment variable.
27
27
 
28
28
  This is a workaround for https://github.com/psf/requests/issues/3829 (will be fixed in requests 3.0.0)
29
+
30
+ The standard behavior of requests is to ALWAYS use the REQUESTS_CA_BUNDLE environment variable here if "verify" is not set on
31
+ the request (even if it's set on the session level).
29
32
  """
30
33
 
31
34
  def merge_environment_settings(self, url, proxies, stream, verify, *args, **kwargs): # type: ignore[no-untyped-def]
32
- if isinstance(self.verify, str) and os.path.exists(self.verify):
35
+ user_has_manually_overridden_verify = verify is not None
36
+
37
+ # The source certs will not exist, for example, if the client is passed to a spark UDF that runs in a different environment.
38
+ # In this case, the verify path does not exist on the new environment, so we should not try use it and instead default to standard behavior.
39
+ source_certs_exist = isinstance(self.verify, str) and os.path.exists(self.verify)
40
+
41
+ if not user_has_manually_overridden_verify and source_certs_exist:
33
42
  verify = self.verify
34
43
 
44
+ # else (override exists or the source certs do not exist):
45
+ # Use the override. If there is no override (verify=None), then this will default to REQUESTS_CA_BUNDLE.
46
+
35
47
  return super(CustomCaBundleSession, self).merge_environment_settings(
36
48
  url, proxies, stream, verify, *args, **kwargs
37
49
  )
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "external-systems"
3
- version = "0.103.0-rc4"
3
+ version = "0.104.0-rc1"
4
4
  description = "A Python library for interacting with Foundry Sources"
5
5
  authors = ["Palantir Technologies, Inc."]
6
6
  license = "Apache-2.0"