Skip to content

change LightningDeprecationWarning to inherit from FutureWarning#21615

Open
knQzx wants to merge 4 commits intoLightning-AI:masterfrom
knQzx:fix/deprecation-to-future-warning
Open

change LightningDeprecationWarning to inherit from FutureWarning#21615
knQzx wants to merge 4 commits intoLightning-AI:masterfrom
knQzx:fix/deprecation-to-future-warning

Conversation

@knQzx
Copy link
Copy Markdown

@knQzx knQzx commented Mar 26, 2026

DeprecationWarning is hidden by default in python so end-users never see these warnings. changed the base class to FutureWarning which is shown by default, and removed the simplefilter override that was only needed because DeprecationWarning was suppressed

fixes #11525


📚 Documentation preview 📚: https://pytorch-lightning--21615.org.readthedocs.build/en/21615/

DeprecationWarning is hidden by default in python so end-users
never see it. FutureWarning is shown by default which is what
we want here since these target end-users not library devs.
also removes the now-unnecessary simplefilter override

fixes Lightning-AI#11525
@github-actions github-actions bot added the fabric lightning.fabric.Fabric label Mar 26, 2026
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Mar 30, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87%. Comparing base (648ec13) to head (55437e9).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21615   +/-   ##
=======================================
- Coverage      87%      87%   -0%     
=======================================
  Files         270      270           
  Lines       23895    23893    -2     
=======================================
- Hits        20675    20671    -4     
- Misses       3220     3222    +2     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use FutureWarning instead of DeprecationWarning for deprecation warning

2 participants