@@ -2,61 +2,29 @@ pub(crate) use _contextvars::make_module;
2
2
3
3
#[ pymodule]
4
4
mod _contextvars {
5
- use crate :: builtins:: PyTypeRef ;
6
- use crate :: pyobject:: PyClassImpl ;
7
- use crate :: pyobject:: PyContext ;
8
- use crate :: slots:: PyTypeSlots ;
9
-
10
5
#[ pyattr]
11
6
#[ pyclass( name = "Context" ) ]
12
7
#[ derive( Debug , Default ) ]
13
8
struct Context { }
14
9
15
- impl PyClassImpl for Context {
16
- const TP_FLAGS : crate :: slots:: PyTpFlags = crate :: slots:: PyTpFlags :: DEFAULT ;
17
-
18
- fn impl_extend_class ( _ctx : & PyContext , _class : & PyTypeRef ) {
19
- // TODO: RUSTPYTHON
20
- }
21
-
22
- fn extend_slots ( _slots : & mut PyTypeSlots ) {
23
- // TODO: RUSTPYTHON
24
- }
25
- }
10
+ #[ pyimpl]
11
+ impl Context { }
26
12
27
13
#[ pyattr]
28
14
#[ pyclass( name = "ContextVar" ) ]
29
15
#[ derive( Debug , Default ) ]
30
16
struct ContextVar { }
31
17
32
- impl PyClassImpl for ContextVar {
33
- const TP_FLAGS : crate :: slots:: PyTpFlags = crate :: slots:: PyTpFlags :: DEFAULT ;
34
-
35
- fn impl_extend_class ( _ctx : & PyContext , _class : & PyTypeRef ) {
36
- // TODO: RUSTPYTHON
37
- }
38
-
39
- fn extend_slots ( _slots : & mut PyTypeSlots ) {
40
- // TODO: RUSTPYTHON
41
- }
42
- }
18
+ #[ pyimpl]
19
+ impl ContextVar { }
43
20
44
21
#[ pyattr]
45
22
#[ pyclass( name = "Token" ) ]
46
23
#[ derive( Debug , Default ) ]
47
24
struct ContextToken { }
48
25
49
- impl PyClassImpl for ContextToken {
50
- const TP_FLAGS : crate :: slots:: PyTpFlags = crate :: slots:: PyTpFlags :: DEFAULT ;
51
-
52
- fn impl_extend_class ( _ctx : & PyContext , _class : & PyTypeRef ) {
53
- // TODO: RUSTPYTHON
54
- }
55
-
56
- fn extend_slots ( _slots : & mut PyTypeSlots ) {
57
- // TODO: RUSTPYTHON
58
- }
59
- }
26
+ #[ pyimpl]
27
+ impl ContextToken { }
60
28
61
29
#[ pyfunction]
62
30
fn copy_context ( ) { }
0 commit comments