Skip to content

Commit 0761543

Browse files
committed
Bump to version 2.2.0
1 parent e14a320 commit 0761543

30 files changed

+195
-76
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# CHANGELOG
22

33
## master
4+
5+
## v2.2.0
46
* Update tox and circleci test matrix to test against Python 3.8, 3.9, 3.10, 3.11 and 3.12
57
* Added ResourceLink resolution feature
68

contentful/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
from .content_type_field import ContentTypeField # noqa: F401
1212

1313

14-
__version__ = "2.1.1"
14+
__version__ = "2.2.0"
1515
__author__ = "Contentful GmbH"
1616
__email__ = "[email protected]"

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 7b32547add6bc95020fa0eeaffb6a530
3+
config: 6a62ff5200bf844b6efcb806c51b69ed
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_modules/contentful/array.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<html xmlns="http://www.w3.org/1999/xhtml">
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8-
<title>contentful.array &#8212; Contentful 2.1.1 documentation</title>
8+
<title>contentful.array &#8212; Contentful 2.2.0 documentation</title>
99
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
1010
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
1111
<script type="text/javascript">
1212
var DOCUMENTATION_OPTIONS = {
1313
URL_ROOT: '../../',
14-
VERSION: '2.1.1',
14+
VERSION: '2.2.0',
1515
COLLAPSE_INDEX: false,
1616
FILE_SUFFIX: '.html',
1717
HAS_SOURCE: true,

docs/_modules/contentful/asset.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<html xmlns="http://www.w3.org/1999/xhtml">
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8-
<title>contentful.asset &#8212; Contentful 2.1.1 documentation</title>
8+
<title>contentful.asset &#8212; Contentful 2.2.0 documentation</title>
99
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
1010
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
1111
<script type="text/javascript">
1212
var DOCUMENTATION_OPTIONS = {
1313
URL_ROOT: '../../',
14-
VERSION: '2.1.1',
14+
VERSION: '2.2.0',
1515
COLLAPSE_INDEX: false,
1616
FILE_SUFFIX: '.html',
1717
HAS_SOURCE: true,

docs/_modules/contentful/client.html

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<html xmlns="http://www.w3.org/1999/xhtml">
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8-
<title>contentful.client &#8212; Contentful 2.1.1 documentation</title>
8+
<title>contentful.client &#8212; Contentful 2.2.0 documentation</title>
99
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
1010
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
1111
<script type="text/javascript">
1212
var DOCUMENTATION_OPTIONS = {
1313
URL_ROOT: '../../',
14-
VERSION: '2.1.1',
14+
VERSION: '2.2.0',
1515
COLLAPSE_INDEX: false,
1616
FILE_SUFFIX: '.html',
1717
HAS_SOURCE: true,
@@ -41,7 +41,10 @@
4141
<div class="body" role="main">
4242

4343
<h1>Source code for contentful.client</h1><div class="highlight"><pre>
44-
<span></span><span class="kn">import</span> <span class="nn">requests</span>
44+
<span></span><span class="kn">import</span> <span class="nn">base64</span>
45+
<span class="kn">import</span> <span class="nn">json</span>
46+
47+
<span class="kn">import</span> <span class="nn">requests</span>
4548
<span class="kn">import</span> <span class="nn">platform</span>
4649
<span class="kn">from</span> <span class="nn">re</span> <span class="kn">import</span> <span class="n">sub</span>
4750
<span class="kn">from</span> <span class="nn">.utils</span> <span class="kn">import</span> <span class="n">ConfigurationException</span>
@@ -111,6 +114,7 @@ <h1>Source code for contentful.client</h1><div class="highlight"><pre>
111114
<span class="sd"> :param application_version: (optional) User application version, defaults to None.</span>
112115
<span class="sd"> :param integration_name: (optional) Integration name, defaults to None.</span>
113116
<span class="sd"> :param integration_version: (optional) Integration version, defaults to None.</span>
117+
<span class="sd"> :param additional_tokens: (optional) Additional tokens to be sent in the headers for resource resolution, defaults to None.</span>
114118
<span class="sd"> :return: :class:`Client &lt;Client&gt;` object.</span>
115119
<span class="sd"> :rtype: contentful.Client</span>
116120

@@ -149,7 +153,8 @@ <h1>Source code for contentful.client</h1><div class="highlight"><pre>
149153
<span class="n">application_name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
150154
<span class="n">application_version</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
151155
<span class="n">integration_name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
152-
<span class="n">integration_version</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
156+
<span class="n">integration_version</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
157+
<span class="n">additional_tokens</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
153158
<span class="bp">self</span><span class="o">.</span><span class="n">space_id</span> <span class="o">=</span> <span class="n">space_id</span>
154159
<span class="bp">self</span><span class="o">.</span><span class="n">access_token</span> <span class="o">=</span> <span class="n">access_token</span>
155160
<span class="bp">self</span><span class="o">.</span><span class="n">api_url</span> <span class="o">=</span> <span class="n">api_url</span>
@@ -175,6 +180,7 @@ <h1>Source code for contentful.client</h1><div class="highlight"><pre>
175180
<span class="bp">self</span><span class="o">.</span><span class="n">application_version</span> <span class="o">=</span> <span class="n">application_version</span>
176181
<span class="bp">self</span><span class="o">.</span><span class="n">integration_name</span> <span class="o">=</span> <span class="n">integration_name</span>
177182
<span class="bp">self</span><span class="o">.</span><span class="n">integration_version</span> <span class="o">=</span> <span class="n">integration_version</span>
183+
<span class="bp">self</span><span class="o">.</span><span class="n">additional_tokens</span> <span class="o">=</span> <span class="n">additional_tokens</span>
178184

179185
<span class="bp">self</span><span class="o">.</span><span class="n">_validate_configuration</span><span class="p">()</span>
180186
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">content_type_cache</span><span class="p">:</span>
@@ -541,6 +547,12 @@ <h1>Source code for contentful.client</h1><div class="highlight"><pre>
541547

542548
<span class="n">headers</span><span class="p">[</span><span class="s1">&#39;Accept-Encoding&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;gzip&#39;</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">gzip_encoded</span> <span class="k">else</span> <span class="s1">&#39;identity&#39;</span>
543549

550+
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">additional_tokens</span><span class="p">:</span>
551+
<span class="n">json_str</span> <span class="o">=</span> <span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">additional_tokens</span><span class="p">)</span>
552+
<span class="n">json_bytes</span> <span class="o">=</span> <span class="n">json_str</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
553+
<span class="n">base64_encoded</span> <span class="o">=</span> <span class="n">base64</span><span class="o">.</span><span class="n">b64encode</span><span class="p">(</span><span class="n">json_bytes</span><span class="p">)</span>
554+
<span class="n">headers</span><span class="p">[</span><span class="s1">&#39;x-contentful-resource-resolution&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">base64_encoded</span>
555+
544556
<span class="k">return</span> <span class="n">headers</span>
545557

546558
<span class="k">def</span> <span class="nf">_url</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">url</span><span class="p">):</span>

docs/_modules/contentful/content_type.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<html xmlns="http://www.w3.org/1999/xhtml">
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8-
<title>contentful.content_type &#8212; Contentful 2.1.1 documentation</title>
8+
<title>contentful.content_type &#8212; Contentful 2.2.0 documentation</title>
99
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
1010
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
1111
<script type="text/javascript">
1212
var DOCUMENTATION_OPTIONS = {
1313
URL_ROOT: '../../',
14-
VERSION: '2.1.1',
14+
VERSION: '2.2.0',
1515
COLLAPSE_INDEX: false,
1616
FILE_SUFFIX: '.html',
1717
HAS_SOURCE: true,

docs/_modules/contentful/content_type_cache.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<html xmlns="http://www.w3.org/1999/xhtml">
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8-
<title>contentful.content_type_cache &#8212; Contentful 2.1.1 documentation</title>
8+
<title>contentful.content_type_cache &#8212; Contentful 2.2.0 documentation</title>
99
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
1010
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
1111
<script type="text/javascript">
1212
var DOCUMENTATION_OPTIONS = {
1313
URL_ROOT: '../../',
14-
VERSION: '2.1.1',
14+
VERSION: '2.2.0',
1515
COLLAPSE_INDEX: false,
1616
FILE_SUFFIX: '.html',
1717
HAS_SOURCE: true,

docs/_modules/contentful/content_type_field.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<html xmlns="http://www.w3.org/1999/xhtml">
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8-
<title>contentful.content_type_field &#8212; Contentful 2.1.1 documentation</title>
8+
<title>contentful.content_type_field &#8212; Contentful 2.2.0 documentation</title>
99
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
1010
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
1111
<script type="text/javascript">
1212
var DOCUMENTATION_OPTIONS = {
1313
URL_ROOT: '../../',
14-
VERSION: '2.1.1',
14+
VERSION: '2.2.0',
1515
COLLAPSE_INDEX: false,
1616
FILE_SUFFIX: '.html',
1717
HAS_SOURCE: true,

docs/_modules/contentful/content_type_field_types.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<html xmlns="http://www.w3.org/1999/xhtml">
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8-
<title>contentful.content_type_field_types &#8212; Contentful 2.1.1 documentation</title>
8+
<title>contentful.content_type_field_types &#8212; Contentful 2.2.0 documentation</title>
99
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
1010
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
1111
<script type="text/javascript">
1212
var DOCUMENTATION_OPTIONS = {
1313
URL_ROOT: '../../',
14-
VERSION: '2.1.1',
14+
VERSION: '2.2.0',
1515
COLLAPSE_INDEX: false,
1616
FILE_SUFFIX: '.html',
1717
HAS_SOURCE: true,
@@ -160,9 +160,9 @@ <h1>Source code for contentful.content_type_field_types</h1><div class="highligh
160160
<span class="sd">&quot;&quot;&quot;</span>
161161
<span class="sd"> ResourceLinkField</span>
162162

163-
<span class="sd"> Nothing should be done here as ResourceLink does not support entity</span>
164-
<span class="sd"> resolution on the backend side and linked field can’t be used in</span>
165-
<span class="sd"> ordering and filtering queries.</span>
163+
<span class="sd"> Nothing should be done here as include resolution is handled within</span>
164+
<span class="sd"> entries.</span>
165+
<span class="sd"> Only present as a placeholder for proper resolution within ContentType.</span>
166166
<span class="sd"> &quot;&quot;&quot;</span>
167167
<span class="k">pass</span></div>
168168

0 commit comments

Comments
 (0)