Deprecate use of Python crypt (#78257)

pull/78271/head
Matt Martz 2 years ago committed by GitHub
parent bc3686c784
commit de810d5799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
deprecated_features:
- Encryption - Deprecate use of the Python crypt module due to it's impending removal from Python 3.13

@ -99,6 +99,15 @@ class CryptHash(BaseHash):
if algorithm not in self.algorithms:
raise AnsibleError("crypt.crypt does not support '%s' algorithm" % self.algorithm)
display.deprecated(
"Encryption using the Python crypt module is deprecated. The "
"Python crypt module is deprecated and will be removed from "
"Python 3.13. Install the passlib library for continued "
"encryption functionality.",
version=2.17
)
self.algo_data = self.algorithms[algorithm]
def hash(self, secret, salt=None, salt_size=None, rounds=None, ident=None):

Loading…
Cancel
Save