Skip to content

Fixed unclosed file warnings#8705

Merged
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:unclosed_file
Jan 27, 2025
Merged

Fixed unclosed file warnings#8705
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:unclosed_file

Conversation

@radarhere
Copy link
Copy Markdown
Member

https://github.com/python-pillow/Pillow/actions/runs/12842724013/job/35813939701#step:6:5420

Tests/test_file_libtiff.py::TestFileLibTiff::test_buffering[Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif]
Tests/test_file_libtiff.py::TestFileLibTiff::test_buffering[Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif]
/vpy3/lib/python3.10/site-packages/_pytest/python.py:159: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif'>
result = testfunction(**testargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

Tests/test_file_libtiff.py::TestFileLibTiff::test_buffering[Tests/images/old-style-jpeg-compression.tif]
Tests/test_file_libtiff.py::TestFileLibTiff::test_buffering[Tests/images/old-style-jpeg-compression.tif]
/vpy3/lib/python3.10/site-packages/_pytest/python.py:159: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/old-style-jpeg-compression.tif'>
result = testfunction(**testargs)
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

@hugovk hugovk merged commit a9d05a1 into python-pillow:main Jan 27, 2025
@radarhere radarhere deleted the unclosed_file branch January 27, 2025 21:16
eyedav pushed a commit to eyedav/Pillow that referenced this pull request Jul 19, 2025
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants