@@ -2,43 +2,26 @@ pub(crate) use _typing::make_module;
2
2
3
3
#[ pymodule]
4
4
pub ( crate ) mod _typing {
5
- use std:: cell:: Cell ;
6
-
7
5
use crate :: {
8
- atomic_func,
9
- builtins:: {
10
- pystr:: AsPyStr , PyFrozenSet , PyGenericAlias , PyStr , PyTuple , PyTupleRef , PyType ,
11
- PyTypeRef ,
12
- } ,
13
- class:: PyClassImpl ,
14
- common:: hash,
15
- convert:: { ToPyObject , ToPyResult } ,
16
- function:: PyComparisonValue ,
17
- function:: { Either , FuncArgs , IntoFuncArgs , OptionalArg } ,
18
- protocol:: { PyMappingMethods , PyNumberMethods } ,
19
- types:: PyStructSequence ,
20
- types:: {
21
- AsMapping , AsNumber , Comparable , GetAttr , Hashable , PyComparisonOp , Representable ,
22
- } ,
23
- AsObject , Context , Py , PyObject , PyObjectRef , PyPayload , PyRef , PyResult , TryFromObject ,
24
- VirtualMachine ,
6
+ builtins:: { pystr:: AsPyStr , PyGenericAlias , PyTupleRef , PyTypeRef } ,
7
+ function:: IntoFuncArgs ,
8
+ PyObjectRef , PyPayload , PyResult , VirtualMachine ,
25
9
} ;
26
- use once_cell:: sync:: Lazy ;
27
10
28
- pub ( crate ) fn call_typing_func_object < ' a > (
29
- vm : & VirtualMachine ,
30
- func_name : impl AsPyStr < ' a > ,
31
- args : impl IntoFuncArgs ,
11
+ pub ( crate ) fn _call_typing_func_object < ' a > (
12
+ _vm : & VirtualMachine ,
13
+ _func_name : impl AsPyStr < ' a > ,
14
+ _args : impl IntoFuncArgs ,
32
15
) -> PyResult {
33
16
todo ! ( "does this work????" ) ;
34
- let module = vm. import ( "typing" , 0 ) ?;
17
+ // let module = vm.import("typing", 0)?;
35
18
// let module = vm.import("_pycodecs", None, 0)?;
36
- let func = module. get_attr ( func_name, vm) ?;
37
- func. call ( args, vm)
19
+ // let func = module.get_attr(func_name, vm)?;
20
+ // func.call(args, vm)
38
21
}
39
22
40
23
#[ pyattr]
41
- pub ( crate ) fn _idfunc ( vm : & VirtualMachine ) { }
24
+ pub ( crate ) fn _idfunc ( _vm : & VirtualMachine ) { }
42
25
43
26
#[ pyattr]
44
27
#[ pyclass( name = "TypeVar" ) ]
@@ -56,7 +39,7 @@ pub(crate) mod _typing {
56
39
}
57
40
#[ pyclass( flags( BASETYPE ) ) ]
58
41
impl TypeVar {
59
- pub ( crate ) fn bound ( & self , vm : & VirtualMachine ) -> PyResult {
42
+ pub ( crate ) fn _bound ( & self , vm : & VirtualMachine ) -> PyResult {
60
43
let mut bound = self . bound . lock ( ) ;
61
44
if !vm. is_none ( & bound) {
62
45
return Ok ( bound. clone ( ) ) ;
0 commit comments