texttest / capturemock

2 stars 2 forks source link

Warnings under Python 3.6 #5

Closed Cito closed 4 years ago

Cito commented 4 years ago

Thanks for creating capturemock - glad to see it is still alive and working under Python 3.

As a minor issue, I noticed the following warnings when running under Python 3.6:

replayinfo.py:110: DeprecationWarning: 'U' mode is deprecated
replayinfo.py:110: ResourceWarning: unclosed file <_io.TextIOWrapper name='...mock' mode='rU' encoding='UTF-8'>
__init__.py:245: DeprecationWarning: 'U' mode is deprecated
__init__.py:246: DeprecationWarning: 'U' mode is deprecated
__init__.py:257: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/...' mode='rU' encoding='UTF-8'>
__init__.py:257: ResourceWarning: unclosed file <_io.TextIOWrapper name='....mock' mode='rU' encoding='UTF-8'>
gjb1002 commented 4 years ago

Thanks for the report. I don't seem to get these warnings for some reason. But I rewrote the relevant code in the new way. There's now a 2.0.3 release with this fix.

Cito commented 4 years ago

Thank you so much for the quick fix! I can confirm the warnings have disappeared now.