ibm-cloud-sdk-core 3.24.2__tar.gz → 3.24.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 (94) hide show
  1. ibm_cloud_sdk_core-3.24.4/MANIFEST.in +3 -0
  2. {ibm_cloud_sdk_core-3.24.2/ibm_cloud_sdk_core.egg-info → ibm_cloud_sdk_core-3.24.4}/PKG-INFO +8 -8
  3. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/README.md +4 -4
  4. ibm_cloud_sdk_core-3.24.4/ibm_cloud_sdk_core/version.py +1 -0
  5. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4/ibm_cloud_sdk_core.egg-info}/PKG-INFO +8 -8
  6. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core.egg-info/SOURCES.txt +22 -1
  7. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core.egg-info/requires.txt +1 -1
  8. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/pyproject.toml +4 -4
  9. ibm_cloud_sdk_core-3.24.4/resources/cr-token.txt +1 -0
  10. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-basic.env +3 -0
  11. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-bearer.env +2 -0
  12. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-container.env +13 -0
  13. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-cp4d.env +6 -0
  14. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-cp4dtest.env.example +11 -0
  15. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-external.env +4 -0
  16. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-gzip.env +4 -0
  17. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-iam-assume.env +5 -0
  18. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-iam.env +4 -0
  19. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-mcsp.env +3 -0
  20. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-mcspv2.env +27 -0
  21. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-no-auth.env +1 -0
  22. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-retry.env +6 -0
  23. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials-vpc.env +11 -0
  24. ibm_cloud_sdk_core-3.24.4/resources/ibm-credentials.env +21 -0
  25. ibm_cloud_sdk_core-3.24.4/resources/test_ssl.crt +19 -0
  26. ibm_cloud_sdk_core-3.24.4/resources/test_ssl.key +28 -0
  27. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_base_service.py +5 -8
  28. ibm_cloud_sdk_core-3.24.4/test/utils/__init__.py +0 -0
  29. ibm_cloud_sdk_core-3.24.4/test/utils/http_utils.py +66 -0
  30. ibm_cloud_sdk_core-3.24.4/test/utils/logger_utils.py +34 -0
  31. ibm_cloud_sdk_core-3.24.2/MANIFEST.in +0 -1
  32. ibm_cloud_sdk_core-3.24.2/ibm_cloud_sdk_core/version.py +0 -1
  33. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/LICENSE +0 -0
  34. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/__init__.py +0 -0
  35. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/api_exception.py +0 -0
  36. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/__init__.py +0 -0
  37. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/authenticator.py +0 -0
  38. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/basic_authenticator.py +0 -0
  39. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/bearer_token_authenticator.py +0 -0
  40. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/container_authenticator.py +0 -0
  41. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/cp4d_authenticator.py +0 -0
  42. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/iam_assume_authenticator.py +0 -0
  43. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/iam_authenticator.py +0 -0
  44. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/iam_request_based_authenticator.py +0 -0
  45. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/mcsp_authenticator.py +0 -0
  46. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/mcspv2_authenticator.py +0 -0
  47. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/no_auth_authenticator.py +0 -0
  48. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/authenticators/vpc_instance_authenticator.py +0 -0
  49. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/base_service.py +0 -0
  50. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/detailed_response.py +0 -0
  51. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/get_authenticator.py +0 -0
  52. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/http_adapter.py +0 -0
  53. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/logger.py +0 -0
  54. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/private_helpers.py +0 -0
  55. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/__init__.py +0 -0
  56. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/container_token_manager.py +0 -0
  57. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/cp4d_token_manager.py +0 -0
  58. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/iam_assume_token_manager.py +0 -0
  59. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/iam_request_based_token_manager.py +0 -0
  60. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/iam_token_manager.py +0 -0
  61. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/jwt_token_manager.py +0 -0
  62. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/mcsp_token_manager.py +0 -0
  63. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/mcspv2_token_manager.py +0 -0
  64. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/token_manager.py +0 -0
  65. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/token_managers/vpc_instance_token_manager.py +0 -0
  66. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core/utils.py +0 -0
  67. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core.egg-info/dependency_links.txt +0 -0
  68. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/ibm_cloud_sdk_core.egg-info/top_level.txt +0 -0
  69. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/setup.cfg +0 -0
  70. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_api_exception.py +0 -0
  71. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_authenticator.py +0 -0
  72. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_basic_authenticator.py +0 -0
  73. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_bearer_authenticator.py +0 -0
  74. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_container_authenticator.py +0 -0
  75. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_container_token_manager.py +0 -0
  76. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_cp4d_authenticator.py +0 -0
  77. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_cp4d_token_manager.py +0 -0
  78. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_detailed_response.py +0 -0
  79. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_get_authenticator.py +0 -0
  80. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_http_adapter.py +0 -0
  81. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_iam_assume_authenticator.py +0 -0
  82. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_iam_assume_token_manager.py +0 -0
  83. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_iam_authenticator.py +0 -0
  84. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_iam_token_manager.py +0 -0
  85. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_jwt_token_manager.py +0 -0
  86. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_logger.py +0 -0
  87. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_mcsp_authenticator.py +0 -0
  88. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_mcsp_token_manager.py +0 -0
  89. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_mcspv2_authenticator.py +0 -0
  90. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_no_auth_authenticator.py +0 -0
  91. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_token_manager.py +0 -0
  92. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_utils.py +0 -0
  93. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_vpc_instance_authenticator.py +0 -0
  94. {ibm_cloud_sdk_core-3.24.2 → ibm_cloud_sdk_core-3.24.4}/test/test_vpc_instance_token_manager.py +0 -0
