From 2911447300d984c397b777b573f8c1014a45ea41 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 23 Feb 2024 14:52:02 -0500 Subject: [PATCH] Use non-deprecated name in pyproject.toml (#812) * Use non-deprecated name in pyproject.toml * Update secret.py --- pyproject.toml | 2 +- src/nacl/secret.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 57dae74c..9caa8ff1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = [ "setuptools>=40.8.0", "wheel", - "cffi>=1.4.1; python_implementation != 'PyPy'", + "cffi>=1.4.1; platform_python_implementation != 'PyPy'", ] build-backend = "setuptools.build_meta" diff --git a/src/nacl/secret.py b/src/nacl/secret.py index ba536a27..a1ac66bf 100644 --- a/src/nacl/secret.py +++ b/src/nacl/secret.py @@ -52,9 +52,9 @@ class SecretBox(encoding.Encodable, StringFixer): KEY_SIZE: ClassVar[int] = nacl.bindings.crypto_secretbox_KEYBYTES NONCE_SIZE: ClassVar[int] = nacl.bindings.crypto_secretbox_NONCEBYTES MACBYTES: ClassVar[int] = nacl.bindings.crypto_secretbox_MACBYTES - MESSAGEBYTES_MAX: ClassVar[ - int - ] = nacl.bindings.crypto_secretbox_MESSAGEBYTES_MAX + MESSAGEBYTES_MAX: ClassVar[int] = ( + nacl.bindings.crypto_secretbox_MESSAGEBYTES_MAX + ) def __init__( self, key: bytes, encoder: encoding.Encoder = encoding.RawEncoder