r/Python • • Oct 30 '26 • Heartwarming 1

Discussion I'm now maintaining passlib

Hi everyone, around a week ago passlib was transferred to me on PyPi after the previous maintainer became unreachable. I've been trying to maintain it in the meantime under a different PyPi name (libpass).

What's already been done:

  • fixed incompatibility with python>=3.13
  • fixed incompatibility with bcrypt>=5.0.0
  • type annotations added where possible

Since then some design choices from passlib original development made it obvious it would need refactor and/or API redesign at some point, a few examples that make code and public api hard to maintain and add correct type information:

  • PasswordHash representing both algorithm configuration and a produced hash
  • PasswordHash.using creating a subclass to substitute new parameters into it
  • Overuse of abstraction and multiple inheritance

I specifically would like input from people who depend on passlib in their codebase(s), which parts of the API, if changed in a breaking way would make migrating hard for you?

I'd also welcome opinions on how far a potential refactor should go. For example for CryptContext an interface like this looks preferable to me, as it makes type information easier to add:

ctx = CryptContext(
    schemes=[
        Argon2Hasher(time_cost=..., parallelism=...),
        SomeDeprecatedHasher(),
    ]
)

compared to current

ctx = CryptContext(
    schemes=["argon2", "deprecated_hash"],
    argon2__parallelism=...,
    argon2__time_cost=...,
    deprecated="auto",
)

I'd welcome co-maintainers, repository could be found here: https://github.com/notypecheck/passlib, even short-term involvement would be very much appreciated

167 Upvotes

25 comments sorted by

View all comments

Show parent comment

9

u/Amazing_Learn Oct 30 '26

Any help will be appreciated, I'm currently migrating docs to properdocs, and should be done soon, if you prefer you can contact me on discord: noel.py

5

u/ContemplateBeing Oct 30 '26

Not using discord, sorry. I’d rather use signal or WhatsApp. Feel free to dm me and let me know where you need help or just open a help-wanted issue on GitHub.

4

u/Amazing_Learn Oct 30 '26

Help-wanted issue is probably the best way then, you can either share your gh account here or in dm, so I could mention you when I get around to making that