ibm-cloud-sdk-core 3.20.2__tar.gz → 3.20.4__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.
Files changed (71) hide show
  1. {ibm-cloud-sdk-core-3.20.2/ibm_cloud_sdk_core.egg-info → ibm-cloud-sdk-core-3.20.4}/PKG-INFO +2 -2
  2. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/README.md +1 -1
  3. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/http_adapter.py +3 -2
  4. ibm-cloud-sdk-core-3.20.4/ibm_cloud_sdk_core/version.py +1 -0
  5. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4/ibm_cloud_sdk_core.egg-info}/PKG-INFO +2 -2
  6. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/setup.py +1 -19
  7. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_http_adapter.py +4 -15
  8. ibm-cloud-sdk-core-3.20.2/ibm_cloud_sdk_core/version.py +0 -1
  9. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/LICENSE +0 -0
  10. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/MANIFEST.in +0 -0
  11. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/__init__.py +0 -0
  12. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/api_exception.py +0 -0
  13. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/__init__.py +0 -0
  14. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/authenticator.py +0 -0
  15. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/basic_authenticator.py +0 -0
  16. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/bearer_token_authenticator.py +0 -0
  17. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/container_authenticator.py +0 -0
  18. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/cp4d_authenticator.py +0 -0
  19. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/iam_authenticator.py +0 -0
  20. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/iam_request_based_authenticator.py +0 -0
  21. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/mcsp_authenticator.py +0 -0
  22. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/no_auth_authenticator.py +0 -0
  23. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/authenticators/vpc_instance_authenticator.py +0 -0
  24. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/base_service.py +0 -0
  25. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/detailed_response.py +0 -0
  26. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/get_authenticator.py +0 -0
  27. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/private_helpers.py +0 -0
  28. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/token_managers/__init__.py +0 -0
  29. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/token_managers/container_token_manager.py +0 -0
  30. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/token_managers/cp4d_token_manager.py +0 -0
  31. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/token_managers/iam_request_based_token_manager.py +0 -0
  32. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/token_managers/iam_token_manager.py +0 -0
  33. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/token_managers/jwt_token_manager.py +0 -0
  34. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/token_managers/mcsp_token_manager.py +0 -0
  35. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/token_managers/token_manager.py +0 -0
  36. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/token_managers/vpc_instance_token_manager.py +0 -0
  37. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core/utils.py +0 -0
  38. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core.egg-info/SOURCES.txt +0 -0
  39. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core.egg-info/dependency_links.txt +0 -0
  40. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core.egg-info/requires.txt +0 -0
  41. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core.egg-info/top_level.txt +0 -0
  42. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/ibm_cloud_sdk_core.egg-info/zip-safe +0 -0
  43. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/pyproject.toml +0 -0
  44. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/requirements-dev.txt +0 -0
  45. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/requirements.txt +0 -0
  46. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/setup.cfg +0 -0
  47. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/__init__.py +0 -0
  48. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_api_exception.py +0 -0
  49. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_authenticator.py +0 -0
  50. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_base_service.py +0 -0
  51. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_basic_authenticator.py +0 -0
  52. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_bearer_authenticator.py +0 -0
  53. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_container_authenticator.py +0 -0
  54. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_container_token_manager.py +0 -0
  55. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_cp4d_authenticator.py +0 -0
  56. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_cp4d_token_manager.py +0 -0
  57. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_detailed_response.py +0 -0
  58. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_iam_authenticator.py +0 -0
  59. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_iam_token_manager.py +0 -0
  60. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_jwt_token_manager.py +0 -0
  61. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_mcsp_authenticator.py +0 -0
  62. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_mcsp_token_manager.py +0 -0
  63. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_no_auth_authenticator.py +0 -0
  64. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_token_manager.py +0 -0
  65. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_utils.py +0 -0
  66. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_vpc_instance_authenticator.py +0 -0
  67. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test/test_vpc_instance_token_manager.py +0 -0
  68. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test_integration/__init__.py +0 -0
  69. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test_integration/test_cp4d_authenticator_integration.py +0 -0
  70. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test_integration/test_iam_authenticator_integration.py +0 -0
  71. {ibm-cloud-sdk-core-3.20.2 → ibm-cloud-sdk-core-3.20.4}/test_integration/test_mcsp_authenticator_integration.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ibm-cloud-sdk-core
