rheon.RheonDeprecationWarning¶
- class rheon.RheonDeprecationWarning[source]¶
Bases:
RheonWarning,DeprecationWarningA warning that a name still read is on its way out.
The library issues it for a name it still reads under a spelling it will stop reading at the next major version. The one it reads that way is an environment variable under its name from before the rename (
POLARS_ONLINE_MAX_THREADSforRHEON_MAX_THREADS, and the same forRHEON_TIMING,RHEON_WARN_UNSTABLEandRHEON_SKIP_CPU_CHECK): it is read while the new name is not set, with this warning once atimport rheon, and not at all from the next major version. Any other renamed name is refused outright, naming the new one (TypeErrorfrom a builder or a function,ValueErrorfrom a spec dict). Python shows aDeprecationWarningissued from a library only in__main__and under test runners, so to see it everywhere, filter it withwarnings.simplefilter("default", rheon.RheonDeprecationWarning), and to make it an error, with"error".Examples
import warnings warnings.simplefilter("error", rp.RheonDeprecationWarning) # an error from here print(issubclass(rp.RheonDeprecationWarning, DeprecationWarning))
True
See also
RheonWarning, the base class every warning of this library shares.