Skip to content

Commit 230d1b8

Browse files
Bump pynacl from 1.4.0 to 1.5.0 (#658)
* Bump pynacl from 1.4.0 to 1.5.0 Bumps [pynacl](https://github.com/pyca/pynacl) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/pyca/pynacl/releases) - [Changelog](https://github.com/pyca/pynacl/blob/main/CHANGELOG.rst) - [Commits](pyca/pynacl@1.4.0...1.5.0) --- updated-dependencies: - dependency-name: pynacl dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update .mypy.ini * Update test_nacl_storage.py * Update test_nacl_storage.py * Fix Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sam Bull <[email protected]> Co-authored-by: Sam Bull <[email protected]>
1 parent 2a91724 commit 230d1b8

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

.mypy.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,5 @@ ignore_missing_imports = True
3636
[mypy-docker.*]
3737
ignore_missing_imports = True
3838

39-
[mypy-nacl.*]
40-
ignore_missing_imports = True
41-
4239
[mypy-psycopg2.*]
4340
ignore_missing_imports = True

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ multidict==5.2.0
1515
mypy==0.930
1616
pep257==0.7.0
1717
pre-commit==2.16.0
18-
pynacl==1.4.0
18+
pynacl==1.5.0
1919
pytest==6.2.5
2020
pytest-aiohttp==0.3.0
2121
pytest-cov==3.0.0

tests/test_nacl_storage.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ def make_cookie(
3434

3535
cookie_data = json.dumps(session_data).encode("utf-8")
3636
nonce = nacl.utils.random(nacl.secret.SecretBox.NONCE_SIZE)
37-
data = secretbox.encrypt(cookie_data, nonce, encoder=Base64Encoder).decode("utf-8")
37+
encr = secretbox.encrypt(cookie_data, nonce, encoder=Base64Encoder).decode("utf-8")
3838

39-
# Ignoring type until aiohttp#4252 is released
40-
client.session.cookie_jar.update_cookies({"AIOHTTP_SESSION": data}) # type: ignore
39+
client.session.cookie_jar.update_cookies({"AIOHTTP_SESSION": encr})
4140

4241

4342
def create_app(
@@ -59,13 +58,13 @@ def decrypt(secretbox: nacl.secret.SecretBox, cookie_value: str) -> Any:
5958

6059

6160
@pytest.fixture
62-
def secretbox(key: bytes) -> nacl.secret.SecretBox: # type: ignore[misc] # No nacl types # noqa
61+
def secretbox(key: bytes) -> nacl.secret.SecretBox:
6362
return nacl.secret.SecretBox(key)
6463

6564

6665
@pytest.fixture
6766
def key() -> bytes:
68-
return nacl.utils.random(nacl.secret.SecretBox.KEY_SIZE) # type: ignore[no-any-return] # noqa
67+
return nacl.utils.random(nacl.secret.SecretBox.KEY_SIZE)
6968

7069

7170
async def test_create_new_session(

0 commit comments

Comments
 (0)