cors.py 814 B

1234567891011121314151617181920212223242526
  1. import typing as t
  2. import warnings
  3. class CORSRequestMixin:
  4. def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
  5. warnings.warn(
  6. "'CORSRequestMixin' is deprecated and will be removed in"
  7. " Werkzeug 2.1. 'Request' now includes the functionality"
  8. " directly.",
  9. DeprecationWarning,
  10. stacklevel=2,
  11. )
  12. super().__init__(*args, **kwargs)
  13. class CORSResponseMixin:
  14. def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
  15. warnings.warn(
  16. "'CORSResponseMixin' is deprecated and will be removed in"
  17. " Werkzeug 2.1. 'Response' now includes the functionality"
  18. " directly.",
  19. DeprecationWarning,
  20. stacklevel=2,
  21. )
  22. super().__init__(*args, **kwargs)