exceptions.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # -*- coding: utf-8 -*-
  2. """Collection of exceptions raised by requests-toolbelt."""
  3. class StreamingError(Exception):
  4. """Used in :mod:`requests_toolbelt.downloadutils.stream`."""
  5. pass
  6. class VersionMismatchError(Exception):
  7. """Used to indicate a version mismatch in the version of requests required.
  8. The feature in use requires a newer version of Requests to function
  9. appropriately but the version installed is not sufficient.
  10. """
  11. pass
  12. class RequestsVersionTooOld(Warning):
  13. """Used to indicate that the Requests version is too old.
  14. If the version of Requests is too old to support a feature, we will issue
  15. this warning to the user.
  16. """
  17. pass
  18. class IgnoringGAECertificateValidation(Warning):
  19. """Used to indicate that given GAE validation behavior will be ignored.
  20. If the user has tried to specify certificate validation when using the
  21. insecure AppEngine adapter, it will be ignored (certificate validation will
  22. remain off), so we will issue this warning to the user.
  23. In :class:`requests_toolbelt.adapters.appengine.InsecureAppEngineAdapter`.
  24. """
  25. pass