Closed nicholasjng closed 9 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
d49d01e
) 90.01% compared to head (36c7a89
) 90.05%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Previously, the file was closed again on deletion, which is bad practice if an exception occurred in write mode, since any exception on write will immediately reappear in the exit routine.
This has potential to disturb Python exit cleanup, so we just unset the closing attempt in
__del__
. Any users wanting to upload a file implicitly have to use a context manager (which is preferred, anyway), otherwise, they have to callfile.close()
themselves.Fixes #218.