3
- Version: 3.20.2
3
+ Version: 3.20.4
4
4
  Summary: Core library used by SDKs for IBM Cloud Services
5
5
  Home-page: https://github.com/IBM/python-sdk-core
6
6
  Author: IBM
@@ -29,7 +29,7 @@ License-File: LICENSE
29
29
  [![CLA assistant](https://cla-assistant.io/readme/badge/ibm/python-sdk-core)](https://cla-assistant.io/ibm/python-sdk-core)
30
30
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
31
31
 
32
- # IBM Python SDK Core Version 3.20.2
32
+ # IBM Python SDK Core Version 3.20.4
33
33
  This project contains core functionality required by Python code generated by the IBM Cloud OpenAPI SDK Generator
34
34
  (openapi-sdkgen).
35
35
 
@@ -4,7 +4,7 @@
4
4
  [![CLA assistant](https://cla-assistant.io/readme/badge/ibm/python-sdk-core)](https://cla-assistant.io/ibm/python-sdk-core)
5
5
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6
6
 
7
- # IBM Python SDK Core Version 3.20.2
7
+ # IBM Python SDK Core Version 3.20.4
8
8
  This project contains core functionality required by Python code generated by the IBM Cloud OpenAPI SDK Generator
9
9
  (openapi-sdkgen).
10
10
 
@@ -1,10 +1,10 @@
1
1
  import ssl
2
2
 
3
+ from requests import certs
3
4
  from requests.adapters import HTTPAdapter, DEFAULT_POOLBLOCK
4
5
  from urllib3.util.ssl_ import create_urllib3_context
5
6
 
6
7
 
7
- # pylint: disable=fixme
8
8
  class SSLHTTPAdapter(HTTPAdapter):
9
9
  """Wraps the original HTTP adapter and adds additional SSL context."""
10
10
 
@@ -17,7 +17,8 @@ class SSLHTTPAdapter(HTTPAdapter):
17
17
  """Create and use custom SSL configuration."""
18
18
 
19
19
  ssl_context = create_urllib3_context()
20
- ssl_context.load_default_certs()
20
+ # NOTE: https://github.com/psf/requests/pull/6731/files#r1622893724
21
+ ssl_context.load_verify_locations(certs.where())
21
22
  ssl_context.minimum_version = ssl.TLSVersion.TLSv1_2
22
23
 
23
24
  if self._disable_ssl_verification:
@@ -0,0 +1 @@
1
+ __version__ = '3.20.4'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ibm-cloud-sdk-core
3
- Version: 3.20.2
3
+ Version: 3.20.4
4
4
  Summary: Core library used by SDKs for IBM Cloud Services
5
5
  Home-page: https://github.com/IBM/python-sdk-core
6
6
  Author: IBM
@@ -29,7 +29,7 @@ License-File: LICENSE
29
29
  [![CLA assistant](https://cla-assistant.io/readme/badge/ibm/python-sdk-core)](https://cla-assistant.io/ibm/python-sdk-core)
30
30
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
31
31
 
32
- # IBM Python SDK Core Version 3.20.2
32
+ # IBM Python SDK Core Version 3.20.4
33
33
  This project contains core functionality required by Python code generated by the IBM Cloud OpenAPI SDK Generator
34
34
  (openapi-sdkgen).
35
35
 
@@ -17,9 +17,8 @@ import os
17
17
  import sys
18
18
  import pkg_resources
19
19
  from setuptools import setup, find_packages
20
- from setuptools.command.test import test as TestCommand
21
20
 
22
- __version__ = '3.20.2'
21
+ __version__ = '3.20.4'
23
22
 
24
23
  if sys.argv[-1] == 'publish':
25
24
  # test server
@@ -36,22 +35,6 @@ with open('requirements.txt', encoding='utf-8') as f:
36
35
  with open('requirements-dev.txt', encoding='utf-8') as f:
37
36
  tests_require = [str(req) for req in pkg_resources.parse_requirements(f)]
38
37
 
39
-
40
- class PyTest(TestCommand):
41
- """PyTest class."""
42
-
43
- def finalize_options(self):
44
- TestCommand.finalize_options(self)
45
- self.test_args = ['--strict', '--verbose', '--tb=long', 'test']
46
- self.test_suite = True
47
-
48
- def run_tests(self):
49
- import pytest
50
-
51
- errcode = pytest.main(self.test_args)
52
- sys.exit(errcode)
53
-
54
-
55
38
  with open("README.md", "r", encoding='utf-8') as fh:
56
39
  readme = fh.read()
57
40
 
@@ -62,7 +45,6 @@ setup(
62
45
  license='Apache 2.0',
63
46
  install_requires=install_requires,
64
47
  tests_require=tests_require,
65
- cmdclass={'test': PyTest},
66
48
  author='IBM',
67
49
  author_email='devxsdk@us.ibm.com',
68
50
  long_description=readme,
@@ -3,12 +3,12 @@ import os
3
3
  import threading
4
4
  import warnings
5
5
  from http.server import HTTPServer, SimpleHTTPRequestHandler
6
- from ssl import get_default_verify_paths, SSLContext, PROTOCOL_TLSv1_1, PROTOCOL_TLSv1_2
6
+ from ssl import SSLContext, PROTOCOL_TLSv1_1, PROTOCOL_TLSv1_2
7
7
  from typing import Callable
8
8
 
9
9
  import pytest
10
10
  import urllib3
11
- from requests.exceptions import SSLError
11
+ from requests import exceptions
12
12
 
13
13
  from ibm_cloud_sdk_core.base_service import BaseService
14
14
  from ibm_cloud_sdk_core.authenticators import NoAuthAuthenticator
@@ -71,7 +71,7 @@ def test_tls_v1_1():
71
71
  with pytest.raises(Exception) as exception:
72
72
  service.send(prepped, verify=cert)
73
73
  # Errors can be differ based on the Python version.
74
- assert exception.type is SSLError or exception.type is ConnectionError
74
+ assert exception.type is exceptions.SSLError or exception.type is exceptions.ConnectionError
75
75
 
76
76
 
77
77
  @_local_server(PROTOCOL_TLSv1_2, 3334)
@@ -82,7 +82,7 @@ def test_tls_v1_2():
82
82
  # It should fail due to the self-signed SSL cert.
83
83
  assert service.disable_ssl_verification is False
84
84
  prepped = service.prepare_request('GET', url='/')
85
- with pytest.raises(SSLError, match='certificate verify failed: self-signed certificate'):
85
+ with pytest.raises(exceptions.SSLError, match='certificate verify failed: self-signed certificate'):
86
86
  res = service.send(prepped)
87
87
 
88
88
  # Next configure it to validate by using our local certificate. Should raise no exception.
@@ -105,17 +105,6 @@ def test_tls_v1_2():
105
105
 
106
106
  ssl_context = service.http_adapter.poolmanager.connection_pool_kw.get("ssl_context")
107
107
  assert ssl_context is not None
108
- # In some cases (especially in Ubuntu containers that we use for testing on Travis)
109
- # the default CA certificates are stored in a different place, so let's try to
110
- # load those before making the final decision for this test case.
111
- if len(ssl_context.get_ca_certs()) == 0:
112
- try:
113
- default_ca_path = get_default_verify_paths().capath
114
- ssl_context.load_verify_locations(os.path.join(default_ca_path, 'ca-certificates.crt'))
115
- except:
116
- # Errors are ignored, let's jump straight to the assertion.
117
- pass
118
-
119
108
  assert len(ssl_context.get_ca_certs()) > 0
120
109
 
121
110
  prepped = service.prepare_request('GET', url='/status')
@@ -1 +0,0 @@
1
- __version__ = '3.20.2'