@@ -0,0 +1,3 @@
1
+ include LICENSE
2
+ recursive-include resources *.crt *.env *.env.example *.key *.txt
3
+ recursive-include test/utils *.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ibm-cloud-sdk-core
3
- Version: 3.24.2
3
+ Version: 3.24.4
4
4
  Summary: Core library used by SDKs for IBM Cloud Services
5
5
  Author-email: IBM <devxsdk@us.ibm.com>
6
6
  Project-URL: Repository, https://github.com/IBM/python-sdk-core
@@ -12,11 +12,11 @@ Project-URL: License, https://github.com/IBM/python-sdk-core/blob/main/LICENSE
12
12
  Keywords: ibm,cloud,ibm cloud services
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
19
18
  Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
20
  Classifier: Development Status :: 5 - Production/Stable
21
21
  Classifier: Environment :: Console
22
22
  Classifier: Intended Audience :: Developers
@@ -25,13 +25,13 @@ Classifier: Operating System :: OS Independent
25
25
  Classifier: Topic :: Software Development :: Libraries
26
26
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
27
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
28
- Requires-Python: >=3.9
28
+ Requires-Python: >=3.10
29
29
  Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Requires-Dist: requests<3.0.0,>=2.32.4
32
32
  Requires-Dist: urllib3<3.0.0,>=2.4.0
33
33
  Requires-Dist: python_dateutil<3.0.0,>=2.9.0
34
- Requires-Dist: PyJWT<3.0.0,>=2.10.1
34
+ Requires-Dist: PyJWT<3.0.0,>=2.11.0
35
35
  Provides-Extra: dev
36
36
  Requires-Dist: coverage<8.0.0,>=7.9.0; extra == "dev"
37
37
  Requires-Dist: pylint<4.0.0,>=3.3.7; extra == "dev"
