Skip to content

Commit d25c92c

Browse files
mark-adamsjpadilla
authored andcommitted
Fix #351 by reverting argument name changes for .decode() (#352)
* Fix #351 by reverting argument name changes for .decode() * Update CHANGELOG and bump version to 1.6.4
1 parent dd753de commit d25c92c

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1212

1313
### Added
1414

15+
[v1.6.4][1.6.4]
16+
-------------------------------------------------------------------------
17+
### Fixed
18+
19+
- Reverse an unintentional breaking API change to .decode() [#352][352]
20+
1521
[v1.6.3][1.6.3]
1622
-------------------------------------------------------------------------
1723
### Changed
@@ -205,6 +211,7 @@ rarely used. Users affected by this should upgrade to 3.3+.
205211
[1.6.0]: https://github.com/jpadilla/pyjwt/compare/1.5.3...1.6.0
206212
[1.6.1]: https://github.com/jpadilla/pyjwt/compare/1.6.0...1.6.1
207213
[1.6.3]: https://github.com/jpadilla/pyjwt/compare/1.6.1...1.6.3
214+
[1.6.4]: https://github.com/jpadilla/pyjwt/compare/1.6.3...1.6.4
208215

209216
[109]: https://github.com/jpadilla/pyjwt/pull/109
210217
[110]: https://github.com/jpadilla/pyjwt/pull/110
@@ -250,5 +257,6 @@ rarely used. Users affected by this should upgrade to 3.3+.
250257
[340]: https://github.com/jpadilla/pyjwt/pull/340
251258
[344]: https://github.com/jpadilla/pyjwt/pull/344
252259
[350]: https://github.com/jpadilla/pyjwt/pull/350
260+
[352]: https://github.com/jpadilla/pyjwt/pull/352
253261
[7c1e61d]: https://github.com/jpadilla/pyjwt/commit/7c1e61dde27bafe16e7d1bb6e35199e778962742
254262
[7ca41e]: https://github.com/jpadilla/pyjwt/commit/7ca41e53b3d7d9f5cd31bdd8a2b832d192006239

jwt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
__title__ = 'pyjwt'
13-
__version__ = '1.6.3'
13+
__version__ = '1.6.4'
1414
__author__ = 'José Padilla'
1515
__license__ = 'MIT'
1616
__copyright__ = 'Copyright 2015-2018 José Padilla'

jwt/api_jws.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def encode(self,
128128
return b'.'.join(segments)
129129

130130
def decode(self,
131-
token, # type: str
131+
jwt, # type: str
132132
key='', # type: str
133133
verify=True, # type: bool
134134
algorithms=None, # type: List[str]
@@ -146,7 +146,7 @@ def decode(self,
146146
DeprecationWarning
147147
)
148148

149-
payload, signing_input, header, signature = self._load(token)
149+
payload, signing_input, header, signature = self._load(jwt)
150150

151151
if not verify:
152152
warnings.warn('The verify parameter is deprecated. '

jwt/api_jwt.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def encode(self,
6767
)
6868

6969
def decode(self,
70-
token, # type: str
70+
jwt, # type: str
7171
key='', # type: str
7272
verify=True, # type: bool
7373
algorithms=None, # type: List[str]
@@ -82,15 +82,15 @@ def decode(self,
8282
DeprecationWarning
8383
)
8484

85-
payload, _, _, _ = self._load(token)
85+
payload, _, _, _ = self._load(jwt)
8686

8787
if options is None:
8888
options = {'verify_signature': verify}
8989
else:
9090
options.setdefault('verify_signature', verify)
9191

9292
decoded = super(PyJWT, self).decode(
93-
token, key=key, algorithms=algorithms, options=options, **kwargs
93+
jwt, key=key, algorithms=algorithms, options=options, **kwargs
9494
)
9595

9696
try:

0 commit comments

Comments
 (0)