Use a different version attribute name (#679)

This commit is contained in:
Alex Gaynor 2023-11-27 18:07:13 -05:00 committed by GitHub
parent 6b35bd30a7
commit ffa0e2c5fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -183,7 +183,9 @@ fn _bcrypt(_py: pyo3::Python<'_>, m: &pyo3::types::PyModule) -> pyo3::PyResult<(
m.add("__uri__", "https://github.com/pyca/bcrypt/")?;
// When updating this, also update pyproject.toml
m.add("__version__", "4.1.1")?;
// This isn't named __version__ because passlib treats the existence of
// that attribute as proof that we're a different module
m.add("__version_ex__", "4.1.1")?;
let author = "The Python Cryptographic Authority developers";
m.add("__author__", author)?;

View File

@ -18,12 +18,14 @@ from ._bcrypt import (
__summary__,
__title__,
__uri__,
__version__,
checkpw,
gensalt,
hashpw,
kdf,
)
from ._bcrypt import (
__version_ex__ as __version__,
)
__all__ = [
"gensalt",