Fix MovedDefinitionHandler deprecation warnings to point to the import location

This commit is contained in:
Matt Westcott 2019-08-15 19:45:58 +01:00 committed by Matt Westcott
parent 227221f7fb
commit a92d81be0c

View file

@ -49,7 +49,7 @@ class MovedDefinitionHandler(object):
warnings.warn(
"%s has been moved from %s to %s" % (name, self.real_module.__name__, new_module_name),
category=self.warning_class
category=self.warning_class, stacklevel=2
)
# load the requested definition from the module named in moved_definitions