errors.py 401 B

1234567891011121314
  1. import warnings
  2. def __getattr__(name):
  3. """Provide deprecation warning for NotDirectoryError."""
  4. if name == "NotDirectoryError":
  5. warnings.warn(
  6. "upath.errors.NotDirectoryError is deprecated. "
  7. "Use NotADirectoryError instead",
  8. DeprecationWarning,
  9. stacklevel=2,
  10. )
  11. return NotADirectoryError
  12. raise AttributeError(name)