streams.py 809 B

123456789101112131415161718192021222324252627
  1. # This file is not meant for public use and will be removed in SciPy v2.0.0.
  2. # Use the `scipy.io.matlab` namespace for importing the functions
  3. # included below.
  4. import warnings
  5. from . import _streams
  6. __all__ = [ # noqa: F822
  7. 'BLOCK_SIZE', 'GenericStream', 'ZlibInputStream', 'make_stream'
  8. ]
  9. def __dir__():
  10. return __all__
  11. def __getattr__(name):
  12. if name not in __all__:
  13. raise AttributeError(
  14. "scipy.io.matlab.streams is deprecated and has no attribute "
  15. f"{name}. Try looking in scipy.io.matlab instead.")
  16. warnings.warn(f"Please use `{name}` from the `scipy.io.matlab` namespace, "
  17. "the `scipy.io.matlab.streams` namespace is deprecated.",
  18. category=DeprecationWarning, stacklevel=2)
  19. return getattr(_streams, name)