Skip to content

Commit 6b4da6a

Browse files
committed
Fixed dependency to removed crypt module
1 parent 06d7ca5 commit 6b4da6a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ classifiers = [
2626
"Topic :: Software Development :: Libraries :: Python Modules",
2727
]
2828
dependencies = [
29+
"crypt-r; python_version >= '3.13'",
2930
"markdown2>=2.4.0",
3031
]
3132
dynamic = ["version"]

src/codext/hashing/crypt.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212

1313

1414
if UNIX:
15-
import crypt
15+
try:
16+
import crypt
17+
except ImportError:
18+
import crypt_r as crypt
1619

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

0 commit comments

Comments
 (0)