Debian Codegraph @

src/trio/_tests/module_with_deprecations.py

raw
1 regular = "hi"
2
3 import sys
4
5 from .. import _deprecate
6
7 _deprecate.deprecate_attributes(
8 __name__,
9 {
10 "dep1": _deprecate.DeprecatedAttribute("value1", "1.1", issue=1),
11 "dep2": _deprecate.DeprecatedAttribute(
12 "value2",
13 "1.2",
14 issue=1,
15 instead="instead-string",
16 ),
17 },
18 )
19
20 this_mod = sys.modules[__name__]
21 assert this_mod.regular == "hi"
22 assert "dep1" not in globals()