Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-104773: PEP 594: Remove the crypt module#104908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:remove_crypt
May 25, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedMay 24, 2023
edited by github-actionsbot
Loading

Remove the crypt module and its private _crypt extension, deprecated in Python 3.11.


📚 Documentation preview 📚:https://cpython-previews--104908.org.readthedocs.build/

@vstinner
Copy link
MemberAuthor

Using^\s*(import crypt\b|from crypt\b) regex, I found the following PyPI top 5,000 projects using the removed crypt module.

Affected projects (8):

  • Django (4.2)
  • Twisted (22.10.0)
  • ansible (7.4.0)
  • ansible-core (2.14.4)
  • htpasswd (2.3)
  • passlib (1.7.4)
  • pyftpdlib (1.5.7)
  • pytest-testinfra (7.0.0)
Code:
Django-4.2/tests/auth_tests/test_hashers.py: import cryptansible-7.4.0/ansible_collections/community/general/plugins/modules/homectl.py: import cryptansible-7.4.0/ansible_collections/community/general/plugins/modules/udm_user.py: import cryptTwisted-22.10.0/src/twisted/conch/test/test_checkers.py: import cryptTwisted-22.10.0/src/twisted/cred/test/test_cred.py: from crypt import crypt as _cryptTwisted-22.10.0/src/twisted/plugins/cred_unix.py: import cryptansible-core-2.14.4/lib/ansible/utils/encrypt.py: import cryptpasslib-1.7.4/passlib/tests/utils.py: from crypt import cryptpasslib-1.7.4/passlib/utils/__init__.py: from crypt import crypt as _cryptpyftpdlib-1.5.7/pyftpdlib/authorizers.py: import cryptpytest-testinfra-7.0.0/test/test_modules.py: import crypthtpasswd-2.3/htpasswd/basic.py: from crypt import crypt

@vstinner
Copy link
MemberAuthor

passlib (1.7.4)

It's interesting that the proposed replacement for the removed crypt module actually uses crypt internally (in/passlib/utils/__init__.py) :-)

@hugovk
Copy link
Member

Are these bits still needed?

Lib/ctypes/util.py366:            print(f"crypt\t:: {find_library('crypt')}")367:            print(f"crypt\t:: {cdll.LoadLibrary(find_library('crypt'))}")373:            print(find_library("crypt"))

Remove the crypt module and its private _crypt extension, deprecatedin Python 3.11.
@vstinner
Copy link
MemberAuthor

Are these bits still needed?

IMO we should keep it. I saw this test in ctypes. I don't see any direct relationship with the Python crypt module. It's just a test to load a dynamic library which is commonly available on Unix.

hugovk reacted with thumbs up emoji

@corona10
Copy link
Member

image

hugovk, vstinner, and HoBeom reacted with laugh emoji

@vstinnervstinner merged commite4127ea intopython:mainMay 25, 2023
@vstinnervstinner deleted the remove_crypt branchMay 25, 2023 13:47
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@hugovkhugovkhugovk approved these changes

@zwarezwarezware approved these changes

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

@corona10corona10Awaiting requested review from corona10corona10 is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@vstinner@hugovk@corona10@zware@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp