common_descriptors.py 866 B

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