Skip to content

fix(auth): replace deprecated passlib encrypt method with hash#1055

Open
MrButtCode wants to merge 1 commit intoCCExtractor:masterfrom
MrButtCode:fix/passlib-deprecation
Open

fix(auth): replace deprecated passlib encrypt method with hash#1055
MrButtCode wants to merge 1 commit intoCCExtractor:masterfrom
MrButtCode:fix/passlib-deprecation

Conversation

@MrButtCode
Copy link

Resolves a critical DeprecationWarning in mod_auth/models.py generated by passlib by migrating from the legacy .encrypt() method to the modern .hash() method.

The test suite was throwing: DeprecationWarning: the method passlib.context.CryptContext.encrypt() is deprecated as of Passlib 1.7...

While currently just a warning in Python 3.12, the underlying crypt module that older passlib methods rely on has been completely removed in Python 3.13 (PEP 594). By updating this to the modern .hash() API now, this PR hardens the authentication module for forward-compatibility, ensuring the platform doesn't hit a hard crash during future Python runtime upgrades.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant