Skip to content

Commit

Permalink
Fixed dependency to removed crypt module
Browse files Browse the repository at this point in the history
  • Loading branch information
dhondta committed Jan 6, 2025
1 parent 06d7ca5 commit 6b4da6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"crypt-r; python_version >= '3.13'",
"markdown2>=2.4.0",
]
dynamic = ["version"]
Expand Down
5 changes: 4 additions & 1 deletion src/codext/hashing/crypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@


if UNIX:
import crypt
try:
import crypt
except ImportError:
import crypt_r as crypt

METHODS = [x[7:].lower() for x in crypt.__dict__ if x.startswith("METHOD_")]

Expand Down

0 comments on commit 6b4da6a

Please sign in to comment.