<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pyjwt.git/tests, branch version-2.0.1</title>
<subtitle>github.com: progrium/pyjwt.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/'/>
<entry>
<title>Combine repetitive encode/decode tests using parametrize (#577)</title>
<updated>2020-12-22T02:34:32+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-22T02:34:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=09d24fc9fd916a8e3ebc3bf993340893d74991ee'/>
<id>09d24fc9fd916a8e3ebc3bf993340893d74991ee</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Combine identical test functions using pytest.mark.parametrize() (#574)</title>
<updated>2020-12-21T19:28:11+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-21T19:28:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=06523a08c6c64e2438d2259adeed3ed6bedabacb'/>
<id>06523a08c6c64e2438d2259adeed3ed6bedabacb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify black configuration to be closer to upstream defaults (#568)</title>
<updated>2020-12-21T16:30:48+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-21T16:30:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=811ae79ceaae8ad9bbad24c30e2d3dd4d920e4df'/>
<id>811ae79ceaae8ad9bbad24c30e2d3dd4d920e4df</id>
<content type='text'>
* Simplify black configuration to be closer to upstream defaults

Avoid extra configuration by simply going with Black defaults. This
allows removing some configuration options, thus simplifying the overall
configuration.

It also makes the code style closer to community conventions. As more
projects adopt black formatting, more code will look like the black
defaults.

Further, the default 88 tends to create more readable lines, IMO. The
black rationale is located at:
https://black.readthedocs.io/en/stable/the_black_code_style.html#line-length

* Update tests/test_api_jws.py

Co-authored-by: José Padilla &lt;jpadilla@webapplicate.com&gt;

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update tests/test_api_jws.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: José Padilla &lt;jpadilla@webapplicate.com&gt;
Co-authored-by: pre-commit-ci[bot] &lt;66853113+pre-commit-ci[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Simplify black configuration to be closer to upstream defaults

Avoid extra configuration by simply going with Black defaults. This
allows removing some configuration options, thus simplifying the overall
configuration.

It also makes the code style closer to community conventions. As more
projects adopt black formatting, more code will look like the black
defaults.

Further, the default 88 tends to create more readable lines, IMO. The
black rationale is located at:
https://black.readthedocs.io/en/stable/the_black_code_style.html#line-length

* Update tests/test_api_jws.py

Co-authored-by: José Padilla &lt;jpadilla@webapplicate.com&gt;

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update tests/test_api_jws.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: José Padilla &lt;jpadilla@webapplicate.com&gt;
Co-authored-by: pre-commit-ci[bot] &lt;66853113+pre-commit-ci[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Prefer ModuleNotFoundError over ImportError (#565)</title>
<updated>2020-12-21T16:05:53+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-21T16:05:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=541dd0dd8cafacc0aff9fa36cf04251c535f69eb'/>
<id>541dd0dd8cafacc0aff9fa36cf04251c535f69eb</id>
<content type='text'>
ModuleNotFoundError was introduced in Python 3. It is raised when the
module does not exist. On the other hand, ImportError is raised during
any import failure. For example, a syntax error or other runtime error.

Using ModuleNotFoundError means that errors unrelated to a missing
package will be propagated to the user. PyJWT doesn't know how to handle
these.

This also allows more functions to always be available for import</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ModuleNotFoundError was introduced in Python 3. It is raised when the
module does not exist. On the other hand, ImportError is raised during
any import failure. For example, a syntax error or other runtime error.

Using ModuleNotFoundError means that errors unrelated to a missing
package will be propagated to the user. PyJWT doesn't know how to handle
these.

This also allows more functions to always be available for import</pre>
</div>
</content>
</entry>
<entry>
<title>Add utility functions to assist test skipping (#563)</title>
<updated>2020-12-19T23:40:27+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-19T23:40:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=9acab9cad0ee536f41aca39f5d4cf09680bf1ffb'/>
<id>9acab9cad0ee536f41aca39f5d4cf09680bf1ffb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Split PyJWT/PyJWS classes to tighten type interfaces (#559)</title>
<updated>2020-12-19T23:32:12+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-19T23:32:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=94d102b2e38d09f3c5ec459a8365de8a86c51fe5'/>
<id>94d102b2e38d09f3c5ec459a8365de8a86c51fe5</id>
<content type='text'>
The class PyJWT was previously a subclass of PyJWS. However, this
combination does not follow the Liskov substitution principle. That is,
using PyJWT in place of a PyJWS would not produce correct results or
follow type contracts.

While these classes look to share a common interface it doesn't go
beyond the method names "encode" and "decode" and so is merely
superficial.

The classes have been split into two. PyJWT now uses composition instead
of inheritance to achieve the desired behavior. Splitting the classes in
this way allowed for precising the type interfaces.

The complete parameter to .decode() has been removed. This argument was
used to alter the return type of .decode(). Now, there are two different
methods with more explicit return types and values. The new method name
is .decode_complete(). This fills the previous role filled by
.decode(..., complete=True).

Closes #554, #396, #394

Co-authored-by: Sam Bull &lt;git@sambull.org&gt;

Co-authored-by: Sam Bull &lt;git@sambull.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The class PyJWT was previously a subclass of PyJWS. However, this
combination does not follow the Liskov substitution principle. That is,
using PyJWT in place of a PyJWS would not produce correct results or
follow type contracts.

While these classes look to share a common interface it doesn't go
beyond the method names "encode" and "decode" and so is merely
superficial.

The classes have been split into two. PyJWT now uses composition instead
of inheritance to achieve the desired behavior. Splitting the classes in
this way allowed for precising the type interfaces.

The complete parameter to .decode() has been removed. This argument was
used to alter the return type of .decode(). Now, there are two different
methods with more explicit return types and values. The new method name
is .decode_complete(). This fills the previous role filled by
.decode(..., complete=True).

Closes #554, #396, #394

Co-authored-by: Sam Bull &lt;git@sambull.org&gt;

Co-authored-by: Sam Bull &lt;git@sambull.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Do not mutate the input payload in PyJWT.encode() (#557)</title>
<updated>2020-12-19T14:09:13+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-19T14:09:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=2e1e69d4ddfddaba35b6ee99ead1b430654ed661'/>
<id>2e1e69d4ddfddaba35b6ee99ead1b430654ed661</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify mocked_response test utility function (#560)</title>
<updated>2020-12-19T14:06:39+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-19T14:06:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=2e9f866f3b9f0542ba80c1b986b6129b63a694c6'/>
<id>2e9f866f3b9f0542ba80c1b986b6129b63a694c6</id>
<content type='text'>
No need to create a fixture with a nested function. This can be a simple
utility function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No need to create a fixture with a nested function. This can be a simple
utility function.</pre>
</div>
</content>
</entry>
<entry>
<title>Replace int_from_bytes() with builtin int.from_bytes() (#549)</title>
<updated>2020-12-18T00:26:33+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-18T00:26:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=bf39b44f60a94a456b03f4e312f26cc7d82630f5'/>
<id>bf39b44f60a94a456b03f4e312f26cc7d82630f5</id>
<content type='text'>
Follows upstream cryptography commit:
https://github.com/pyca/cryptography/commit/5528a3182fdd6ed1c44c126d451a87bcf39e79de

Since Python 3.2, this bytes to an int is a native feature.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follows upstream cryptography commit:
https://github.com/pyca/cryptography/commit/5528a3182fdd6ed1c44c126d451a87bcf39e79de

Since Python 3.2, this bytes to an int is a native feature.</pre>
</div>
</content>
</entry>
<entry>
<title>Tighten bytes/str boundaries and remove unnecessary coercing (#547)</title>
<updated>2020-12-17T20:09:56+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-12-17T20:09:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyjwt.git/commit/?id=97cd4031549d363fa34737635eab33491fa718fe'/>
<id>97cd4031549d363fa34737635eab33491fa718fe</id>
<content type='text'>
Now that the project is Python 3 only, the boundaries between bytes and
Unicode strings is more explicit.

This allows removing several unnecessary force_bytes() and
force_unicode() calls that handled differences between Python 2 and
Python 3. All uses of force_unicode() have been removed.

For values that are known to be bytes, use `.decode()` instead. For
values are that known to be str, use `.encode()` instead. This strategy
makes the type explicit and reduces a function call.

Key handling continues to use force_bytes() to allow callers to pass
either bytes or str.

To help enforce bytes/str handling in the future, the `-b` option is
passed to Python when testing. This option will emit a warning if bytes
and str are improperly mixed together.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the project is Python 3 only, the boundaries between bytes and
Unicode strings is more explicit.

This allows removing several unnecessary force_bytes() and
force_unicode() calls that handled differences between Python 2 and
Python 3. All uses of force_unicode() have been removed.

For values that are known to be bytes, use `.decode()` instead. For
values are that known to be str, use `.encode()` instead. This strategy
makes the type explicit and reduces a function call.

Key handling continues to use force_bytes() to allow callers to pass
either bytes or str.

To help enforce bytes/str handling in the future, the `-b` option is
passed to Python when testing. This option will emit a warning if bytes
and str are improperly mixed together.</pre>
</div>
</content>
</entry>
</feed>
