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

got an unexpected keyword argument 'ssl_context' #70

Closed
boussouira opened this issue Jul 3, 2016 · 10 comments
Closed

got an unexpected keyword argument 'ssl_context' #70

boussouira opened this issue Jul 3, 2016 · 10 comments

Comments

@boussouira
Copy link

Please note that:
ssl_context = pythonssllib.create_default_context()
is new in python version 2.7.9.

after installing 2.7.11, i get this error:

>>> imbox = Imbox('imap.gmail.com', username='...@gmail.com', password='...')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/naruto/Programming/imap_test/venv/lib/python2.7/site-packages/imbox/__init__.py", line 15, in __init__
    ssl_context=None)
  File "/home/naruto/Programming/imap_test/venv/lib/python2.7/site-packages/imbox/imap.py", line 28, in __init__
    self.server = self.transport(self.hostname, self.port, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'ssl_context'

looks like ssl_context argument is not supported in 2.7

@icam0
Copy link

icam0 commented Jul 13, 2016

How do you resolve this issue? When I turn-off ssl completely the package just freezes

@boussouira
Copy link
Author

I didn't resolve it, probably I'll use an other library.

@sebix
Copy link

sebix commented Jul 13, 2016

I didn't resolve it, probably I'll use an other library.

Or do the step forward to Python 3.

@0xA0
Copy link

0xA0 commented Aug 8, 2016

if you dont need ssl_context just disable the 20,21,22 lines from imbox/imap.py

@sebix
Copy link

sebix commented Aug 8, 2016

Python 2.7 does not allow specifying ssl_context, thus no certificates can be validated. I want to encourage you to not disable this and use Python 3 only. I consider Python 2.7 a security risk.

@martinrusev
Copy link
Owner

@sebix
Copy link

sebix commented Aug 8, 2016

@martinrusev The point is, that there's no ssl_context parameter for imaplib.IMAP4_SSL

@bhtucker
Copy link
Contributor

This is a definite issue — the project should probably just come out and say it doesn't support Python 2.7.

@martinrusev
Copy link
Owner

Done: https://github.com/martinrusev/imbox/blob/master/README.md#requirements

@sebix
Copy link

sebix commented Oct 27, 2016

Also change it in setup.py: https://github.com/martinrusev/imbox/blob/master/setup.py#L26

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

No branches or pull requests

6 participants