diff --git a/.talismanrc b/.talismanrc new file mode 100644 index 0000000..afb4a06 --- /dev/null +++ b/.talismanrc @@ -0,0 +1 @@ +threshold: medium \ No newline at end of file diff --git a/README.md b/README.md index 52236bd..2b093a4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@  -   [](https://github.com/contentstack/contentstack-python/blob/master/LICENSE) [](https://github.com/contentstack/contentstack-python/stargazers) +   [](https://github.com/contentstack/contentstack-python/blob/master/LICENSE) [](https://github.com/contentstack/contentstack-python/stargazers) ## Python SDK for Contentstack @@ -129,7 +129,7 @@ Read through to understand how to use the Sync API with Contentstack Python SDK. ### The MIT License (MIT) -Copyright © 2012-2020 [`Contentstack`](https://www.contentstack.com/). All Rights Reserved +Copyright © 2012-2021 [`Contentstack`](https://www.contentstack.com/). All Rights Reserved Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/contentstack/__init__.py b/contentstack/__init__.py index 19e8a5e..f6dacad 100644 --- a/contentstack/__init__.py +++ b/contentstack/__init__.py @@ -18,6 +18,6 @@ __title__ = 'contentstack-python' __author__ = 'Contentstack' __status__ = 'debug' -__version__ = '1.3.0' +__version__ = '1.5.0' __endpoint__ = 'cdn.contentstack.io' __email__ = 'shailesh.mishra@contentstack.com' diff --git a/contentstack/stack.py b/contentstack/stack.py index 2f61e3b..bf64308 100644 --- a/contentstack/stack.py +++ b/contentstack/stack.py @@ -90,10 +90,10 @@ def __validate_stack(self): self.headers = {'api_key': self.api_key, 'access_token': self.delivery_token, 'environment': self.environment} self.http_instance = HTTPSConnection(endpoint=self.endpoint, - headers=self.headers, timeout=self.timeout, retry_strategy=self.retry_strategy) + headers=self.headers, timeout=self.timeout, + retry_strategy=self.retry_strategy) # call httpRequest instance & pass the endpoint and headers - @property def get_api_key(self): """ diff --git a/requirements.txt b/requirements.txt index a203650..f79280b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ twython~=3.8.2 setuptools~=51.1.0 urllib3~=1.26.2 -contentstack_utils~=1.0.0 +contentstack-utils==1.1.0 python-dateutil==2.8.1 requests>=2.20.0,<3.0 coverage==4.3.4 diff --git a/setup.py b/setup.py index 21d888f..5c3f4c9 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ type="process", created="09 Jun 2020", keywords="contentstack-python", - version="1.4.0", + version="1.5.0", author="Contentstack", author_email="shailesh.mishra@contentstack.com", description="Contentstack is a headless CMS with an API-first approach.", diff --git a/tests/report/test-report.html b/tests/report/test-report.html index f440181..82825fb 100644 --- a/tests/report/test-report.html +++ b/tests/report/test-report.html @@ -243,7 +243,7 @@ }
Report generated on 13-Mar-2021 at 16:41:40 by pytest-html v3.1.1
+Report generated on 08-May-2021 at 16:05:18 by pytest-html v3.1.1
| Python | 3.8.5 |
96 tests ran in 7.57 seconds.
-(Un)check the boxes to filter the results.
96 passed, 1 skipped, 0 failed, 0 errors, 0 expected failures, 0 unexpected passes +100 tests ran in 6.63 seconds.
+(Un)check the boxes to filter the results.
100 passed, 1 skipped, 0 failed, 0 errors, 0 expected failures, 0 unexpected passes| Passed | tests/test_assets.py::TestAsset::test_01_assets_query_initial_run | -0.11 | +0.80 | |
@@ -320,7 +320,7 @@ Results | ||||
| Passed | tests/test_assets.py::TestAsset::test_02_asset_method | -0.05 | +0.24 | |
@@ -329,7 +329,7 @@ Results | ||||
| Passed | tests/test_assets.py::TestAsset::test_03_asset_uid | -0.06 | +0.18 | |
@@ -338,7 +338,7 @@ Results | ||||
| Passed | tests/test_assets.py::TestAsset::test_04_asset_filetype | -0.05 | +0.14 | |
@@ -402,7 +402,7 @@ Results | ||||
| Passed | tests/test_assets.py::TestAsset::test_09_assets_query | -0.06 | +0.13 | |
@@ -411,7 +411,7 @@ Results | ||||
| Passed | tests/test_assets.py::TestAsset::test_10_assets_base_query_where_exclude_title | -0.05 | +0.09 | |
@@ -420,7 +420,7 @@ Results | ||||
| Passed | tests/test_assets.py::TestAsset::test_11_assets_base_query_where_equals_str | -0.05 | +0.19 | |
@@ -429,7 +429,7 @@ Results | ||||
| Passed | tests/test_assets.py::TestAsset::test_12_assets_base_query_where_exclude | -0.08 | +0.12 | |
@@ -438,15 +438,15 @@ Results | ||||
| Passed | tests/test_assets.py::TestAsset::test_12_setting_timeout_failure | -0.15 | +0.12 | |
|
-------------------------------Captured log call-------------------------------- WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='cdn.contentstack.io', port=443): Read timed out. (read timeout=0.01)")': /v3/assets?environment=development& -WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='cdn.contentstack.io', port=443): Read timed out. (read timeout=0.01)")': /v3/assets?environment=development& -WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='cdn.contentstack.io', port=443): Read timed out. (read timeout=0.01)")': /v3/assets?environment=development& +WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fb40e1ccc10>, 'Connection to cdn.contentstack.io timed out. (connect timeout=0.01)')': /v3/assets?environment=development& +WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fb40e1ccdc0>, 'Connection to cdn.contentstack.io timed out. (connect timeout=0.01)')': /v3/assets?environment=development& WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='cdn.contentstack.io', port=443): Read timed out. (read timeout=0.01)")': /v3/assets?environment=development& -WARNING urllib3.connectionpool:connectionpool.py:780 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f98eaf234f0>, 'Connection to cdn.contentstack.io timed out. (connect timeout=0.01)')': /v3/assets?environment=development& | ||||
| Passed | @@ -550,7 +550,34 @@||||
| Passed | tests/test_assets.py::TestAsset::test_24_default_find_no_fallback | -0.08 | +0.25 | +|
|
+ No log output captured. | ||||
| Passed | +tests/test_config.py::TestConfig::test_branch_variable | +0.00 | +||
|
+ No log output captured. | ||||
| Passed | +tests/test_config.py::TestConfig::test_branching_header_branch_is_avail | +0.00 | +||
|
+ No log output captured. | ||||
| Passed | +tests/test_config.py::TestConfig::test_branching_header_branch_key | +0.00 | ||
@@ -559,7 +586,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_01_run_initial_query | -0.05 | +0.13 | |
@@ -568,7 +595,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_02_entry_by_uid | -0.05 | +0.06 | |
@@ -586,7 +613,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_04_entry_locale | -0.37 | +0.40 | |
@@ -595,7 +622,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_05_entry_version | -0.61 | +0.52 | |
@@ -604,7 +631,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_06_entry_params | -0.32 | +0.06 | |
@@ -613,7 +640,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_07_entry_base_only | -0.32 | +0.05 | |
@@ -622,7 +649,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_08_entry_base_excepts | -0.19 | +0.07 | |
@@ -631,7 +658,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_10_entry_base_include_reference_only | -0.51 | +0.06 | |
@@ -640,7 +667,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_11_entry_base_include_reference_excepts | -0.35 | +0.07 | |
@@ -649,7 +676,7 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_12_entry_include_reference_github_issue | -0.33 | +0.06 | |
@@ -723,12 +750,21 @@ Results | ||||
| Passed | tests/test_entry.py::TestEntry::test_20_entry_include_fallback | -1.34 | +0.84 | |
|
------------------------------Captured stdout call------------------------------ Requesting fallback.... | ||||
| Passed | +tests/test_entry.py::TestEntry::test_21_entry_include_embedded_items | +0.44 | +||
|
+ No log output captured. | ||||
| Passed | @@ -904,7 +940,7 @@||||
| Passed | tests/test_query.py::TestQuery::test_19_default_find_without_fallback | -0.09 | +0.05 | |
@@ -913,7 +949,7 @@ Results | ||||
| Passed | tests/test_query.py::TestQuery::test_20_default_find_with_fallback | -0.06 | +0.04 | |
@@ -1057,7 +1093,7 @@ Results | ||||
| Passed | tests/test_stack.py::TestStack::test_17_entry_with_sync_token | -1.06 | +0.41 | |
@@ -1102,7 +1138,7 @@ Results | ||||
| Passed | tests/test_stack.py::TestStack::test_22_content_types_with_query_param | -0.05 | +0.06 | |
@@ -1111,7 +1147,7 @@ Results | ||||
| Passed | tests/test_stack.py::TestStack::test__15_sync_pagination_with_invalid_pagination_token | -0.44 | +0.38 | |