Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/google/oauth2/__init__.py: 80%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

5 statements  

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 

15"""Google OAuth 2.0 Library for Python.""" 

16 

17import sys 

18import warnings 

19 

20 

21class Python37DeprecationWarning(DeprecationWarning): # pragma: NO COVER 

22 """ 

23 Deprecation warning raised when Python 3.7 runtime is detected. 

24 Python 3.7 support will be dropped after January 1, 2024. 

25 """ 

26 

27 pass 

28 

29 

30# Raise warnings for deprecated versions 

31eol_message = """ 

32 You are using a Python version {} past its end of life. Google will update 

33 google-auth with critical bug fixes on a best-effort basis, but not 

34 with any other fixes or features. Please upgrade your Python version, 

35 and then update google-auth. 

36 """ 

37if sys.version_info.major == 3 and sys.version_info.minor == 8: # pragma: NO COVER 

38 warnings.warn(eol_message.format("3.8"), FutureWarning) 

39elif sys.version_info.major == 3 and sys.version_info.minor == 9: # pragma: NO COVER 

40 warnings.warn(eol_message.format("3.9"), FutureWarning)