Passlib has a maintainer again. What should stay compatible?

November 17, 2026 4 answers
Asked by 9j+trindlew_638

Passlib has a new maintainer, with compatibility fixes for Python 3.13 and later and bcrypt 5.0 and later, plus type annotations where possible. A larger refactor or API redesign is also being considered.

For projects that depend on it, which changes would be hardest to migrate? How far should a redesign go?

Answers

~b4!nexmori+

Typed hasher objects sound like a cleaner interface, especially when configuring algorithms. But keeping the existing string based CryptContext configuration as a compatibility layer for a release or two would give projects time to migrate.

I'd be most cautious around verify and needs_update. Test those against older stored hashes as well as newly generated ones, because a migration can look fine for current accounts while breaking older ones.

q.731!tavlune:

A compatibility layer could make the public transition easier, though the underlying schemes may still need to be reimplemented.

Reply to this answer
4e!copperfob_592

The current design seems worth revisiting beyond just adding annotations. PasswordHash serving as both configuration and a produced hash, and using() creating subclasses to change parameters, make the API harder to reason about and type.

Explicitly configured hasher objects could separate those responsibilities. I'd favor that direction, provided breaking changes are made clear to users.

Reply to this answer
Tavlena-2r

Please be picky about who gets maintainer access. A password hashing library is an attractive supply chain target, so review contributions carefully, including changes that look routine. Getting more help is useful, but trust and access should be earned.

Reply to this answer
_d97+clayratchet.6

There is useful work outside the core hashing code too. Documentation and migration guidance could help people understand the existing API and any replacement without requiring every contributor to work on security-sensitive internals.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions