Currently, the warning presented does not indicate in which file the deprecated key was accessed. It simply states the line in which the warning is called which is within _dkey. It would be better to use the stacklevel for warn to give the proper location.
Current output
some_function()
C:/ .../_dkey.py:498: FutureWarning: Key `13` is deprecated. Use `12` from now on.
self._warn_deprecation(mapping)
Expected output
some_function()
my_module.py:12: FutureWarning: Key `13` is deprecated. Use `12` from now on.
my_dict[13]
Tasks