From 85f8365dfff1e85200339c6af3ad6131145292f5 Mon Sep 17 00:00:00 2001 From: Jennifer Mah Date: Mon, 19 Jul 2021 10:56:03 -0700 Subject: [PATCH 1/6] docs: Add upgrade guide for dropping python 2.7, 3.4 & 3.5 --- UPGRADE.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/UPGRADE.md b/UPGRADE.md index e3398eb735..5ff37926fe 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,8 +1,33 @@ # Upgrade Guide -_After `6.0.0` all `MINOR` and `MAJOR` version bumps will have upgrade notes +_`MAJOR` version bumps will have upgrade notes posted here._ +[2021-07-XX] 6.x.x to 7.x.x +--------------------------- +### Overview +Version `7.x.x` is the first version that officially drops support for Python versions 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: +- [Six](https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L4) + - Removed use of `u` a fake unicode literal + - Removed use of `b` a fake bytes literal + - Removed `PY3` a boolean indicating if the code is running on Python 3 + - `text_type` type for representing (Unicode) textual data --> `str` + - `iteritems` returns an iterator over dictionary’s items --> `items` + - `string_types` possible types for text data like basestring() in Python 2 and str in Python 3.--> `str` +- [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) + - `from twilio.compat import urlencode` --> `from urllib.parse import urlencode` + - `izip` --> `zip` +- [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) + - Removed `compat.compare_digest` +- [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) + - Removed import for `simplejson` and `json` + +####Updated dependencies +- [Updated PyJWT to >=2.0.0](https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L6) + +### CHANGED - [Remove the ability to override the `algorithm` in `Jwt.to_jwt()`](https://github.com/karls/twilio-python/commit/dab158f429015e0894217d6503f55b517c27c474). + [2017-09-28] 6.6.x to 6.7.x --------------------------- From cb1bf5e1c7b124913449302483a45147159ed55f Mon Sep 17 00:00:00 2001 From: Jennifer Mah Date: Tue, 20 Jul 2021 16:25:38 -0700 Subject: [PATCH 2/6] add example and missing space --- UPGRADE.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 5ff37926fe..866a15f715 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -3,7 +3,7 @@ _`MAJOR` version bumps will have upgrade notes posted here._ -[2021-07-XX] 6.x.x to 7.x.x +[2021-XX-XX] 6.x.x to 7.x.x --------------------------- ### Overview Version `7.x.x` is the first version that officially drops support for Python versions 2.7, 3.4, and 3.5. @@ -23,11 +23,23 @@ Version `7.x.x` is the first version that officially drops support for Python ve - [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) - Removed import for `simplejson` and `json` -####Updated dependencies +#### Updated dependencies - [Updated PyJWT to >=2.0.0](https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L6) ### CHANGED - [Remove the ability to override the `algorithm` in `Jwt.to_jwt()`](https://github.com/karls/twilio-python/commit/dab158f429015e0894217d6503f55b517c27c474). +#### 6.x.x +```python +from twilio.jwt.access_token import AccessToken +token.to_jwt(algorithm='HS512') +``` + +#### 7.X.x +```python +from twilio.jwt.access_token import AccessToken +token.to_jwt() +``` + [2017-09-28] 6.6.x to 6.7.x --------------------------- From d06926b097ce7aa9fe0908197d98278dd23c9c0f Mon Sep 17 00:00:00 2001 From: Jennifer Mah Date: Wed, 21 Jul 2021 09:02:06 -0700 Subject: [PATCH 3/6] lower case x in version --- UPGRADE.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 866a15f715..d59b6f487b 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -26,16 +26,15 @@ Version `7.x.x` is the first version that officially drops support for Python ve #### Updated dependencies - [Updated PyJWT to >=2.0.0](https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L6) -### CHANGED - [Remove the ability to override the `algorithm` in `Jwt.to_jwt()`](https://github.com/karls/twilio-python/commit/dab158f429015e0894217d6503f55b517c27c474). - -#### 6.x.x +### CHANGED - [Remove the ability to override the `algorithm` in `Jwt.to_jwt()`](https://github.com/karls/twilio-python/commit/dab158f429015e0894217d6503f55b517c27c474). +#### Removed the ability to override the algorithm while using a jwt access token: ```python +// 6.x.x from twilio.jwt.access_token import AccessToken token.to_jwt(algorithm='HS512') ``` - -#### 7.X.x ```python +// 7.x.x from twilio.jwt.access_token import AccessToken token.to_jwt() ``` From 040e2857ebadf8e506bc675678fba0685f2f866c Mon Sep 17 00:00:00 2001 From: Jennifer Mah Date: Wed, 21 Jul 2021 09:24:42 -0700 Subject: [PATCH 4/6] fix override algorithm PR link --- UPGRADE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE.md b/UPGRADE.md index d59b6f487b..715b357996 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -26,7 +26,7 @@ Version `7.x.x` is the first version that officially drops support for Python ve #### Updated dependencies - [Updated PyJWT to >=2.0.0](https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L6) -### CHANGED - [Remove the ability to override the `algorithm` in `Jwt.to_jwt()`](https://github.com/karls/twilio-python/commit/dab158f429015e0894217d6503f55b517c27c474). +### CHANGED - [Remove the ability to override the `algorithm` in `Jwt.to_jwt()`](https://github.com/twilio/twilio-python/pull/560/commits/dab158f429015e0894217d6503f55b517c27c474). #### Removed the ability to override the algorithm while using a jwt access token: ```python // 6.x.x From 46397d79666d2873774659f4ee69fa7f45f8388d Mon Sep 17 00:00:00 2001 From: Jennifer Mah Date: Wed, 21 Jul 2021 09:30:41 -0700 Subject: [PATCH 5/6] remove extra space --- UPGRADE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE.md b/UPGRADE.md index 715b357996..753a1b0aee 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -7,7 +7,7 @@ posted here._ --------------------------- ### Overview Version `7.x.x` is the first version that officially drops support for Python versions 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: +#### Removal of files and dependencies that were added to support Python 2.7, 3.4, and 3.5: - [Six](https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L4) - Removed use of `u` a fake unicode literal - Removed use of `b` a fake bytes literal From 0f8064d23825bc5f654829e750a715d1b22f1169 Mon Sep 17 00:00:00 2001 From: Jennifer Mah Date: Tue, 17 Aug 2021 09:07:03 -0700 Subject: [PATCH 6/6] add MVR date --- UPGRADE.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 753a1b0aee..a337e2c1f4 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,9 +1,9 @@ # Upgrade Guide -_`MAJOR` version bumps will have upgrade notes +_`MAJOR` version bumps will have upgrade notes posted here._ -[2021-XX-XX] 6.x.x to 7.x.x +[2021-09-22] 6.x.x to 7.x.x --------------------------- ### Overview Version `7.x.x` is the first version that officially drops support for Python versions 2.7, 3.4, and 3.5. @@ -12,8 +12,8 @@ Version `7.x.x` is the first version that officially drops support for Python ve - Removed use of `u` a fake unicode literal - Removed use of `b` a fake bytes literal - Removed `PY3` a boolean indicating if the code is running on Python 3 - - `text_type` type for representing (Unicode) textual data --> `str` - - `iteritems` returns an iterator over dictionary’s items --> `items` + - `text_type` type for representing (Unicode) textual data --> `str` + - `iteritems` returns an iterator over dictionary’s items --> `items` - `string_types` possible types for text data like basestring() in Python 2 and str in Python 3.--> `str` - [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) - `from twilio.compat import urlencode` --> `from urllib.parse import urlencode` @@ -22,7 +22,7 @@ Version `7.x.x` is the first version that officially drops support for Python ve - Removed `compat.compare_digest` - [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) - Removed import for `simplejson` and `json` - + #### Updated dependencies - [Updated PyJWT to >=2.0.0](https://github.com/twilio/twilio-python/pull/560/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552L6)