rheon.RheonDeprecationWarning

class rheon.RheonDeprecationWarning[source]

Bases: RheonWarning, DeprecationWarning

A 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_THREADS for RHEON_MAX_THREADS, and the same for RHEON_TIMING, RHEON_WARN_UNSTABLE and RHEON_SKIP_CPU_CHECK): it is read while the new name is not set, with this warning once at import rheon, and not at all from the next major version. Any other renamed name is refused outright, naming the new one (TypeError from a builder or a function, ValueError from a spec dict). Python shows a DeprecationWarning issued from a library only in __main__ and under test runners, so to see it everywhere, filter it with warnings.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.