|
1 | 1 | # Upgrade Guide
|
2 | 2 |
|
3 |
| -_After `6.0.0` all `MINOR` and `MAJOR` version bumps will have upgrade notes |
| 3 | +_`MAJOR` version bumps will have upgrade notes |
4 | 4 | posted here._
|
5 | 5 |
|
| 6 | +[2021-09-22] 6.x.x to 7.x.x |
| 7 | +--------------------------- |
| 8 | +### Overview |
| 9 | +Version `7.x.x` is the first version that officially drops support for Python versions 2.7, 3.4, and 3.5. |
| 10 | +#### Removal of files and dependencies that were added to support Python 2.7, 3.4, and 3.5: |
| 11 | +- [Six](https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L4) |
| 12 | + - Removed use of `u` a fake unicode literal |
| 13 | + - Removed use of `b` a fake bytes literal |
| 14 | + - Removed `PY3` a boolean indicating if the code is running on Python 3 |
| 15 | + - `text_type` type for representing (Unicode) textual data --> `str` |
| 16 | + - `iteritems` returns an iterator over dictionary’s items --> `items` |
| 17 | + - `string_types` possible types for text data like basestring() in Python 2 and str in Python 3.--> `str` |
| 18 | +- [twilio/compat.py](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) |
| 19 | + - `from twilio.compat import urlencode` --> `from urllib.parse import urlencode` |
| 20 | + - `izip` --> `zip` |
| 21 | +- [twilio/jwt/compat.py](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) |
| 22 | + - Removed `compat.compare_digest` |
| 23 | +- [twilio/jwt/__init__.py](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) |
| 24 | + - Removed import for `simplejson` and `json` |
| 25 | + |
| 26 | +#### Updated dependencies |
| 27 | +- [Updated PyJWT to >=2.0.0](https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L6) |
| 28 | + |
| 29 | +### CHANGED - [Remove the ability to override the `algorithm` in `Jwt.to_jwt()`](https://github.com/twilio/twilio-python/pull/560/commits/dab158f429015e0894217d6503f55b517c27c474). |
| 30 | +#### Removed the ability to override the algorithm while using a jwt access token: |
| 31 | +```python |
| 32 | +// 6.x.x |
| 33 | +from twilio.jwt.access_token import AccessToken |
| 34 | +token.to_jwt(algorithm='HS512') |
| 35 | +``` |
| 36 | +```python |
| 37 | +// 7.x.x |
| 38 | +from twilio.jwt.access_token import AccessToken |
| 39 | +token.to_jwt() |
| 40 | +``` |
| 41 | + |
6 | 42 | [2017-09-28] 6.6.x to 6.7.x
|
7 | 43 | ---------------------------
|
8 | 44 |
|
|
0 commit comments