File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,6 +195,9 @@ Core and builtins
195195Extension modules
196196-----------------
197197
198+ - socket.sslerror is now a subclass of socket.error . Also added
199+ socket.error to the socket module's C API.
200+
198201- Bug #920575: A problem that _locale module segfaults on
199202 nl_langinfo(ERA) caused by GNU libc's illegal NULL return is fixed.
200203
Original file line number Diff line number Diff line change @@ -609,7 +609,9 @@ init_ssl(void)
609609 SSLeay_add_ssl_algorithms ();
610610
611611 /* Add symbols to module dict */
612- PySSLErrorObject = PyErr_NewException ("socket.sslerror" , NULL , NULL );
612+ PySSLErrorObject = PyErr_NewException ("socket.sslerror" ,
613+ PySocketModule .error ,
614+ NULL );
613615 if (PySSLErrorObject == NULL )
614616 return ;
615617 PyDict_SetItemString (d , "sslerror" , PySSLErrorObject );
Original file line number Diff line number Diff line change @@ -3559,6 +3559,7 @@ static
35593559PySocketModule_APIObject PySocketModuleAPI =
35603560{
35613561 & sock_type ,
3562+ NULL
35623563};
35633564
35643565
@@ -3596,6 +3597,7 @@ init_socket(void)
35963597 socket_error = PyErr_NewException ("socket.error" , NULL , NULL );
35973598 if (socket_error == NULL )
35983599 return ;
3600+ PySocketModuleAPI .error = socket_error ;
35993601 Py_INCREF (socket_error );
36003602 PyModule_AddObject (m , "error" , socket_error );
36013603 socket_herror = PyErr_NewException ("socket.herror" ,
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ typedef struct {
160160/* C API for usage by other Python modules */
161161typedef struct {
162162 PyTypeObject * Sock_Type ;
163+ PyObject * error ;
163164} PySocketModule_APIObject ;
164165
165166/* XXX The net effect of the following appears to be to define a function
You can’t perform that action at this time.
0 commit comments