MAINT: Use typing_extensions.deprecated (PEP 702) for deprecations - #3928
MAINT: Use typing_extensions.deprecated (PEP 702) for deprecations#3928prateek-dagar wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3928 +/- ##
==========================================
- Coverage 97.87% 97.86% -0.01%
==========================================
Files 57 57
Lines 10760 10743 -17
Branches 2014 2012 -2
==========================================
- Hits 10531 10514 -17
Misses 127 127
Partials 102 102 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Which benefits does this have compared to the existing solution? How does this align with our general deprecation process? At the moment, I am tempted to close this PR and the corresponding issue without merging anything in. |
Hi @stefan6419846 , |
|
This still does not answer how this aligns with our deprecation process. We currently wrap Additionally, we would still need an approach for cases where a decorator might not work, like wrong internal types, replaced parameters etc. |
Description
Closes #2036.
This PR adds
@deprecateddecorators to deprecated methods and properties. This helps IDEs and type checkers show warning messages directly to developers.Changes
typing_extensions >= 4.5.0for Python < 3.13.deprecatedfrom the standardwarningsmodule (Python 3.13+) ortyping_extensions(older versions).@deprecatedtoPageObject.inline_imagesandXmpInformation.write_to_stream.