@@ -40,11 +40,6 @@ def _test_selector_event(selector, fd, event):
4040 return bool (key .events & event )
4141
4242
43- def _check_ssl_socket (sock ):
44- if ssl is not None and isinstance (sock , ssl .SSLSocket ):
45- raise TypeError ("Socket cannot be of type SSLSocket" )
46-
47-
4843class BaseSelectorEventLoop (base_events .BaseEventLoop ):
4944 """Selector event loop.
5045
@@ -366,7 +361,7 @@ async def sock_recv(self, sock, n):
366361 The maximum amount of data to be received at once is specified by
367362 nbytes.
368363 """
369- _check_ssl_socket (sock )
364+ base_events . _check_ssl_socket (sock )
370365 if self ._debug and sock .gettimeout () != 0 :
371366 raise ValueError ("the socket must be non-blocking" )
372367 try :
@@ -407,7 +402,7 @@ async def sock_recv_into(self, sock, buf):
407402 The received data is written into *buf* (a writable buffer).
408403 The return value is the number of bytes written.
409404 """
410- _check_ssl_socket (sock )
405+ base_events . _check_ssl_socket (sock )
411406 if self ._debug and sock .gettimeout () != 0 :
412407 raise ValueError ("the socket must be non-blocking" )
413408 try :
@@ -448,7 +443,7 @@ async def sock_sendall(self, sock, data):
448443 raised, and there is no way to determine how much data, if any, was
449444 successfully processed by the receiving end of the connection.
450445 """
451- _check_ssl_socket (sock )
446+ base_events . _check_ssl_socket (sock )
452447 if self ._debug and sock .gettimeout () != 0 :
453448 raise ValueError ("the socket must be non-blocking" )
454449 try :
@@ -497,7 +492,7 @@ async def sock_connect(self, sock, address):
497492
498493 This method is a coroutine.
499494 """
500- _check_ssl_socket (sock )
495+ base_events . _check_ssl_socket (sock )
501496 if self ._debug and sock .gettimeout () != 0 :
502497 raise ValueError ("the socket must be non-blocking" )
503498
@@ -562,7 +557,7 @@ async def sock_accept(self, sock):
562557 object usable to send and receive data on the connection, and address
563558 is the address bound to the socket on the other end of the connection.
564559 """
565- _check_ssl_socket (sock )
560+ base_events . _check_ssl_socket (sock )
566561 if self ._debug and sock .gettimeout () != 0 :
567562 raise ValueError ("the socket must be non-blocking" )
568563 fut = self .create_future ()
0 commit comments