Skip to content

Commit b2bdaae

Browse files
committed
abort() if contextvars APIs are called from Python < 3.7
1 parent b2eb2f5 commit b2bdaae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

uvloop/includes/compat.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@ typedef struct {
3636
} PyContext;
3737

3838
PyContext * PyContext_CopyCurrent(void) {
39+
abort();
3940
return NULL;
4041
};
4142

4243
int PyContext_Enter(PyContext *ctx) {
44+
abort();
4345
return -1;
4446
}
4547

4648
int PyContext_Exit(PyContext *ctx) {
49+
abort();
4750
return -1;
4851
}
4952
#endif

0 commit comments

Comments
 (0)