blob: fee6598e1089109df2dcac57481643045a7fa7cc [file]
from __future__ import print_function
import warnings
class ClassWithDeprecatedProperty:
@property
def x(self):
warnings.warn("This property is deprecated!")
return 42
obj = ClassWithDeprecatedProperty()
warnings.warn("This warning should appear in the output.")
del globals()['__warningregistry__']
print(obj.x)
print(obj)