<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/cryptography.git/tests/test_fernet.py, branch dependabot/github_actions/actions/setup-python-2.3.1</title>
<subtitle>github.com: pyca/cryptography.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/'/>
<entry>
<title>Final polish on removing backends from places they aren't required (#6644)</title>
<updated>2021-11-21T21:01:31+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2021-11-21T21:01:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=d09e1eda2bd4f489c5fc7078b58cabb0aa3a7aed'/>
<id>d09e1eda2bd4f489c5fc7078b58cabb0aa3a7aed</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove requires_backend_interface from tests because it was useless (#5884)</title>
<updated>2021-03-01T17:59:24+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2021-03-01T17:59:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=245d15b5636392113af7db501196fd2930f776f8'/>
<id>245d15b5636392113af7db501196fd2930f776f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>enable mypy over tests (#5721)</title>
<updated>2021-02-01T00:27:41+00:00</updated>
<author>
<name>Paul Kehrer</name>
<email>paul.l.kehrer@gmail.com</email>
</author>
<published>2021-02-01T00:27:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=343ac1344a2a6657743a71109e5db06bb6fa4e70'/>
<id>343ac1344a2a6657743a71109e5db06bb6fa4e70</id>
<content type='text'>
* clean mypy with tests dir

* remove most no_type_check annotations

* le sigh

* remove unneeded comments</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* clean mypy with tests dir

* remove most no_type_check annotations

* le sigh

* remove unneeded comments</pre>
</div>
</content>
</entry>
<entry>
<title>Apply type annotations to fernet (#5708)</title>
<updated>2021-01-29T21:39:20+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2021-01-29T21:39:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=db9e20a4cefdf8802d89740d54188d9c53975fe4'/>
<id>db9e20a4cefdf8802d89740d54188d9c53975fe4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Complete removal of py2 (#5533)</title>
<updated>2020-12-09T15:13:48+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2020-12-09T15:13:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=e66db8079d3fbd0110e87ece1fd48f4bfd9e48b9'/>
<id>e66db8079d3fbd0110e87ece1fd48f4bfd9e48b9</id>
<content type='text'>
* Drop Python 2

* Black everything</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Drop Python 2

* Black everything</pre>
</div>
</content>
</entry>
<entry>
<title>Remove __future__ import from our code (#5610)</title>
<updated>2020-12-09T06:35:11+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2020-12-09T06:35:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=e0477596f7117845aa2d8768bf1b75162b3d915b'/>
<id>e0477596f7117845aa2d8768bf1b75162b3d915b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch black to py36 as the minimum version (#5608)</title>
<updated>2020-12-09T05:40:21+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2020-12-09T05:40:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=7d4e567e16521288197aed23506f9370beadef66'/>
<id>7d4e567e16521288197aed23506f9370beadef66</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>new black, actually slightly different than the old black (#5429)</title>
<updated>2020-08-27T02:59:43+00:00</updated>
<author>
<name>Paul Kehrer</name>
<email>paul.l.kehrer@gmail.com</email>
</author>
<published>2020-08-27T02:59:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=bda138768ae1231481a1c9a2f6afcbf016d934f1'/>
<id>bda138768ae1231481a1c9a2f6afcbf016d934f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Paint it Black by the Rolling Stones (#5324)</title>
<updated>2020-07-20T18:06:29+00:00</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@gmail.com</email>
</author>
<published>2020-07-20T18:06:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=60aa04481fb187334a783c2d9facc3fe814af5d1'/>
<id>60aa04481fb187334a783c2d9facc3fe814af5d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Disallow ttl=None in (Multi)Fernet.decrypt_at_time() (#5280)</title>
<updated>2020-06-25T01:51:54+00:00</updated>
<author>
<name>Jakub Stasiak</name>
<email>jakub@stasiak.at</email>
</author>
<published>2020-06-25T01:51:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cryptography.git/commit/?id=97193752945cd62eef4371f7c8c04e7806d9e37b'/>
<id>97193752945cd62eef4371f7c8c04e7806d9e37b</id>
<content type='text'>
* Disallow ttl=None in (Multi)Fernet.decrypt_at_time()

Since the introduction of the _at_time() methods in #5256[1] there's
been this little voice in the back of my mind telling me that maybe it's
not the best idea to allow ttl=None in decrypt_at_time(). It's been like
this for convenience and code reuse reasons.

Then I submitted a patch for cryptography stubs in typeshed[2] and I had
to decide whether to define decrypt_at_time()'s ttl as int and be
incompatible with cryptography's behavior or Optional[int] and advertise
an API that can be misused much too easily. I went ahead with int.

Considering the above I decided to propose this patch. Some amount of
redundancy (and a new test to properly cover the
MultiFernet.decrypt_at_time() implementation) is a price to prevent
clients from shooting themselves in the foot with the tll=None gun since
setting ttl to None disabled timestamp checks even if current_time was
provided.

[1] https://github.com/pyca/cryptography/pull/5256
[2] https://github.com/python/typeshed/pull/4238

* Actually test the return value here

* Fix formatting</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Disallow ttl=None in (Multi)Fernet.decrypt_at_time()

Since the introduction of the _at_time() methods in #5256[1] there's
been this little voice in the back of my mind telling me that maybe it's
not the best idea to allow ttl=None in decrypt_at_time(). It's been like
this for convenience and code reuse reasons.

Then I submitted a patch for cryptography stubs in typeshed[2] and I had
to decide whether to define decrypt_at_time()'s ttl as int and be
incompatible with cryptography's behavior or Optional[int] and advertise
an API that can be misused much too easily. I went ahead with int.

Considering the above I decided to propose this patch. Some amount of
redundancy (and a new test to properly cover the
MultiFernet.decrypt_at_time() implementation) is a price to prevent
clients from shooting themselves in the foot with the tll=None gun since
setting ttl to None disabled timestamp checks even if current_time was
provided.

[1] https://github.com/pyca/cryptography/pull/5256
[2] https://github.com/python/typeshed/pull/4238

* Actually test the return value here

* Fix formatting</pre>
</div>
</content>
</entry>
</feed>