@@ -50,12 +50,12 @@ Dynamic: license-file
50
50
  [![CLA assistant](https://cla-assistant.io/readme/badge/ibm/python-sdk-core)](https://cla-assistant.io/ibm/python-sdk-core)
51
51
  [![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)
52
52
 
53
- # IBM Python SDK Core Version 3.24.2
53
+ # IBM Python SDK Core Version 3.24.4
54
54
  This project contains core functionality required by Python code generated by the IBM Cloud OpenAPI SDK Generator
55
55
  (openapi-sdkgen).
56
56
 
57
57
  # Python Version
58
- The current minimum Python version supported is 3.9.
58
+ The current minimum Python version supported is 3.10.
59
59
 
60
60
  ## Installation
61
61
 
@@ -116,12 +116,12 @@ When running your application, you should see output like this if debug logging
116
116
  ```
117
117
  2024-09-16 15:44:45,174 [ibm-cloud-sdk-core:DEBUG] Get authenticator from environment, key=global_search
118
118
  2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set service URL: https://api.global-search-tagging.cloud.ibm.com
119
- 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.24.2 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
119
+ 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.24.4 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
120
120
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Configuring BaseService instance with service name: global_search
121
121
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Performing synchronous token fetch
122
122
  2024-09-16 15:44:45,182 [ibm-cloud-sdk-core:DEBUG] Invoking IAM get_token operation: https://iam.cloud.ibm.com/identity/token
123
123
  2024-09-16 15:44:45,182 [urllib3.connectionpool:DEBUG] Starting new HTTPS connection (1): iam.cloud.ibm.com:443
124
- send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.24.2 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
124
+ send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.24.4 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
125
125
  send: b'grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey=[redacted]&response_type=cloud_iam'
126
126
  reply: 'HTTP/1.1 200 OK\r\n'
127
127
  header: Content-Type: application/json
@@ -4,12 +4,12 @@
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.24.2
7
+ # IBM Python SDK Core Version 3.24.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
 
11
11
  # Python Version
12
- The current minimum Python version supported is 3.9.
12
+ The current minimum Python version supported is 3.10.
13
13
 
14
14
  ## Installation
15
15
 
@@ -70,12 +70,12 @@ When running your application, you should see output like this if debug logging
70
70
  ```
71
71
  2024-09-16 15:44:45,174 [ibm-cloud-sdk-core:DEBUG] Get authenticator from environment, key=global_search
72
72
  2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set service URL: https://api.global-search-tagging.cloud.ibm.com
73
- 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.24.2 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
73
+ 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.24.4 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
74
74
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Configuring BaseService instance with service name: global_search
75
75
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Performing synchronous token fetch
76
76
  2024-09-16 15:44:45,182 [ibm-cloud-sdk-core:DEBUG] Invoking IAM get_token operation: https://iam.cloud.ibm.com/identity/token
77
77
  2024-09-16 15:44:45,182 [urllib3.connectionpool:DEBUG] Starting new HTTPS connection (1): iam.cloud.ibm.com:443
78
- send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.24.2 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
78
+ send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.24.4 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
79
79
  send: b'grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey=[redacted]&response_type=cloud_iam'
80
80
  reply: 'HTTP/1.1 200 OK\r\n'
81
81
  header: Content-Type: application/json
@@ -0,0 +1 @@
1
+ __version__ = '3.24.4'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ibm-cloud-sdk-core
3
- Version: 3.24.2
3
+ Version: 3.24.4
4
4
  Summary: Core library used by SDKs for IBM Cloud Services
5
5
  Author-email: IBM <devxsdk@us.ibm.com>
6
6
  Project-URL: Repository, https://github.com/IBM/python-sdk-core
@@ -12,11 +12,11 @@ Project-URL: License, https://github.com/IBM/python-sdk-core/blob/main/LICENSE
12
12
  Keywords: ibm,cloud,ibm cloud services
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
19
18
  Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
20
  Classifier: Development Status :: 5 - Production/Stable
21
21
  Classifier: Environment :: Console
22
22
  Classifier: Intended Audience :: Developers
@@ -25,13 +25,13 @@ Classifier: Operating System :: OS Independent
25
25
  Classifier: Topic :: Software Development :: Libraries
26
26
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
27
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
28
- Requires-Python: >=3.9
28
+ Requires-Python: >=3.10
29
29
  Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Requires-Dist: requests<3.0.0,>=2.32.4
32
32
  Requires-Dist: urllib3<3.0.0,>=2.4.0
33
33
  Requires-Dist: python_dateutil<3.0.0,>=2.9.0
34
- Requires-Dist: PyJWT<3.0.0,>=2.10.1
34
+ Requires-Dist: PyJWT<3.0.0,>=2.11.0
35
35
  Provides-Extra: dev
36
36
  Requires-Dist: coverage<8.0.0,>=7.9.0; extra == "dev"
37
37
  Requires-Dist: pylint<4.0.0,>=3.3.7; extra == "dev"
@@ -50,12 +50,12 @@ Dynamic: license-file
50
50
  [![CLA assistant](https://cla-assistant.io/readme/badge/ibm/python-sdk-core)](https://cla-assistant.io/ibm/python-sdk-core)
51
51
  [![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)
52
52
 
53
- # IBM Python SDK Core Version 3.24.2
53
+ # IBM Python SDK Core Version 3.24.4
54
54
  This project contains core functionality required by Python code generated by the IBM Cloud OpenAPI SDK Generator
55
55
  (openapi-sdkgen).
56
56
 
57
57
  # Python Version
58
- The current minimum Python version supported is 3.9.
58
+ The current minimum Python version supported is 3.10.
59
59
 
60
60
  ## Installation
61
61
 
@@ -116,12 +116,12 @@ When running your application, you should see output like this if debug logging
116
116
  ```
117
117
  2024-09-16 15:44:45,174 [ibm-cloud-sdk-core:DEBUG] Get authenticator from environment, key=global_search
118
118
  2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set service URL: https://api.global-search-tagging.cloud.ibm.com
119
- 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.24.2 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
119
+ 2024-09-16 15:44:45,175 [ibm-cloud-sdk-core:DEBUG] Set User-Agent: ibm-python-sdk-core-3.24.4 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5
120
120
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Configuring BaseService instance with service name: global_search
121
121
  2024-09-16 15:44:45,181 [ibm-cloud-sdk-core:DEBUG] Performing synchronous token fetch
122
122
  2024-09-16 15:44:45,182 [ibm-cloud-sdk-core:DEBUG] Invoking IAM get_token operation: https://iam.cloud.ibm.com/identity/token
123
123
  2024-09-16 15:44:45,182 [urllib3.connectionpool:DEBUG] Starting new HTTPS connection (1): iam.cloud.ibm.com:443
124
- send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.24.2 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
124
+ send: b'POST /identity/token HTTP/1.1\r\nHost: iam.cloud.ibm.com\r\nUser-Agent: ibm-python-sdk-core/iam-authenticator-3.24.4 os.name=Linux os.version=6.10.9-100.fc39.x86_64 python.version=3.12.5\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 135\r\n\r\n'
125
125
  send: b'grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey=[redacted]&response_type=cloud_iam'
126
126
  reply: 'HTTP/1.1 200 OK\r\n'
127
127
  header: Content-Type: application/json
@@ -41,6 +41,24 @@ ibm_cloud_sdk_core/token_managers/mcsp_token_manager.py
41
41
  ibm_cloud_sdk_core/token_managers/mcspv2_token_manager.py
42
42
  ibm_cloud_sdk_core/token_managers/token_manager.py
43
43
  ibm_cloud_sdk_core/token_managers/vpc_instance_token_manager.py
44
+ resources/cr-token.txt
45
+ resources/ibm-credentials-basic.env
46
+ resources/ibm-credentials-bearer.env
47
+ resources/ibm-credentials-container.env
48
+ resources/ibm-credentials-cp4d.env
49
+ resources/ibm-credentials-cp4dtest.env.example
50
+ resources/ibm-credentials-external.env
51
+ resources/ibm-credentials-gzip.env
52
+ resources/ibm-credentials-iam-assume.env
53
+ resources/ibm-credentials-iam.env
54
+ resources/ibm-credentials-mcsp.env
55
+ resources/ibm-credentials-mcspv2.env
56
+ resources/ibm-credentials-no-auth.env
57
+ resources/ibm-credentials-retry.env
58
+ resources/ibm-credentials-vpc.env
59
+ resources/ibm-credentials.env
60
+ resources/test_ssl.crt
61
+ resources/test_ssl.key
44
62
  test/test_api_exception.py
45
63
  test/test_authenticator.py
46
64
  test/test_base_service.py
@@ -66,4 +84,7 @@ test/test_no_auth_authenticator.py
66
84
  test/test_token_manager.py
67
85
  test/test_utils.py
68
86
  test/test_vpc_instance_authenticator.py
69
- test/test_vpc_instance_token_manager.py
87
+ test/test_vpc_instance_token_manager.py
88
+ test/utils/__init__.py
89
+ test/utils/http_utils.py
90
+ test/utils/logger_utils.py
@@ -1,7 +1,7 @@
1
1
  requests<3.0.0,>=2.32.4
2
2
  urllib3<3.0.0,>=2.4.0
3
3
  python_dateutil<3.0.0,>=2.9.0
4
- PyJWT<3.0.0,>=2.10.1
4
+ PyJWT<3.0.0,>=2.11.0
5
5
 
6
6
  [dev]
7
7
  coverage<8.0.0,>=7.9.0
@@ -1,20 +1,20 @@
1
1
  [project]
2
2
  name = "ibm-cloud-sdk-core"
3
- version = "3.24.2"
3
+ version = "3.24.4"
4
4
  authors = [
5
5
  { name="IBM", email="devxsdk@us.ibm.com" }
6
6
  ]
7
7
  description = "Core library used by SDKs for IBM Cloud Services"
8
8
  readme = "README.md"
9
- requires-python = ">=3.9"
9
+ requires-python = ">=3.10"
10
10
  classifiers = [
11
11
  "Programming Language :: Python",
12
12
  "Programming Language :: Python :: 3",
13
- "Programming Language :: Python :: 3.9",
14
13
  "Programming Language :: Python :: 3.10",
15
14
  "Programming Language :: Python :: 3.11",
16
15
  "Programming Language :: Python :: 3.12",
17
16
  "Programming Language :: Python :: 3.13",
17
+ "Programming Language :: Python :: 3.14",
18
18
  "Development Status :: 5 - Production/Stable",
19
19
  "Environment :: Console",
20
20
  "Intended Audience :: Developers",
@@ -29,7 +29,7 @@ dependencies = [
29
29
  "requests>=2.32.4,<3.0.0",
30
30
  "urllib3>=2.4.0,<3.0.0",
31
31
  "python_dateutil>=2.9.0,<3.0.0",
32
- "PyJWT>=2.10.1,<3.0.0",
32
+ "PyJWT>=2.11.0,<3.0.0",
33
33
  ]
34
34
 
35
35
  [project.urls]
@@ -0,0 +1 @@
1
+ cr-token-1
@@ -0,0 +1,3 @@
1
+ WATSON_USERNAME=my_username
2
+ WATSON_PASSWORD=my_password
3
+ WATSON_AUTHTYPE=basic
@@ -0,0 +1,2 @@
1
+ WATSON_BEARER_TOKEN=my_token
2
+ WATSON_AUTHTYPE=bearerToken
@@ -0,0 +1,13 @@
1
+ SERVICE_1_AUTH_TYPE=container
2
+ SERVICE_1_CR_TOKEN_FILENAME=crtoken.txt
3
+ SERVICE_1_IAM_PROFILE_NAME=iam-user-123
4
+ SERVICE_1_IAM_PROFILE_ID=iam-id-123
5
+ SERVICE_1_AUTH_URL=https://iamhost/iam/api
6
+ SERVICE_1_SCOPE=scope1
7
+ SERVICE_1_CLIENT_ID=iam-client-123
8
+ SERVICE_1_CLIENT_SECRET=iam-secret-123
9
+ SERVICE_1_AUTH_DISABLE_SSL=true
10
+
11
+ SERVICE_2_AUTH_TYPE=container
12
+ SERVICE_2_IAM_PROFILE_NAME=iam-user-123
13
+ SERVICE_2_AUTH_DISABLE_SSL=false
@@ -0,0 +1,6 @@
1
+ WATSON_USERNAME=my_username
2
+ WATSON_PASSWORD=my_password
3
+ WATSON_AUTH_URL=https://my_url
4
+ WATSON_AUTH_TYPE=cp4d
5
+ WATSON_AUTH_DISABLE_SSL=False
6
+ WATSON_DISABLE_SSL=True
@@ -0,0 +1,11 @@
1
+ CP4D_PASSWORD_TEST_AUTH_URL=<url> e.g. https://cpd350-cpd-cpd350.apps.wml-kf-cluster.os.fyre.ibm.com/icp4d-api
2
+ CP4D_PASSWORD_TEST_AUTH_TYPE=cp4d
3
+ CP4D_PASSWORD_TEST_USERNAME=<username>
4
+ CP4D_PASSWORD_TEST_PASSWORD=<password>
5
+ CP4D_PASSWORD_TEST_AUTH_DISABLE_SSL=true
6
+
7
+ CP4D_APIKEY_TEST_AUTH_URL=<url> e.g. https://cpd350-cpd-cpd350.apps.wml-kf-cluster.os.fyre.ibm.com/icp4d-api
8
+ CP4D_APIKEY_TEST_AUTH_TYPE=cp4d
9
+ CP4D_APIKEY_TEST_USERNAME=<username>
10
+ CP4D_APIKEY_TEST_APIKEY=<apikey>
11
+ CP4D_APIKEY_TEST_AUTH_DISABLE_SSL=true
@@ -0,0 +1,4 @@
1
+ INCLUDE_EXTERNAL_CONFIG_APIKEY=5678efgh
2
+ INCLUDE_EXTERNAL_CONFIG_AUTH_TYPE=iam
3
+ INCLUDE_EXTERNAL_CONFIG_URL=https://externallyconfigured.com/api
4
+ INCLUDE_EXTERNAL_CONFIG_DISABLE_SSL=True
@@ -0,0 +1,4 @@
1
+ INCLUDE_EXTERNAL_CONFIG_APIKEY=mockkey
2
+ INCLUDE_EXTERNAL_CONFIG_AUTH_TYPE=iam
3
+ INCLUDE_EXTERNAL_CONFIG_URL=https://mockurl
4
+ INCLUDE_EXTERNAL_CONFIG_ENABLE_GZIP=True
@@ -0,0 +1,5 @@
1
+ SERVICE_1_AUTH_TYPE=iamAssume
2
+ SERVICE_1_APIKEY=my-api-key
3
+ SERVICE_1_IAM_PROFILE_ID=iam-profile-1
4
+ SERVICE_1_URL=https://iamhost/iamassume/api
5
+ SERVICE_1_DISABLE_SSL=True
@@ -0,0 +1,4 @@
1
+ IBM_WATSON_APIKEY=5678efgh
2
+ IBM_WATSON_AUTH_TYPE=iam
3
+ IBM_WATSON_URL=https://gateway-s.watsonplatform.net/watson/api
4
+ IBM_WATSON_DISABLE_SSL=False
@@ -0,0 +1,3 @@
1
+ SERVICE1_AUTH_TYPE=mcsp
2
+ SERVICE1_APIKEY=my-api-key
3
+ SERVICE1_AUTH_URL=https://mcsp.ibm.com
@@ -0,0 +1,27 @@
1
+ # MCSP v2 with only required properties
2
+ SERVICE1_AUTH_TYPE=mcspv2
3
+ SERVICE1_APIKEY=my-api-key
4
+ SERVICE1_AUTH_URL=https://mcspv2.ibm.com
5
+ SERVICE1_SCOPE_COLLECTION_TYPE=accounts
6
+ SERVICE1_SCOPE_ID=global_account
7
+
8
+ # MCSP v2 with all properties
9
+ SERVICE2_AUTH_TYPE=mcspv2
10
+ SERVICE2_APIKEY=my-api-key
11
+ SERVICE2_AUTH_URL=https://mcspv2.ibm.com
12
+ SERVICE2_SCOPE_COLLECTION_TYPE=accounts
13
+ SERVICE2_SCOPE_ID=global_account
14
+ SERVICE2_INCLUDE_BUILTIN_ACTIONS=true
15
+ SERVICE2_INCLUDE_CUSTOM_ACTIONS=true
16
+ SERVICE2_INCLUDE_ROLES=false
17
+ SERVICE2_PREFIX_ROLES=true
18
+ SERVICE2_CALLER_EXT_CLAIM={"productID": "prod-123"}
19
+ SERVICE2_AUTH_DISABLE_SSL=true
20
+
21
+ # MCSP v with error config
22
+ ERROR1_AUTH_TYPE=mcspv2
23
+ ERROR1_APIKEY=my-api-key
24
+ ERROR1_AUTH_URL=https://mcspv2.ibm.com
25
+ ERROR1_SCOPE_COLLECTION_TYPE=accounts
26
+ ERROR1_SCOPE_ID=global_account
27
+ ERROR1_CALLER_EXT_CLAIM={not json}
@@ -0,0 +1 @@
1
+ WATSON_AUTH_TYPE=noAuth
@@ -0,0 +1,6 @@
1
+ INCLUDE_EXTERNAL_CONFIG_APIKEY=mockkey
2
+ INCLUDE_EXTERNAL_CONFIG_AUTH_TYPE=iam
3
+ INCLUDE_EXTERNAL_CONFIG_URL=https://mockurl
4
+ INCLUDE_EXTERNAL_CONFIG_MAX_RETRIES=3
5
+ INCLUDE_EXTERNAL_CONFIG_RETRY_INTERVAL=25.0
6
+ INCLUDE_EXTERNAL_CONFIG_ENABLE_RETRIES=true
@@ -0,0 +1,11 @@
1
+ # VPC auth with default config
2
+ SERVICE1_AUTH_TYPE=vpc
3
+
4
+ # VPC auth with profile CRN
5
+ SERVICE2_AUTH_TYPE=vpc
6
+ SERVICE2_IAM_PROFILE_CRN=crn:iam-profile1
7
+ SERVICE2_AUTH_URL=http://vpc.imds.com/api
8
+
9
+ # VPC auth with profile ID
10
+ SERVICE3_AUTH_TYPE=vpc
11
+ SERVICE3_IAM_PROFILE_ID=iam-profile1-id
@@ -0,0 +1,21 @@
1
+ IBM_WATSON_APIKEY=5678efgh
2
+ IBM_WATSON_AUTH_TYPE=iam
3
+ IBM_WATSON_URL=https://cwdserviceurl
4
+ IBM_WATSON_DISABLE_SSL=False
5
+
6
+ # Service1 auth properties configured with IAM and a token containing '='
7
+ SERVICE_1_AUTH_TYPE=iam
8
+ SERVICE_1_APIKEY=V4HXmoUtMjohnsnow=KotN
9
+ SERVICE_1_CLIENT_ID=somefake========id
10
+ SERVICE_1_CLIENT_SECRET===my-client-secret==
11
+ SERVICE_1_AUTH_URL=https://iamhost/iam/api=
12
+ SERVICE_1_URL=service1.com/api
13
+
14
+ # Service2 configured with IAM w/scope
15
+ SERVICE_2_AUTH_TYPE=iam
16
+ SERVICE_2_APIKEY=V4HXmoUtMjohnsnow=KotN
17
+ SERVICE_2_CLIENT_ID=somefake========id
18
+ SERVICE_2_CLIENT_SECRET===my-client-secret==
19
+ SERVICE_2_AUTH_URL=https://iamhost/iam/api=
20
+ SERVICE_2_URL=service1.com/api
21
+ SERVICE_2_SCOPE=A B C D
@@ -0,0 +1,19 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDETCCAfmgAwIBAgIUVQfATsBxBkHqAgmrv9Eb/KQhA2IwDQYJKoZIhvcNAQEL
3
+ BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MCAXDTI0MDcwMjA5MTkyN1oYDzIxMjQw
4
+ NjA4MDkxOTI3WjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEB
5
+ AQUAA4IBDwAwggEKAoIBAQCx7eyXu0A1IH18U0fmVbHlC0OpzpGfGOQayrlrxyxN
6
+ kNc8T2ehnt7W33FHI2tjcmO11wgsN+U2+uB2aq0q1OYaqo3OlZtTF4A91CgAdbGd
7
+ Ix5aEEzjogiQIBvrBQhaU6uFTzUBQ5tWs+pLcorVrp8G/ONN/1e4Z3NCg036ibSs
8
+ Vkfdw1zX6vTR674uTq8aIG7sH3DCF1Q+CzvxhQrhjkZOha+u0H+OhZ9yd30hU/xy
9
+ AKZsoGHNY65bVSYAPxP6XLw5inF534TLriggFDonEk16eHjAi7SxcjdKcyxhfX7u
10
+ DefD/s9cKUY4Tf1JeAx2F1Y++ffqWlQSde5DKkfC6xU5AgMBAAGjWTBXMBQGA1Ud
11
+ EQQNMAuCCWxvY2FsaG9zdDALBgNVHQ8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUH
12
+ AwEwHQYDVR0OBBYEFIHsshXxnhcdXRSPxHvTvfMWhfTgMA0GCSqGSIb3DQEBCwUA
13
+ A4IBAQCnEU3NtmskVv2/3U0DQM8FM8jKc/V7WCfK/PWPFUZgCkj8pUg4yYxjOZ4K
14
+ pFV7cPJjtArmjyU9lB0g2wQvlpXEYbDJ5K0LK9GsdhowZQatZaTB0nVZeG87mlV7
15
+ kxrQTMsMTYf5I6S3SW63SorlJQiuaQjOKwvommCS+6Q5goEOodZpGr+5sQSuRLlw
16
+ XMKzcU7ZDfe1jidjjcWSyf6UMKB/mhMQVMTTDURt/jS7koA5lXiU+m0XCSi28wTr
17
+ lV9ZRzZiE4mRDANlEkoqUCYPG/PDF0KOgDROiavlrBcBycsqBD5iRdGYGaYwUmSo
18
+ UpaVGGLYBguqwEeQ2ixC2rTGkyg7
19
+ -----END CERTIFICATE-----
@@ -0,0 +1,28 @@
1
+ -----BEGIN PRIVATE KEY-----
2
+ MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCx7eyXu0A1IH18
3
+ U0fmVbHlC0OpzpGfGOQayrlrxyxNkNc8T2ehnt7W33FHI2tjcmO11wgsN+U2+uB2
4
+ aq0q1OYaqo3OlZtTF4A91CgAdbGdIx5aEEzjogiQIBvrBQhaU6uFTzUBQ5tWs+pL
5
+ corVrp8G/ONN/1e4Z3NCg036ibSsVkfdw1zX6vTR674uTq8aIG7sH3DCF1Q+Czvx
6
+ hQrhjkZOha+u0H+OhZ9yd30hU/xyAKZsoGHNY65bVSYAPxP6XLw5inF534TLrigg
7
+ FDonEk16eHjAi7SxcjdKcyxhfX7uDefD/s9cKUY4Tf1JeAx2F1Y++ffqWlQSde5D
8
+ KkfC6xU5AgMBAAECggEABbqBSYlP0eYP5DbSM8pChftM3GS4L4UfovUv7xZkiMLH
9
+ CzwLPBrfVc+v1/h99p+yMiKQMsxB5vlAzM82cBCWr/kZw7LxY0V4bYUtHIathz+g
10
+ NIodz55h5DIEdBafZDkZZptcO4QvtiTowDEZ4zNSD2mI7/PuoRNDlLqhghV46at3
11
+ nfJmOgbWxzciOhpYUXtXl1+n1ywkXIbL58sfp5HgkuM9dL2BTZQdUwbS58TgyYla
12
+ DBYZQfiZ+MgrCqJKCYEy+lycVHz9LaSCVXgEYmstfcLqdC7X3/nQuUn587rV5FDA
13
+ 75bDZ7r2jvrQT7/MEGm3b2fgk0+0gMew52wrDsncuQKBgQDygvVlm6BU2cIm8qvR
14
+ l1LqU06jbEVW2fzrXi73RVgCR+ZQoy+hB8LviqNO0ayAOWIH/6iMGU09bK72DlJ0
15
+ K4P58X6iJaop1ntdYa2DApPzrz3/4weMl4ZVjz5tPBUxhkfJCMfZF2q+CoHOsdlQ
16
+ rTXNFQgfq4XNGpj3YX0L94pkgwKBgQC702bRFk7lHoMyn8hs8MQqumSsefpTsc6v
17
+ 3fLl6DgwhU9/FAEymIt+wEIchoU0GkVfZ16OmO1whZAgj3zsBr/zG7C7Din9s7hB
18
+ KV57o7KIRP3IUo+N6qQ2xNPG8lrCd7Xz+430RHT5BRudqNXWsZziFOrPXZz7Yh8/
19
+ TMy4ZwzKkwKBgQCOTToh/Uf/gifjItKfkeQdi/TBAG9Pn2pB0mpMvmv+KqKC/r6c
20
+ Bynj1b4uKerG8uULPIFydAZW3MdtqsnHUSGIMKTWELPhCPIqwX5HOeQHQfVniZiM
21
+ bv1shzlib7cf8GN/G5/pS0xfZ1r0JngWVw0S4hx6OPOyfsDzqEjwFLkocQKBgBOQ
22
+ 2xYO19sgSZR9dph6oES/M/uPnVcYn6pMWaA/h5LuYDChudo2b9mdV4W3MasSzYU5
23
+ tGzwW1OsZi4uJFpF/brqeIeT2yX1kc0f7Rq+G7v8S9+RUij7d23JJTKFTpUReV/Y
24
+ JZp7gx/pu026J8R8rhYTDb7aRp8dQpoKewz+lyOHAoGAUGOfsLybzE2w/gL1gZ8W
25
+ L6sdkQ7zq/IF04cqM5jw1g82f9CGdZlWrT6wv5D++O9zpZSmuwJ2p/os5Tsygmb4
26
+ M0IjG23Mw5IWLCC6n2riYwpQ8sjuL3SOhqgt4k5mnu4H0RpVLz69JPBJkaGuE1Ld
27
+ k4zeVfI1+X2clcHVfDS6xhc=
28
+ -----END PRIVATE KEY-----
@@ -605,7 +605,7 @@ def test_http_client():
605
605
  auth = BasicAuthenticator('my_username', 'my_password')
606
606
  service = AnyServiceV1('2018-11-20', authenticator=auth)
607
607
  assert isinstance(service.get_http_client(), requests.sessions.Session)
608
- assert service.get_http_client().headers.get('Accept-Encoding') == 'gzip, deflate'
608
+ assert service.get_http_client().headers.get('Accept-Encoding').startswith('gzip, deflate')
609
609
 
610
610
  new_http_client = requests.Session()
611
611
  new_http_client.headers.update({'Accept-Encoding': 'gzip'})
@@ -677,7 +677,6 @@ def test_gzip_compression():
677
677
  def test_gzip_compression_file_input():
678
678
  service = AnyServiceV1('2018-11-20', authenticator=NoAuthAuthenticator())
679
679
  service.set_enable_gzip_compression(True)
680
-
681
680
  # Should return file-like object with the compressed data when compression is on
682
681
  # and the input is a file, opened for reading in binary mode.
683
682
  raw_data = b'rawdata'
@@ -686,7 +685,7 @@ def test_gzip_compression_file_input():
686
685
  tmp_file.seek(0)
687
686
 
688
687
  prepped = service.prepare_request('GET', url='', data=tmp_file)
689
- assert prepped['data'].read() == gzip.compress(raw_data)
688
+ assert prepped['data'].read() == gzip.compress(raw_data, mtime=None)
690
689
  assert prepped['headers'].get('content-encoding') == 'gzip'
691
690
  assert prepped['data'].read() == b''
692
691
 
@@ -694,13 +693,12 @@ def test_gzip_compression_file_input():
694
693
  with tempfile.TemporaryFile(mode='w+b') as tmp_file:
695
694
  tmp_file.write(raw_data)
696
695
  tmp_file.seek(0)
697
-
698
696
  prepped = service.prepare_request('GET', url='', data=tmp_file)
699
697
  compressed = b''
700
698
  for chunk in prepped['data']:
701
699
  compressed += chunk
702
700
 
703
- assert compressed == gzip.compress(raw_data)
701
+ assert compressed == gzip.compress(raw_data, mtime=None)
704
702
 
705
703
  # Make sure the decompression works fine.
706
704
  assert gzip.decompress(compressed) == raw_data
@@ -714,7 +712,7 @@ def test_gzip_compression_file_input():
714
712
  tmp_file.seek(0)
715
713
 
716
714
  prepped = service.prepare_request('GET', url='', data=tmp_file)
717
- assert prepped['data'].read() == gzip.compress(text_data.encode())
715
+ assert prepped['data'].read() == gzip.compress(text_data.encode(), mtime=None)
718
716
  assert prepped['headers'].get('content-encoding') == 'gzip'
719
717
  assert prepped['data'].read() == b''
720
718
 
@@ -722,13 +720,12 @@ def test_gzip_compression_file_input():
722
720
  with tempfile.TemporaryFile(mode='w+') as tmp_file:
723
721
  tmp_file.write(text_data)
724
722
  tmp_file.seek(0)
725
-
726
723
  prepped = service.prepare_request('GET', url='', data=tmp_file)
727
724
  compressed = b''
728
725
  for chunk in prepped['data']:
729
726
  compressed += chunk
730
727
 
731
- assert compressed == gzip.compress(text_data.encode())
728
+ assert compressed == gzip.compress(text_data.encode(), mtime=None)
732
729
 
733
730
  # Make sure the decompression works fine.
734
731
  assert gzip.decompress(compressed).decode() == text_data
File without changes
@@ -0,0 +1,66 @@
1
+ # coding: utf-8
2
+
3
+ # Copyright 2024 IBM All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ import functools
18
+ import threading
19
+ import warnings
20
+ from typing import Callable, Optional
21
+ from http.server import HTTPServer, SimpleHTTPRequestHandler
22
+ from ssl import SSLContext
23
+
24
+ import urllib3
25
+
26
+
27
+ def local_server(
28
+ port: int, tls_version: Optional[int] = None, cert: Optional[str] = None, key: Optional[str] = None
29
+ ) -> Callable:
30
+ """local_server helps setting up and running an HTTP(S) server for testing purposes."""
31
+
32
+ def decorator(test_function: Callable) -> Callable:
33
+ @functools.wraps(test_function)
34
+ def inner(*args, **kwargs):
35
+ is_https = tls_version and cert and key
36
+ # Disable warnings caused by the self-signed certificate.
37
+ urllib3.disable_warnings()
38
+
39
+ if is_https:
40
+ # Build the SSL context for the server.
41
+ ssl_context = SSLContext(tls_version)
42
+ ssl_context.load_cert_chain(certfile=cert, keyfile=key)
43
+
44
+ # Create and start the server on a separate thread.
45
+ server = HTTPServer(('localhost', port), SimpleHTTPRequestHandler)
46
+ if is_https:
47
+ server.socket = ssl_context.wrap_socket(server.socket, server_side=True)
48
+
49
+ t = threading.Thread(target=server.serve_forever)
50
+ t.start()
51
+
52
+ # We run everything in a big try-except-finally block to make sure we always
53
+ # shutdown the HTTP server gracefully.
54
+ try:
55
+ test_function(*args, **kwargs)
56
+ except Exception: # pylint: disable=try-except-raise
57
+ raise
58
+ finally:
59
+ server.shutdown()
60
+ t.join()
61
+ # Re-enable warnings.
62
+ warnings.resetwarnings()
63
+
64
+ return inner
65
+
66
+ return decorator
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+
3
+ # Copyright 2024 IBM All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ import logging
18
+ from http import client
19
+ from ibm_cloud_sdk_core.logger import (
20
+ get_logger,
21
+ LoggingFilter,
22
+ )
23
+
24
+
25
+ def setup_test_logger(level: int):
26
+ """Sets up logging with the specified logging level to assist testcases."""
27
+ logging.basicConfig(level=level, format='%(asctime)s [%(name)s:%(levelname)s] %(message)s', force=True)
28
+ logger = get_logger()
29
+ logger.setLevel(level)
30
+
31
+ # If debug logging is requested, then trigger HTTP message logging as well.
32
+ if logger.isEnabledFor(logging.DEBUG):
33
+ client.HTTPConnection.debuglevel = 1
34
+ client.print = lambda *args: logger.debug(LoggingFilter.filter_message(" ".join(args)))
@@ -1 +0,0 @@
1
- include LICENSE
@@ -1 +0,0 @@
1
- __version__ = '3.24.2'