New comment by imrn on void-packages repository https://github.com/void-linux/void-packages/issues/21994#issuecomment-629684525 Comment: Found it!. I discovered that I had an experimental obscure "ssl.py" within the same directory which also imports many classes from python's own "ssl". Interestingly as above examples has no direct "import ssl" statement, somehow it interferes with them and their tracebacks provide no clues about it! Traceback does not even mention that obscure file and its classes!! Luckly, as I decided to experiment with some more low level stuff below and analyze the trace back, I've discovered it. This time that obscure file surfaced in the traceback. Bad luck, mixed with python's "marvelous" import machinery and exception handing creates interesting and hard to find bugs. Thank you all for your comments for eliminating above possibilities so that I could focus on proper problem region. Just closing. ```python3 import socket import ssl hostname = 'www.python.org' context = ssl.create_default_context() with socket.create_connection((hostname, 443)) as sock: with context.wrap_socket(sock, server_hostname=hostname) as ssock: print(ssock.version()) ```