(cls, protocol=None, *args, **kwargs)
| 490 | sslobject_class = None # SSLObject is assigned later. |
| 491 | |
| 492 | def __new__(cls, protocol=None, *args, **kwargs): |
| 493 | if protocol is None: |
| 494 | warnings.warn( |
| 495 | "ssl.SSLContext() without protocol argument is deprecated.", |
| 496 | category=DeprecationWarning, |
| 497 | stacklevel=2 |
| 498 | ) |
| 499 | protocol = PROTOCOL_TLS |
| 500 | self = _SSLContext.__new__(cls, protocol) |
| 501 | return self |
| 502 | |
| 503 | def _encode_hostname(self, hostname): |
| 504 | if hostname is None: |