TopoNetX icon indicating copy to clipboard operation
TopoNetX copied to clipboard

Use new `@deprecated` decorator

Open ffl096 opened this issue 1 year ago • 1 comments

The @deprecated decorator has been proposed in PEP 702 and is part of Python 3.13. The huge benefit of the decorator is that it moves deprecations into the type system, allowing type checkers to catch calls to these methods. Runtime DeprecationWarnings are raised automatically and only once on first use.

As usual, the @deprecated decorator is backported to older versions of Python in typing_extensions. We can use the native implementation warnings.deprecated once Python 3.13+ is the minimum version.

ffl096 avatar May 21 '24 10:05 ffl096

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.37%. Comparing base (e1f4089) to head (4298a41).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
- Coverage   97.37%   97.37%   -0.01%     
==========================================
  Files          37       37              
  Lines        3545     3543       -2     
==========================================
- Hits         3452     3450       -2     
  Misses         93       93              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 21 '24 10:05 codecov[bot]