avian2 / unidecode

ASCII transliterations of Unicode text - GitHub mirror
https://pypi.python.org/pypi/Unidecode
GNU General Public License v2.0
517 stars 62 forks source link

Use a context manager to always close the file after opening #34

Closed jdufresne closed 5 years ago

jdufresne commented 5 years ago

Fixes the following warning when Python warnings are enabled during tests:

    setup.py:9: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'>
      return open(os.path.join(os.path.dirname(__file__), "README.rst")).read()

To enable warnings, use the pass the -Walways argument to Python:

https://docs.python.org/3/using/cmdline.html#cmdoption-w

avian2 commented 5 years ago

Merged. Thanks.