mirror of
https://github.com/ROCm/jax.git
synced 2025-04-19 05:16:06 +00:00
Merge pull request #16103 from jakevdp:deprecation-stacklevel
PiperOrigin-RevId: 534616543
This commit is contained in:
commit
2d525b815d
@ -48,7 +48,7 @@ def deprecation_getattr(module, deprecations):
|
||||
message, fn = deprecations[name]
|
||||
if fn is None:
|
||||
raise AttributeError(message)
|
||||
warnings.warn(message, DeprecationWarning)
|
||||
warnings.warn(message, DeprecationWarning, stacklevel=2)
|
||||
return fn
|
||||
raise AttributeError(f"module {module!r} has no attribute {name!r}")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user