-
Notifications
You must be signed in to change notification settings - Fork 0
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
aggr changes #2
base: python3
Are you sure you want to change the base?
aggr changes #2
Conversation
haigha2/ssl_connection.py
Outdated
@@ -1,4 +1,6 @@ | |||
from haigha2.connection import Connection | |||
from six import PY2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this used? I am not sure I understand what changed in this file
@@ -48,12 +50,11 @@ def __init__(self, *args, **kwargs): | |||
# Transport API | |||
### | |||
|
|||
def connect(self, address): | |||
def connect(self, host_port_tuple): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we renamed the argument to host_port_tuple
?
the connect
interface useually pass address and lets the underline layer to handle the address format
https://docs.python.org/2/library/socket.html#socket.socket.connect
if six.PY2: | ||
sslobj = self._context._wrap_socket(self._sock, server_side, ssl_sock=self, server_hostname=server_hostname) | ||
else: | ||
context = self.context if PY33 else self._context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we need to check PY33
? what changed in python3.3? (add comment about it)
try: | ||
# This is added in Python 3.5, http://bugs.python.org/issue21965 | ||
SSLObject = ssl.SSLObject | ||
except NameError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we expect NameError and not attribute error?
In [49]: import ssl
In [50]: ssl.SSLObject
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-50-f8284913d90b> in <module>()
----> 1 ssl.SSLObject
AttributeError: 'module' object has no attribute 'SSLObject'```
GC-33331 - Debug session service stuck while going down and can't rec…
No description provided.