Bug 2276036

Summary: anaconda: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
Product: [Fedora] Fedora Reporter: Jan Stodola <jstodola>
Component: anacondaAssignee: anaconda-maint
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: anaconda-maint, besser82, kkoukiou, ksurma, mhroncok, rvykydal, slavik.vladimir, w
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-41.17-1.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-24 11:03:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2277759    
Bug Blocks: 2244836    

Description Jan Stodola 2024-04-19 08:05:11 UTC
The following warning can be found in journal when the installer is starting:

anaconda: misc: /usr/lib64/python3.12/site-packages/pyanaconda/core/users.py:31: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
  import crypt  # pylint: disable=deprecated-module

Python 3.13 is planned for Fedora 41:
https://fedoraproject.org/wiki/Releases/41/ChangeSet#Changes/Python3.13

Replace the usage of the crypt module before Python 3.13 lands in Rawhide.

Reproducible: Always

Comment 1 Radek Vykydal 2024-04-24 10:32:51 UTC
The yescript was made default for password hashing in https://fedoraproject.org/wiki/Changes/yescrypt_as_default_hashing_method_for_shadow
Related anaconda update PR: https://github.com/rhinstaller/anaconda/pull/3431

The crypt module is now deprecated, recommended replacements don't seem do provide the algorithm.

Björn, do you have any recommendation how we could run yescript from python when the crypt module is removed? Thank you.

Comment 2 Miro Hrončok 2024-04-29 07:16:51 UTC
We are about to package the removed crypt module as a standalone Python package. That should be useable in anaconda as a drop-in replacement.

Will keep you posted. The project is currently at https://github.com/fedora-python/crypt but it is not yet ready to be published on PyPI and packaged in Fedora. I estimate it will be ready this week.

Comment 3 Radek Vykydal 2024-04-29 13:49:54 UTC
Thank you!