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

PKey not imported with from […] import * #715

Closed
nikaro opened this issue Nov 21, 2017 · 2 comments · Fixed by #719
Closed

PKey not imported with from […] import * #715

nikaro opened this issue Nov 21, 2017 · 2 comments · Fixed by #719

Comments

@nikaro
Copy link
Contributor

nikaro commented Nov 21, 2017

Hello,

When doing from OpenSSL.crypto import * it does not import PKey().

Python 2.7.14 (default, Sep 23 2017, 22:06:14) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from OpenSSL.crypto import *
>>> key = PKey()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'PKey' is not defined

This is used in at least one project: ajenti/ajenti#1091

Doing from OpenSSL.crypto import Pkey works fine.

Regards.

@reaperhulk
Copy link
Member

We would be happy to review a PR fixing this behavior, but I should also note that it is definitely bad practice to import * like that.

@nikaro
Copy link
Contributor Author

nikaro commented Nov 22, 2017

Yeah i know and i agree, i've said it in the issue of the project which do this. But since the possibility exists and it is used by some, it would be nice to have it working.

PR #719 submitted :-)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants