File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -343,12 +343,6 @@ PyContextVar_Set(PyObject *ovar, PyObject *val)
343343 ENSURE_ContextVar (ovar , NULL )
344344 PyContextVar * var = (PyContextVar * )ovar ;
345345
346- if (!PyContextVar_CheckExact (var )) {
347- PyErr_SetString (
348- PyExc_TypeError , "an instance of ContextVar was expected" );
349- return NULL ;
350- }
351-
352346 PyContext * ctx = context_get ();
353347 if (ctx == NULL ) {
354348 return NULL ;
@@ -1025,11 +1019,7 @@ static PyObject *
10251019_contextvars_ContextVar_get_impl (PyContextVar * self , PyObject * default_value )
10261020/*[clinic end generated code: output=0746bd0aa2ced7bf input=da66664d5d0af4ad]*/
10271021{
1028- if (!PyContextVar_CheckExact (self )) {
1029- PyErr_SetString (
1030- PyExc_TypeError , "an instance of ContextVar was expected" );
1031- return NULL ;
1032- }
1022+ ENSURE_ContextVar (self , NULL )
10331023
10341024 PyObject * val ;
10351025 if (PyContextVar_Get ((PyObject * )self , default_value , & val ) < 0 ) {
You can’t perform that action at this time.
0 commit comments