|
10 | 10 | })(window,document,'script','dataLayer','GTM-MWRD6S');</script><!--End Google Tag Manager-->
|
11 | 11 | <meta content="IE=Edge" http-equiv="X-UA-Compatible"/>
|
12 | 12 | <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
|
13 |
| -<title>Upgrade Guide — twilio-python 6.63.2 documentation</title> |
| 13 | +<title>Upgrade Guide — twilio-python 7.0.0 documentation</title> |
14 | 14 | <link href="_static/alabaster.css" rel="stylesheet" type="text/css"/>
|
15 | 15 | <link href="_static/pygments.css" rel="stylesheet" type="text/css"/>
|
16 | 16 | <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js" type="text/javascript"></script>
|
|
29 | 29 | <div class="body" role="main">
|
30 | 30 | <div class="section" id="upgrade-guide">
|
31 | 31 | <h1>Upgrade Guide<a class="headerlink" href="#upgrade-guide" title="Permalink to this headline">¶</a></h1>
|
32 |
| -<p><em>After <code class="docutils literal notranslate"><span class="pre">6.0.0</span></code> all <code class="docutils literal notranslate"><span class="pre">MINOR</span></code> and <code class="docutils literal notranslate"><span class="pre">MAJOR</span></code> version bumps will have upgrade notes |
| 32 | +<p><em><code class="docutils literal notranslate"><span class="pre">MAJOR</span></code> version bumps will have upgrade notes |
33 | 33 | posted here.</em></p>
|
| 34 | +<div class="section" id="x-x-to-7-x-x"> |
| 35 | +<h2>[2021-09-22] 6.x.x to 7.x.x<a class="headerlink" href="#x-x-to-7-x-x" title="Permalink to this headline">¶</a></h2> |
| 36 | +<div class="section" id="overview"> |
| 37 | +<h3>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h3> |
| 38 | +<p>Version <code class="docutils literal notranslate"><span class="pre">7.x.x</span></code> is the first version that officially drops support for Python versions 2.7, 3.4, and 3.5.</p> |
| 39 | +<div class="section" id="removal-of-files-and-dependencies-that-were-added-to-support-python-2-7-3-4-and-3-5"> |
| 40 | +<h4>Removal of files and dependencies that were added to support Python 2.7, 3.4, and 3.5:<a class="headerlink" href="#removal-of-files-and-dependencies-that-were-added-to-support-python-2-7-3-4-and-3-5" title="Permalink to this headline">¶</a></h4> |
| 41 | +<ul class="simple"> |
| 42 | +<li><a class="reference external" href="https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L4">Six</a><ul> |
| 43 | +<li>Removed use of <code class="docutils literal notranslate"><span class="pre">u</span></code> a fake unicode literal</li> |
| 44 | +<li>Removed use of <code class="docutils literal notranslate"><span class="pre">b</span></code> a fake bytes literal</li> |
| 45 | +<li>Removed <code class="docutils literal notranslate"><span class="pre">PY3</span></code> a boolean indicating if the code is running on Python 3</li> |
| 46 | +<li><code class="docutils literal notranslate"><span class="pre">text_type</span></code> type for representing (Unicode) textual data –> <code class="docutils literal notranslate"><span class="pre">str</span></code></li> |
| 47 | +<li><code class="docutils literal notranslate"><span class="pre">iteritems</span></code> returns an iterator over dictionary’s items –> <code class="docutils literal notranslate"><span class="pre">items</span></code></li> |
| 48 | +<li><code class="docutils literal notranslate"><span class="pre">string_types</span></code> possible types for text data like basestring() in Python 2 and str in Python 3.–> <code class="docutils literal notranslate"><span class="pre">str</span></code></li> |
| 49 | +</ul> |
| 50 | +</li> |
| 51 | +<li><a class="reference external" href="https://github.com/twilio/twilio-python/pull/560/files?file-filters%5B%5D=.md&file-filters%5B%5D=.py&file-filters%5B%5D=.toml&file-filters%5B%5D=.txt&file-filters%5B%5D=.yml&file-filters%5B%5D=No+extension#diff-e327449701a8717c94e1a084cdfc7dbf334c634cddf3867058b8f991d2de52c1L1">twilio/compat.py</a><ul> |
| 52 | +<li><code class="docutils literal notranslate"><span class="pre">from</span> <span class="pre">twilio.compat</span> <span class="pre">import</span> <span class="pre">urlencode</span></code> –> <code class="docutils literal notranslate"><span class="pre">from</span> <span class="pre">urllib.parse</span> <span class="pre">import</span> <span class="pre">urlencode</span></code></li> |
| 53 | +<li><code class="docutils literal notranslate"><span class="pre">izip</span></code> –> <code class="docutils literal notranslate"><span class="pre">zip</span></code></li> |
| 54 | +</ul> |
| 55 | +</li> |
| 56 | +<li><a class="reference external" href="https://github.com/twilio/twilio-python/pull/560/files?file-filters%5B%5D=.md&file-filters%5B%5D=.py&file-filters%5B%5D=.toml&file-filters%5B%5D=.txt&file-filters%5B%5D=.yml&file-filters%5B%5D=No+extension#diff-03276a6bdd4ecdf37ab6bedf60032dd05f640e1b470e4353badc787d80ba73d5L1">twilio/jwt/compat.py</a><ul> |
| 57 | +<li>Removed <code class="docutils literal notranslate"><span class="pre">compat.compare_digest</span></code></li> |
| 58 | +</ul> |
| 59 | +</li> |
| 60 | +<li><a class="reference external" href="https://github.com/twilio/twilio-python/pull/560/files?file-filters%5B%5D=.ini&file-filters%5B%5D=.py&file-filters%5B%5D=.yml#diff-9152dd65476e69cc34a307781d5cef195070f48da5670ed0934fd34a9ac91150L12-L16">twilio/jwt/<strong>init</strong>.py</a><ul> |
| 61 | +<li>Removed import for <code class="docutils literal notranslate"><span class="pre">simplejson</span></code> and <code class="docutils literal notranslate"><span class="pre">json</span></code></li> |
| 62 | +</ul> |
| 63 | +</li> |
| 64 | +</ul> |
| 65 | +</div> |
| 66 | +<div class="section" id="updated-dependencies"> |
| 67 | +<h4>Updated dependencies<a class="headerlink" href="#updated-dependencies" title="Permalink to this headline">¶</a></h4> |
| 68 | +<ul class="simple"> |
| 69 | +<li><a class="reference external" href="https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L6">Updated PyJWT to >=2.0.0</a></li> |
| 70 | +</ul> |
| 71 | +</div> |
| 72 | +</div> |
| 73 | +<div class="section" id="changed-remove-the-ability-to-override-the-algorithm-in-jwt-to-jwt"> |
| 74 | +<h3>CHANGED - <a class="reference external" href="https://github.com/twilio/twilio-python/pull/560/commits/dab158f429015e0894217d6503f55b517c27c474">Remove the ability to override the <code class="docutils literal notranslate"><span class="pre">algorithm</span></code> in <code class="docutils literal notranslate"><span class="pre">Jwt.to_jwt()</span></code></a>.<a class="headerlink" href="#changed-remove-the-ability-to-override-the-algorithm-in-jwt-to-jwt" title="Permalink to this headline">¶</a></h3> |
| 75 | +<div class="section" id="removed-the-ability-to-override-the-algorithm-while-using-a-jwt-access-token"> |
| 76 | +<h4>Removed the ability to override the algorithm while using a jwt access token:<a class="headerlink" href="#removed-the-ability-to-override-the-algorithm-while-using-a-jwt-access-token" title="Permalink to this headline">¶</a></h4> |
| 77 | +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="o">//</span> <span class="mf">6.</span><span class="n">x</span><span class="o">.</span><span class="n">x</span> |
| 78 | +<span class="kn">from</span> <span class="nn">twilio.jwt.access_token</span> <span class="kn">import</span> <span class="n">AccessToken</span> |
| 79 | +<span class="n">token</span><span class="o">.</span><span class="n">to_jwt</span><span class="p">(</span><span class="n">algorithm</span><span class="o">=</span><span class="s1">'HS512'</span><span class="p">)</span> |
| 80 | +</pre></div> |
| 81 | +</div> |
| 82 | +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="o">//</span> <span class="mf">7.</span><span class="n">x</span><span class="o">.</span><span class="n">x</span> |
| 83 | +<span class="kn">from</span> <span class="nn">twilio.jwt.access_token</span> <span class="kn">import</span> <span class="n">AccessToken</span> |
| 84 | +<span class="n">token</span><span class="o">.</span><span class="n">to_jwt</span><span class="p">()</span> |
| 85 | +</pre></div> |
| 86 | +</div> |
| 87 | +</div> |
| 88 | +</div> |
| 89 | +</div> |
34 | 90 | <div class="section" id="x-to-6-7-x">
|
35 | 91 | <h2>[2017-09-28] 6.6.x to 6.7.x<a class="headerlink" href="#x-to-6-7-x" title="Permalink to this headline">¶</a></h2>
|
36 | 92 | <div class="section" id="changed-body-parameter-on-chat-message-creation-is-no-longer-required">
|
@@ -77,6 +133,18 @@ <h3>Useful Links</h3>
|
77 | 133 | <h3><a href="index.html">Table of Contents</a></h3>
|
78 | 134 | <ul>
|
79 | 135 | <li><a class="reference internal" href="#">Upgrade Guide</a><ul>
|
| 136 | +<li><a class="reference internal" href="#x-x-to-7-x-x">[2021-09-22] 6.x.x to 7.x.x</a><ul> |
| 137 | +<li><a class="reference internal" href="#overview">Overview</a><ul> |
| 138 | +<li><a class="reference internal" href="#removal-of-files-and-dependencies-that-were-added-to-support-python-2-7-3-4-and-3-5">Removal of files and dependencies that were added to support Python 2.7, 3.4, and 3.5:</a></li> |
| 139 | +<li><a class="reference internal" href="#updated-dependencies">Updated dependencies</a></li> |
| 140 | +</ul> |
| 141 | +</li> |
| 142 | +<li><a class="reference internal" href="#changed-remove-the-ability-to-override-the-algorithm-in-jwt-to-jwt">CHANGED - Remove the ability to override the <code class="docutils literal notranslate"><span class="pre">algorithm</span></code> in <code class="docutils literal notranslate"><span class="pre">Jwt.to_jwt()</span></code>.</a><ul> |
| 143 | +<li><a class="reference internal" href="#removed-the-ability-to-override-the-algorithm-while-using-a-jwt-access-token">Removed the ability to override the algorithm while using a jwt access token:</a></li> |
| 144 | +</ul> |
| 145 | +</li> |
| 146 | +</ul> |
| 147 | +</li> |
80 | 148 | <li><a class="reference internal" href="#x-to-6-7-x">[2017-09-28] 6.6.x to 6.7.x</a><ul>
|
81 | 149 | <li><a class="reference internal" href="#changed-body-parameter-on-chat-message-creation-is-no-longer-required">CHANGED - <code class="docutils literal notranslate"><span class="pre">Body</span></code> parameter on Chat <code class="docutils literal notranslate"><span class="pre">Message</span></code> creation is no longer required.</a><ul>
|
82 | 150 | <li><a class="reference internal" href="#rationale">Rationale</a></li>
|
|
0 commit comments