@@ -346,19 +346,14 @@ BaseException_args_get_impl(PyBaseExceptionObject *self)
346346/*[clinic input]
347347@critical_section
348348@setter
349- @deleter
350349BaseException.args
351350[clinic start generated code]*/
352351
353352static int
354353BaseException_args_set_impl (PyBaseExceptionObject * self , PyObject * value )
355- /*[clinic end generated code: output=331137e11d8f9e80 input=177ad350c8b45219 ]*/
354+ /*[clinic end generated code: output=331137e11d8f9e80 input=2400047ea5970a84 ]*/
356355{
357356 PyObject * seq ;
358- if (value == NULL ) {
359- PyErr_SetString (PyExc_TypeError , "args may not be deleted" );
360- return -1 ;
361- }
362357 seq = PySequence_Tuple (value );
363358 if (!seq )
364359 return -1 ;
@@ -386,19 +381,14 @@ BaseException___traceback___get_impl(PyBaseExceptionObject *self)
386381/*[clinic input]
387382@critical_section
388383@setter
389- @deleter
390384BaseException.__traceback__
391385[clinic start generated code]*/
392386
393387static int
394388BaseException___traceback___set_impl (PyBaseExceptionObject * self ,
395389 PyObject * value )
396- /*[clinic end generated code: output=a82c86d9f29f48f0 input=53a1df586023d786 ]*/
390+ /*[clinic end generated code: output=a82c86d9f29f48f0 input=12676035676badad ]*/
397391{
398- if (value == NULL ) {
399- PyErr_SetString (PyExc_TypeError , "__traceback__ may not be deleted" );
400- return -1 ;
401- }
402392 if (PyTraceBack_Check (value )) {
403393 Py_XSETREF (self -> traceback , Py_NewRef (value ));
404394 }
@@ -432,19 +422,15 @@ BaseException___context___get_impl(PyBaseExceptionObject *self)
432422/*[clinic input]
433423@critical_section
434424@setter
435- @deleter
436425BaseException.__context__
437426[clinic start generated code]*/
438427
439428static int
440429BaseException___context___set_impl (PyBaseExceptionObject * self ,
441430 PyObject * value )
442- /*[clinic end generated code: output=b4cb52dcca1da3bd input=fe79e7c0a0854004 ]*/
431+ /*[clinic end generated code: output=b4cb52dcca1da3bd input=c0971adf47fa1858 ]*/
443432{
444- if (value == NULL ) {
445- PyErr_SetString (PyExc_TypeError , "__context__ may not be deleted" );
446- return -1 ;
447- } else if (value == Py_None ) {
433+ if (value == Py_None ) {
448434 value = NULL ;
449435 } else if (!PyExceptionInstance_Check (value )) {
450436 PyErr_SetString (PyExc_TypeError , "exception context must be None "
@@ -476,19 +462,15 @@ BaseException___cause___get_impl(PyBaseExceptionObject *self)
476462/*[clinic input]
477463@critical_section
478464@setter
479- @deleter
480465BaseException.__cause__
481466[clinic start generated code]*/
482467
483468static int
484469BaseException___cause___set_impl (PyBaseExceptionObject * self ,
485470 PyObject * value )
486- /*[clinic end generated code: output=6161315398aaf541 input=3fdd9a0d1674abc9 ]*/
471+ /*[clinic end generated code: output=6161315398aaf541 input=e1b403c0bde3f62a ]*/
487472{
488- if (value == NULL ) {
489- PyErr_SetString (PyExc_TypeError , "__cause__ may not be deleted" );
490- return -1 ;
491- } else if (value == Py_None ) {
473+ if (value == Py_None ) {
492474 value = NULL ;
493475 } else if (!PyExceptionInstance_Check (value )) {
494476 PyErr_SetString (PyExc_TypeError , "exception cause must be None "
0 commit comments