Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use legacycrypt where crypt isn't available #601

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

s-t-e-v-e-n-k
Copy link

Since Python 3.13 has removed the crypt module, add legacycrypt to the requirements if we're using that version of Python, importing it if the crypt module isn't found.

Fixes #594

@itdependsnetworks
Copy link
Contributor

Thanks for this!!

just a few things

  1. we have to make this optional. Can you add to [tool.poetry.extras] and make it optional =true
  2. Change the import to only happen within the function and raise an error if not installed.

Since Python 3.13 has removed the crypt module, add legacycrypt to the
optional requirements, attempting to import it if the crypt module
isn't found.

Fixes networktocode#594
@s-t-e-v-e-n-k s-t-e-v-e-n-k force-pushed the use-legacycrypt-if-required branch from 3517bfc to 95569f6 Compare December 6, 2024 01:33
@s-t-e-v-e-n-k
Copy link
Author

Thanks for this!!

just a few things

  1. we have to make this optional. Can you add to [tool.poetry.extras] and make it optional =true
  2. Change the import to only happen within the function and raise an error if not installed.

Thanks for the super fast review, I've pushed up those changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Py 3.13 support?
2 participants