Avoid entry_points deprecation warning
What does this PR do?
Fixes https://github.com/Lightning-AI/lightning/issues/13989
Does your PR introduce any breaking changes? If yes, please list them.
None
Before submitting
- [x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
- [x] Did you read the contributor guideline, Pull Request section?
- [x] Did you make sure your PR does only one thing, instead of bundling different changes together?
- [n/a] Did you make sure to update the documentation with your changes? (if necessary)
- [n/a] Did you write any new necessary tests? (not for typos and docs)
- [ ] Did you verify new and existing tests pass locally with your changes?
- [x] Did you list all the breaking changes introduced by this pull request?
- [x] Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)
PR review
- [x] Is this pull request ready for review? (if not, please submit in draft mode)
- [x] Check that all items from Before submitting are resolved
- [x] Make sure the title is self-explanatory and the description concisely explains the PR
- [x] Add labels and milestones (and optionally projects) to the PR so it can be classified
cc @borda @justusschock @kaushikb11 @awaelchli @ninginthecloud @akihironitta
Codecov Report
Merging #14052 (51945db) into master (d29a552) will increase coverage by
15%. The diff coverage is100%.
:exclamation: Current head 51945db differs from pull request most recent head c86b87e. Consider uploading reports for the commit c86b87e to get more accurate results
@@ Coverage Diff @@
## master #14052 +/- ##
=========================================
+ Coverage 61% 76% +15%
=========================================
Files 324 323 -1
Lines 26369 26358 -11
=========================================
+ Hits 16138 20119 +3981
+ Misses 10231 6239 -3992
I can confirm that this fixes #13989 for me!
Do you think we should let pytest treat
DeprecationWarningas errors just likeFutureWarning?
I tried it in the past and there's a TON of overrides we would need to add, because we also would fail from warnings triggered inside our dependencies. Unless there's an easy way to filter those triggered in our codebase.
Do you think we should let pytest treat
DeprecationWarningas errors just likeFutureWarning?
We do this in TorchGeo, including some specific to lightning.
there's a TON of overrides we would need to add, because we also would fail from warnings triggered inside our dependencies. Unless there's an easy way to filter those triggered in our codebase.
This is unfortunately true in my experience, although you probably wouldn't need more than 5–10. I'm unaware of any way to handle deprecation warnings differently depending on whether your code or a dependency is using a deprecated feature.