Debian Codegraph @

pypy/module/_warnings/moduledef.py

raw symbols SCIP
1 from pypy.interpreter.mixedmodule import MixedModule
2
3 class Module(MixedModule):
4 """provides basic warning filtering support.
5 It is a helper module to speed up interpreter start-up."""
6
7 interpleveldefs = {
8 'warn' : 'interp_warnings.warn',
9 'warn_explicit': 'interp_warnings.warn_explicit',
10 '_filters_mutated': 'interp_warnings.filters_mutated',
11 }
12
13 appleveldefs = {
14 '_warn_unawaited_coroutine' : 'app_warnings._warn_unawaited_coroutine',
15 }
16
17 def setup_after_space_initialization(self):
18 from pypy.module._warnings.interp_warnings import State
19 state = self.space.fromcache(State)
20 self.setdictvalue(self.space, "filters", state.w_filters)
21 self.setdictvalue(self.space, "_onceregistry", state.w_once_registry)
22 self.setdictvalue(self.space, "_defaultaction", state.w_default_action)
23