Skip to content

Commit

Permalink
abort() if contextvars APIs are called from Python < 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed May 30, 2018
1 parent b2eb2f5 commit b2bdaae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions uvloop/includes/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@ typedef struct {
} PyContext;

PyContext * PyContext_CopyCurrent(void) {
abort();
return NULL;
};

int PyContext_Enter(PyContext *ctx) {
abort();
return -1;
}

int PyContext_Exit(PyContext *ctx) {
abort();
return -1;
}
#endif

0 comments on commit b2bdaae

Please sign in to comment.