2👍
✅
I was able to get around this by ignoring the deprecation warning:
with warnings.catch_warnings():
warnings.filterwarnings("ignore",category=DeprecationWarning)
import boto3
8👍
I hid the warning with this code sequence:
try:
import botocore
import boto3
except ImportError:
print("No module named botocore or boto3. You may need to install boto3")
sys.exit(1)
boto3.compat.filter_python_deprecation_warnings()
0👍
I ran into this same thing when introducing moto to a pytest suite. Incase it helps anyone you can also configure this via pytest.ini
like this:
[pytest]
filterwarnings =
ignore::DeprecationWarning
- [Django]-Unable to override django-allauth templates
- [Django]-Pass variable from middleware to templates
Source:stackexchange.com