Open
Conversation
danevgi
reviewed
May 27, 2019
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.
where is this used? I am not sure I understand what changed in this file
danevgi
reviewed
May 27, 2019
| ### | ||
|
|
||
| def connect(self, address): | ||
| def connect(self, host_port_tuple): |
There was a problem hiding this comment.
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
danevgi
reviewed
May 27, 2019
| 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.
why we need to check PY33? what changed in python3.3? (add comment about it)
danevgi
reviewed
May 27, 2019
| 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.
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…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.