sendgrid / python-http-client

Twilio SendGrid's Python HTTP Client for calling APIs
https://sendgrid.com
MIT License
125 stars 101 forks source link

fix: Remove ResourceWarning on module import #128

Closed connesy closed 4 years ago

connesy commented 4 years ago

Checklist

Short description of what this PR does:

Removes ResourceWarning on module import and from setup.py:

$ python -Wd
>>> import python_http_client
/home/<user>/miniconda3/envs/dev/lib/python3.7/site-packages/python_http_client/__init__.py:22: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/<user>/miniconda3/envs/dev/lib/python3.7/site-packages/python_http_client/VERSION.txt' mode='r' encoding='UTF-8'>
  __version__ = open(os.path.join(dir_path, 'VERSION.txt')).read().strip()
ResourceWarning: Enable tracemalloc to get the object allocation traceback

If you have questions, please send an email to the Twilio SendGrid Developer Experience Team, or file a GitHub Issue in this repository.

SendGridDX commented 4 years ago

CLA assistant check
All committers have signed the CLA.