parent
e26858b221
commit
7749356596
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -34,15 +34,12 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
- "3.12"
|
||||
- "3.13"
|
||||
- "pypy-3.7"
|
||||
- "pypy-3.8"
|
||||
- "pypy-3.9"
|
||||
- "pypy-3.10"
|
||||
|
||||
|
||||
@ -15,6 +15,12 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
|
||||
|
||||
## [Unreleased](https://github.com/hynek/argon2-cffi/compare/23.1.0...HEAD)
|
||||
|
||||
### Removed
|
||||
|
||||
- Python 3.7 is not supported anymore.
|
||||
[#186](https://github.com/hynek/argon2-cffi/pull/186)
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
- `argon2.PasswordHasher.check_needs_rehash()` now also accepts bytes like the rest of the API.
|
||||
|
||||
@ -14,7 +14,7 @@ name = "argon2-cffi"
|
||||
description = "Argon2 for Python"
|
||||
authors = [{ name = "Hynek Schlawack", email = "hs@ox.cx" }]
|
||||
dynamic = ["version", "readme"]
|
||||
requires-python = ">=3.7"
|
||||
requires-python = ">=3.8"
|
||||
license = "MIT"
|
||||
keywords = ["password", "hash", "hashing", "security"]
|
||||
classifiers = [
|
||||
@ -25,7 +25,6 @@ classifiers = [
|
||||
"Operating System :: Microsoft :: Windows",
|
||||
"Operating System :: POSIX",
|
||||
"Operating System :: Unix",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
@ -37,10 +36,7 @@ classifiers = [
|
||||
"Topic :: Security :: Cryptography",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
]
|
||||
dependencies = [
|
||||
"argon2-cffi-bindings",
|
||||
"typing-extensions; python_version < '3.8'", # cf. _typing.py module
|
||||
]
|
||||
dependencies = ["argon2-cffi-bindings"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
tests = ["hypothesis", "pytest"]
|
||||
|
||||
@ -56,13 +56,9 @@ def __getattr__(name: str) -> str:
|
||||
msg = f"module {__name__} has no attribute {name}"
|
||||
raise AttributeError(msg)
|
||||
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
from importlib_metadata import metadata
|
||||
else:
|
||||
from importlib.metadata import metadata
|
||||
from importlib.metadata import metadata
|
||||
|
||||
warnings.warn(
|
||||
f"Accessing argon2.{name} is deprecated and will be "
|
||||
|
||||
@ -9,6 +9,8 @@ from __future__ import annotations
|
||||
import os
|
||||
import warnings
|
||||
|
||||
from typing import Literal
|
||||
|
||||
from ._password_hasher import (
|
||||
DEFAULT_HASH_LENGTH,
|
||||
DEFAULT_MEMORY_COST,
|
||||
@ -16,7 +18,6 @@ from ._password_hasher import (
|
||||
DEFAULT_RANDOM_SALT_LENGTH,
|
||||
DEFAULT_TIME_COST,
|
||||
)
|
||||
from ._typing import Literal
|
||||
from .low_level import Type, hash_secret, hash_secret_raw, verify_secret
|
||||
|
||||
|
||||
|
||||
@ -4,9 +4,8 @@ from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
from typing import ClassVar
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
from ._typing import Literal
|
||||
from ._utils import Parameters, _check_types, extract_parameters
|
||||
from .exceptions import InvalidHashError
|
||||
from .low_level import Type, hash_secret, verify_secret
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
# try/except ImportError does NOT work.
|
||||
# c.f. https://github.com/python/mypy/issues/8520
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import Literal
|
||||
else:
|
||||
from typing_extensions import Literal
|
||||
|
||||
__all__ = ["Literal"]
|
||||
@ -12,11 +12,10 @@ Low-level functions if you want to build your own higher level abstractions.
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import Enum
|
||||
from typing import Any
|
||||
from typing import Any, Literal
|
||||
|
||||
from _argon2_cffi_bindings import ffi, lib
|
||||
|
||||
from ._typing import Literal
|
||||
from .exceptions import HashingError, VerificationError, VerifyMismatchError
|
||||
|
||||
|
||||
|
||||
@ -1,18 +1,13 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
import sys
|
||||
|
||||
from importlib import metadata
|
||||
|
||||
import pytest
|
||||
|
||||
import argon2
|
||||
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
import importlib_metadata as metadata
|
||||
else:
|
||||
from importlib import metadata
|
||||
|
||||
|
||||
class TestLegacyMetadataHack:
|
||||
def test_version(self):
|
||||
"""
|
||||
|
||||
6
tox.ini
6
tox.ini
@ -3,7 +3,7 @@ min_version = 4
|
||||
env_list =
|
||||
pre-commit,
|
||||
mypy-pkg,
|
||||
py3{7,8,9,10,11,12,13}-{tests,mypy}
|
||||
py3{8,9,10,11,12,13}-{tests,mypy}
|
||||
py312-bindings-main,
|
||||
pypy3-tests,
|
||||
system-argon2,
|
||||
@ -27,7 +27,7 @@ commands =
|
||||
mypy: mypy tests/typing
|
||||
|
||||
|
||||
[testenv:py3{7,13}-tests]
|
||||
[testenv:py3{8,13}-tests]
|
||||
description = Run tests and measure coverage.
|
||||
deps =
|
||||
coverage[toml]
|
||||
@ -40,7 +40,7 @@ commands =
|
||||
[testenv:coverage-report]
|
||||
description = Report coverage over all test runs.
|
||||
skip_install = true
|
||||
depends = py3{7,13}-tests
|
||||
depends = py3{8,13}-tests
|
||||
deps = coverage[toml]
|
||||
parallel_show_output = true
|
||||
commands =
|
||||
|
||||
Loading…
Reference in New Issue
Block a user