mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-14 10:36:58 +01:00
Chore: Drop Python 3.9 support (#7774)
This commit is contained in:
parent
5e687d9a93
commit
e6f59472e4
44 changed files with 970 additions and 1066 deletions
|
|
@ -1,9 +1,7 @@
|
|||
import base64
|
||||
import os
|
||||
from argparse import ArgumentParser
|
||||
from typing import Optional
|
||||
from typing import TypedDict
|
||||
from typing import Union
|
||||
|
||||
from cryptography.fernet import Fernet
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
|
|
@ -103,7 +101,7 @@ class CryptMixin:
|
|||
},
|
||||
]
|
||||
|
||||
def get_crypt_params(self) -> dict[str, dict[str, Union[str, int]]]:
|
||||
def get_crypt_params(self) -> dict[str, dict[str, str | int]]:
|
||||
return {
|
||||
EXPORTER_CRYPTO_SETTINGS_NAME: {
|
||||
EXPORTER_CRYPTO_ALGO_NAME: self.kdf_algorithm,
|
||||
|
|
@ -128,7 +126,7 @@ class CryptMixin:
|
|||
EXPORTER_CRYPTO_SALT_NAME
|
||||
]
|
||||
|
||||
def setup_crypto(self, *, passphrase: str, salt: Optional[str] = None):
|
||||
def setup_crypto(self, *, passphrase: str, salt: str | None = None):
|
||||
"""
|
||||
Constructs a class for encryption or decryption using the specified passphrase and salt
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue