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 @@ ![build](https://img.shields.io/badge/build-passing-green?style=plastic) -![Coverage](https://raw.githubusercontent.com/contentstack/contentstack-python/b4edf799276f586dce3e57fa5502036cd5fd8da3/coverage.svg) ![pip](https://img.shields.io/badge/pip-v1.3.0-blue?style=plastic) ![python](https://img.shields.io/badge/python-3.5|3.6|3.7|3.8-blue?style=plastic) [![GitHub license](https://img.shields.io/github/license/contentstack/contentstack-python?style=plastic)](https://github.com/contentstack/contentstack-python/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/contentstack/contentstack-python?style=plastic)](https://github.com/contentstack/contentstack-python/stargazers) +![Coverage](https://raw.githubusercontent.com/contentstack/contentstack-python/b4edf799276f586dce3e57fa5502036cd5fd8da3/coverage.svg) ![pip](https://img.shields.io/badge/pip-v1.5.0-blue?style=plastic) ![python](https://img.shields.io/badge/python-3.5|3.6|3.7|3.8-blue?style=plastic) [![GitHub license](https://img.shields.io/github/license/contentstack/contentstack-python?style=plastic)](https://github.com/contentstack/contentstack-python/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/contentstack/contentstack-python?style=plastic)](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 @@ }

test-report.html

-

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

Environment

@@ -259,8 +259,8 @@

Environment

Python 3.8.5

Summary

-

96 tests ran in 7.57 seconds.

- 96 passed, 1 skipped, 0 failed, 0 errors, 0 expected failures, 0 unexpected passes +

100 tests ran in 6.63 seconds.

+ 100 passed, 1 skipped, 0 failed, 0 errors, 0 expected failures, 0 unexpected passes

Results

@@ -311,7 +311,7 @@

Results

- + - + - + - + - + - + - + - + - + +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 0x7fb40e1dd190>, 'Connection to cdn.contentstack.io timed out. (connect timeout=0.01)')': /v3/assets?environment=development&
@@ -550,7 +550,34 @@

Results

- + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + @@ -904,7 +940,7 @@

Results

- + - + - + - + - +
Passed tests/test_assets.py::TestAsset::test_01_assets_query_initial_run0.110.80
@@ -320,7 +320,7 @@

Results

Passed tests/test_assets.py::TestAsset::test_02_asset_method0.050.24
@@ -329,7 +329,7 @@

Results

Passed tests/test_assets.py::TestAsset::test_03_asset_uid0.060.18
@@ -338,7 +338,7 @@

Results

Passed tests/test_assets.py::TestAsset::test_04_asset_filetype0.050.14
@@ -402,7 +402,7 @@

Results

Passed tests/test_assets.py::TestAsset::test_09_assets_query0.060.13
@@ -411,7 +411,7 @@

Results

Passed tests/test_assets.py::TestAsset::test_10_assets_base_query_where_exclude_title0.050.09
@@ -420,7 +420,7 @@

Results

Passed tests/test_assets.py::TestAsset::test_11_assets_base_query_where_equals_str0.050.19
@@ -429,7 +429,7 @@

Results

Passed tests/test_assets.py::TestAsset::test_12_assets_base_query_where_exclude0.080.12
@@ -438,15 +438,15 @@

Results

Passed tests/test_assets.py::TestAsset::test_12_setting_timeout_failure0.150.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
Passed tests/test_assets.py::TestAsset::test_24_default_find_no_fallback0.080.25
+
No log output captured.
Passedtests/test_config.py::TestConfig::test_branch_variable0.00
+
No log output captured.
Passedtests/test_config.py::TestConfig::test_branching_header_branch_is_avail0.00
+
No log output captured.
Passedtests/test_config.py::TestConfig::test_branching_header_branch_key0.00
@@ -559,7 +586,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_01_run_initial_query0.050.13
@@ -568,7 +595,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_02_entry_by_uid0.050.06
@@ -586,7 +613,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_04_entry_locale0.370.40
@@ -595,7 +622,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_05_entry_version0.610.52
@@ -604,7 +631,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_06_entry_params0.320.06
@@ -613,7 +640,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_07_entry_base_only0.320.05
@@ -622,7 +649,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_08_entry_base_excepts0.190.07
@@ -631,7 +658,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_10_entry_base_include_reference_only0.510.06
@@ -640,7 +667,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_11_entry_base_include_reference_excepts0.350.07
@@ -649,7 +676,7 @@

Results

Passed tests/test_entry.py::TestEntry::test_12_entry_include_reference_github_issue0.330.06
@@ -723,12 +750,21 @@

Results

Passed tests/test_entry.py::TestEntry::test_20_entry_include_fallback1.340.84
------------------------------Captured stdout call------------------------------
Requesting fallback....
Passedtests/test_entry.py::TestEntry::test_21_entry_include_embedded_items0.44
+
No log output captured.
Passed
Passed tests/test_query.py::TestQuery::test_19_default_find_without_fallback0.090.05
@@ -913,7 +949,7 @@

Results

Passed tests/test_query.py::TestQuery::test_20_default_find_with_fallback0.060.04
@@ -1057,7 +1093,7 @@

Results

Passed tests/test_stack.py::TestStack::test_17_entry_with_sync_token1.060.41
@@ -1102,7 +1138,7 @@

Results

Passed tests/test_stack.py::TestStack::test_22_content_types_with_query_param0.050.06
@@ -1111,7 +1147,7 @@

Results

Passed tests/test_stack.py::TestStack::test__15_sync_pagination_with_invalid_pagination_token0.440.38