# PEP 594 has been implemented: Python 3.13 removes 20 stdlib modules

**URL:** <https://discuss.python.org/t/pep-594-has-been-implemented-python-3-13-removes-20-stdlib-modules/27124>\
**Category:** Core Development\
**Created:** [May 26, 2023, 2:39pm UTC](https://discuss.python.org/t/pep-594-has-been-implemented-python-3-13-removes-20-stdlib-modules/27124 "2023-05-26T14:39:32Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![hroncok](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/hroncok/32/18696_2.png) [@hroncok](https://discuss.python.org/u/hroncok)\
**Post date:** [April 30, 2024, 9:52pm UTC](https://discuss.python.org/t/pep-594-has-been-implemented-python-3-13-removes-20-stdlib-modules/27124/14 "2024-04-30T21:52:21Z")

</div>

I’d like to announce here that due to the [need to implement yescrypt in the Fedora installer](https://github.com/rhinstaller/anaconda/pull/3431), we have packaged [crypt\_r](https://github.com/fedora-python/crypt_r) as a standalone [package available from PyPI](https://pypi.org/project/crypt-r/).

> **[GitHub - fedora-python/crypt\_r: A copy of the crypt module that was removed...](https://github.com/fedora-python/crypt_r)**
>
> A copy of the crypt module that was removed in Python 3.13 - fedora-python/crypt\_r

It is a copy/fork of the removed standard library `crypt` module. Unlike `crypt`, our package always exposes the [crypt\_r(3)](https://manpages.debian.org/crypt_r(3)) function, not [crypt(3)](https://manpages.debian.org/crypt(3)). Note that `crypt_r` is not part of any standard. We tested the package with the `crypt_r` implementation in Fedora Linux (libxcrypt), and it should work with compatible implementations of `crypt_r` (such as `libcrypt.so` from older glibc).

To use this module, you can either import `crypt_r` explicitly or use the old `crypt` name for backward compatibility. However, on Python older than 3.13, the `crypt` module from the standard library will usually take precedence on `sys.path`.

From [PEP 594](https://peps.python.org/pep-0594/#crypt):

> - The module is not available on Windows. Cross-platform applications need an alternative implementation anyway.

This is acknowledged, `crypt_r` explicitly only supports Linux.

> - Only DES encryption is guaranteed to be available. DES has an extremely limited key space of 2\*\*56.

Other methods are available on modern Linux, such as Fedora Linux.

> - MD5, salted SHA256, salted SHA512, and Blowfish are optional extensions. SSHA256 and SSHA512 are glibc extensions. Blowfish (bcrypt) is the only algorithm that is still secure. However it’s in glibc and therefore not commonly available on Linux.

glibc extensions are available in Fedora Linux.

> - Depending on the platform, the `crypt` module is not thread safe. Only implementations with `crypt_r(3)` are thread safe.

`crypt_r` (the Python package) always uses `crypt_r` (the C function).

> - The module was never useful to interact with system user and password databases. On BSD, macOS, and Linux, all user authentication and password modification operations must go through PAM (pluggable authentication module); see the [spwd](https://docs.python.org/3/library/spwd.html) deprecation.

The module is useful for the Fedora installer.

* * *

We will maintain this package at least as long as the Fedora installer needs it (currently that means indefinitely), but we plan no future development, only bugfixes. Python 3.11+ is supported (Python 3.10 or older did not emit deprecation warnings for the `crypt` module).

---

_[View the full topic](https://discuss.python.org/t/pep-594-has-been-implemented-python-3-13-removes-20-stdlib-modules/27124)._
