File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,12 @@ impl Context {
285285 rustpython_common:: static_cell! {
286286 static CONTEXT : PyRc <Context >;
287287 }
288- CONTEXT . get_or_init ( || PyRc :: new ( Self :: init_genesis ( ) ) )
288+ CONTEXT . get_or_init ( || {
289+ let ctx = PyRc :: new ( Self :: init_genesis ( ) ) ;
290+ crate :: types:: TypeZoo :: extend ( & ctx) ;
291+ crate :: exceptions:: ExceptionZoo :: extend ( & ctx) ;
292+ ctx
293+ } )
289294 }
290295
291296 fn init_genesis ( ) -> Self {
Original file line number Diff line number Diff line change 5252 let paths = getpath:: init_path_config ( & settings) ;
5353 let config = PyConfig :: new ( settings, paths) ;
5454
55- crate :: types:: TypeZoo :: extend ( & ctx) ;
56- crate :: exceptions:: ExceptionZoo :: extend ( & ctx) ;
57-
5855 // Build module_defs map from builtin modules + additional modules
5956 let mut all_module_defs: BTreeMap < & ' static str , & ' static builtins:: PyModuleDef > =
6057 crate :: stdlib:: builtin_module_defs ( & ctx)
You can’t perform that action at this time.
0 commit comments