Bug 2276036 - anaconda: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
Summary: anaconda: DeprecationWarning: 'crypt' is deprecated and slated for removal in...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: anaconda-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2277759
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-04-19 08:05 UTC by Jan Stodola
Modified: 2024-05-24 11:03 UTC (History)
8 users (show)

Fixed In Version: anaconda-41.17-1.fc41
Clone Of:
Environment:
Last Closed: 2024-05-24 11:03:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources anaconda pull-request 156 0 None None None 2024-05-07 15:37:34 UTC
Github rhinstaller anaconda pull 5628 0 None Draft Use the standalone crypt_r package on Fedora 41+ 2024-04-30 12:48:14 UTC
Red Hat Issue Tracker INSTALLER-3710 0 None None None 2024-04-19 08:36:22 UTC

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!


Note You need to log in before you can comment on or make changes to this bug.