Quickstart guide seems to be wrong about `deprecated` param to CryptContext
Created originally on Bitbucket by Anonymous
This is the suggested setup in the New Application Quickstart Guide:
#!python
pwd_context = CryptContext(
# ...
# Automatically mark all but first hasher in list as deprecated.
# (this will be the default in Passlib 2.0)
deprecated="auto",
# ...
)
but the code uses this check:
#!python
if 'auto' in value:
suggesting that the docs should actually say to use deprecated=["auto"]
.
Interestingly, I've been passing deprecated="auto"
, which hasn't caused any errors but presumably also doesn't do the right thing – I only ran into this when starting to do some type-checking, and trying to work out what types the CryptContext's arguments are.