__init__.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright 2016 Google LLC
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. """Google OAuth 2.0 Library for Python."""
  15. import sys
  16. import warnings
  17. class Python37DeprecationWarning(DeprecationWarning): # pragma: NO COVER
  18. """
  19. Deprecation warning raised when Python 3.7 runtime is detected.
  20. Python 3.7 support will be dropped after January 1, 2024.
  21. """
  22. pass
  23. # Checks if the current runtime is Python 3.7.
  24. if sys.version_info.major == 3 and sys.version_info.minor == 7: # pragma: NO COVER
  25. message = (
  26. "After January 1, 2024, new releases of this library will drop support "
  27. "for Python 3.7."
  28. )
  29. warnings.warn(message, Python37DeprecationWarning)