Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure file closing #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Ensure file closing #4

wants to merge 3 commits into from

Conversation

nim65s
Copy link

@nim65s nim65s commented Apr 4, 2020

Hi,

Running tests with PYTHONWARNINGS=always on a project that depend of mdmail, I got:

…/lib/python3.8/site-packages/mdmail/api.py:101: ResourceWarning: unclosed file <_io.TextIOWrapper name='…/lib/python3.8/site-packages/mdmail/default.css' mode='r' encoding='utf-8'>
  css = open(default_css, encoding='utf-8').read()

So here is a quickfix.

While here, I updated the python versions that Travis should test:

  • added 3.6 to 3.8, as they work well
  • removed 3.3, as Travis doesn't provide it anymore:

    Unable to download 3.3 archive. The archive may not exist. Please consider a different version.

  • removed 3.4, as lxml doesn't support it anymore:

    This lxml version requires Python 2.7, 3.5 or later.

fix the following warning:
```
[…]/lib/python3.8/site-packages/mdmail/api.py:101: ResourceWarning: unclosed file <_io.TextIOWrapper name='[…]/lib/python3.8/site-packages/mdmail/default.css' mode='r' encoding='utf-8'>
  css = open(default_css, encoding='utf-8').read()
```
@nim65s
Copy link
Author

nim65s commented Apr 3, 2021

Hello there :)

This is just a friendly reminder that it's been a year, for a trivial fix.

Best.

@nim65s
Copy link
Author

nim65s commented May 2, 2023

This looks no longer maintained, I made a fork: https://github.com/nim65s/nmdmail / https://pypi.org/project/nmdmail/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant