Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions Python/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,6 @@ PyContextVar_Set(PyObject *ovar, PyObject *val)
ENSURE_ContextVar(ovar, NULL)
PyContextVar *var = (PyContextVar *)ovar;

if (!PyContextVar_CheckExact(var)) {
PyErr_SetString(
PyExc_TypeError, "an instance of ContextVar was expected");
return NULL;
}

PyContext *ctx = context_get();
if (ctx == NULL) {
return NULL;
Expand Down Expand Up @@ -1025,12 +1019,6 @@ static PyObject *
_contextvars_ContextVar_get_impl(PyContextVar *self, PyObject *default_value)
/*[clinic end generated code: output=0746bd0aa2ced7bf input=da66664d5d0af4ad]*/
{
if (!PyContextVar_CheckExact(self)) {
PyErr_SetString(
PyExc_TypeError, "an instance of ContextVar was expected");
return NULL;
}

PyObject *val;
if (PyContextVar_Get((PyObject *)self, default_value, &val) < 0) {
return NULL;
Expand Down
Loading