kvesteri / sqlalchemy-utils

Various utility functions and datatypes for SQLAlchemy.
Other
1.27k stars 322 forks source link

DeprecationWarning: 'crypt' is deprecated #721

Closed phillipuniverse closed 1 year ago

phillipuniverse commented 1 year ago

Here's the stack trace when importing. Specifically this happens when I run force_auto_coercion()

../../Library/Caches/pypoetry/virtualenvs/myproj-u2DHQYKX-py3.11/lib/python3.11/site-packages/sqlalchemy_utils/__init__.py:59: in <module>
    from .types import (  # noqa
../../Library/Caches/pypoetry/virtualenvs/myproj-u2DHQYKX-py3.11/lib/python3.11/site-packages/sqlalchemy_utils/types/__init__.py:20: in <module>
    from .password import Password, PasswordType  # noqa
../../Library/Caches/pypoetry/virtualenvs/myproj-u2DHQYKX-py3.11/lib/python3.11/site-packages/sqlalchemy_utils/types/password.py:13: in <module>
    from passlib.context import LazyCryptContext
../../Library/Caches/pypoetry/virtualenvs/myproj-u2DHQYKX-py3.11/lib/python3.11/site-packages/passlib/context.py:16: in <module>
    from passlib.registry import get_crypt_handler, _validate_handler_name
../../Library/Caches/pypoetry/virtualenvs/myproj-u2DHQYKX-py3.11/lib/python3.11/site-packages/passlib/registry.py:12: in <module>
    from passlib.ifc import PasswordHash
../../Library/Caches/pypoetry/virtualenvs/myproj-u2DHQYKX-py3.11/lib/python3.11/site-packages/passlib/ifc.py:10: in <module>
    from passlib.utils.decor import deprecated_method
../../Library/Caches/pypoetry/virtualenvs/myproj-u2DHQYKX-py3.11/lib/python3.11/site-packages/passlib/utils/__init__.py:854: in <module>
    from crypt import crypt as _crypt
../../.pyenv/versions/3.11.6/lib/python3.11/crypt.py:20: in <module>
    warnings._deprecated(__name__, remove=(3, 13))
../../.pyenv/versions/3.11.6/lib/python3.11/warnings.py:514: in _deprecated
    warn(msg, DeprecationWarning, stacklevel=3)
E   DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
phillipuniverse commented 1 year ago

After opening I discovered this is already tracked at https://github.com/kvesteri/sqlalchemy-utils/issues/646