This code uses deprecated methods, which suggests that it has not been recently reviewed or maintained. Using deprecated methods might lead to erroneous behavior.
1def deprecated_method_noncompliant(url): 2 import botocore.vendored.requests as requests 3 # Noncompliant: uses the deprecated botocore vendored method. 4 return requests.get(url)
1def deprecated_method_compliant(url, sigv4auth): 2 import requests 3 # Compliant: avoids using the deprecated methods. 4 return requests.get(url, auth=sigv4auth).text