nlpub/pymystem3

ResourceWarning raising

daskol opened this issue · 5 comments

If one calls resetwarnings(), starts mystem and lemmatizes something then python will notify with ResouceWarning due to opened IO pipes like following.

/lib/python3.6/site-packages/pymystem3/mystem.py:210: ResourceWarning: unclosed file <_io.FileIO name=5 mode='wb' closefd=True>
  self._proc = None
/lib/python3.6/site-packages/pymystem3/mystem.py:210: ResourceWarning: unclosed file <_io.FileIO name=6 mode='rb' closefd=True>

Thank you for reporting this issue: due to the limited amount of resources, a pull request with a fix is greatly appreciated.

Okay. Could you update package on PyPI after fix applying?

sure, i will try to update by the end of the week

meanwhile you can pip install git+https://github.com/nlpub/pymystem3

That is great!