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

Close existing WebP fp before setting new fp #3341

Merged
merged 1 commit into from
Sep 8, 2018

Conversation

radarhere
Copy link
Member

Resolves #3340

@radarhere radarhere changed the title Close existing fp before setting new fp Close existing WebP fp before setting new fp Sep 8, 2018
@hugovk
Copy link
Member

hugovk commented Sep 8, 2018

I wonder whether it's worth adding tests for these? eg. https://github.com/python-pillow/Pillow/pull/2756/files

Maybe not, there's quite a few remaining!

$ pytest -Wd | grep ResourceWarning | wc -l
      84

$ pytest -Wd
<snip>
============================================================= warnings summary ==============================================================
Tests/test_bmp_reference.py::TestBmpReference::test_bad
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:24: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/b/badrle.bmp'>
    pass
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:24: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/b/badheadersize.bmp'>
    pass
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:24: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/b/badpalettesize.bmp'>
    pass
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:24: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/b/badwidth.bmp'>
    pass
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:24: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/b/reallybig.bmp'>
    pass
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:24: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/b/rletopdown.bmp'>
    pass
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:24: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/b/badbitcount.bmp'>
    pass

Tests/test_bmp_reference.py::TestBmpReference::test_good
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:102: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/g/pal4rle.bmp'>
    self.fail("Unsupported Image %s: %s" % (f, msg))
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:102: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/g/pal8rle.bmp'>
    self.fail("Unsupported Image %s: %s" % (f, msg))
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:102: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/g/rgb32bf.bmp'>
    self.fail("Unsupported Image %s: %s" % (f, msg))

Tests/test_bmp_reference.py::TestBmpReference::test_questionable
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/pal2.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/rgb24png.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/rgb16-231.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/pal8rletrns.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/rgba32abf.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/rgb24jpeg.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/pal8os2v2-16.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/rgba32.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/rgba16-4444.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/pal4rletrns.bmp'>
    raise
  /Users/hugo/github/Pillow/Tests/test_bmp_reference.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/bmp/q/rgb32-111110.bmp'>
    raise

Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception
  /Users/hugo/github/Pillow/src/PIL/Image.py:603: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.ppm'>
    self.fp = None

Tests/test_file_cur.py::TestFileCur::test_invalid_file
  /Users/hugo/github/Pillow/Tests/test_file_cur.py:29: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/deerstalker.cur'>
    with open(no_cursors_file, "rb") as cur.fp:

Tests/test_file_dcx.py::TestFileDcx::test_sanity
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.dcx'>
    testMethod()

Tests/test_file_fli.py::TestFileFli::test_sanity
  /Users/hugo/github/Pillow/Tests/test_file_fli.py:23: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.fli'>
    im = Image.open(animated_test_file)

Tests/test_file_gif.py::TestFileGif::test_iss634
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/iss634.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_lzw_bits
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/issue_2811.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_palette_434
  /Users/hugo/github/Pillow/Tests/test_file_gif.py:176: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/tempbzvob3sn.gif'>
    self.assert_image_similar(im, roundtrip(im), 1)
  /Users/hugo/github/Pillow/Tests/test_file_gif.py:177: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temp67xglpu0.gif'>
    self.assert_image_similar(im, roundtrip(im, optimize=True), 1)
  /Users/hugo/github/Pillow/Tests/test_file_gif.py:179: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/test.colors.gif'>
    im = im.convert("RGB")
  /Users/hugo/github/Pillow/Tests/test_file_gif.py:181: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temph8klqxts.gif'>
    reloaded = roundtrip(im).convert('RGB')

Tests/test_file_gif.py::TestFileGif::test_palette_handling
  /Users/hugo/github/Pillow/Tests/test_file_gif.py:151: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.gif'>
    im = im.convert('RGB')
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temp4e1wthuc.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_palette_save_ImagePalette
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temp3q0zn5g0.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_palette_save_L
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/tempj5jn89tv.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_palette_save_P
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/tempz19i65vx.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_roundtrip
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temp5vekd3f3.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_roundtrip2
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.gif'>
    testMethod()
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/tempcqd9d3y1.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_roundtrip_save_all
  /Users/hugo/github/Pillow/Tests/test_file_gif.py:128: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temp_vbk4p39.gif'>
    reread = Image.open(out)

Tests/test_file_gif.py::TestFileGif::test_sanity
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_save_I
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/tempj8nyk2jb.gif'>
    testMethod()

Tests/test_file_gif.py::TestFileGif::test_version
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/test.colors.gif'>
    testMethod()

Tests/test_file_icns.py::TestFileIcns::test_jp2_icon
  /Users/hugo/github/Pillow/src/PIL/IcnsImagePlugin.py:295: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/pillow3.icns'>
    self.icns = None

Tests/test_file_icns.py::TestFileIcns::test_older_icon
  /Users/hugo/github/Pillow/src/PIL/IcnsImagePlugin.py:295: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/pillow2.icns'>
    self.icns = None

Tests/test_file_icns.py::TestFileIcns::test_sanity
  /Users/hugo/github/Pillow/src/PIL/IcnsImagePlugin.py:295: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/pillow.icns'>
    self.icns = None

Tests/test_file_icns.py::TestFileIcns::test_save
  /Users/hugo/github/Pillow/src/PIL/IcnsImagePlugin.py:295: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/pillow.icns'>
    self.icns = None

Tests/test_file_icns.py::TestFileIcns::test_save_append_images
  /Users/hugo/github/Pillow/src/PIL/IcnsImagePlugin.py:295: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/pillow.icns'>
    self.icns = None
  /Users/hugo/github/Pillow/src/PIL/IcnsImagePlugin.py:295: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temp8vzq9d94.icns'>
    self.icns = None

Tests/test_file_icns.py::TestFileIcns::test_sizes
  /Users/hugo/github/Pillow/src/PIL/IcnsImagePlugin.py:295: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/pillow.icns'>
    self.icns = None

Tests/test_file_im.py::TestFileIm::test_roundtrip
  /Users/hugo/github/Pillow/Tests/test_file_im.py:49: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/tempf78by81h.im'>
    reread = Image.open(out)
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/tempw9_dnotf.im'>
    testMethod()

Tests/test_file_im.py::TestFileIm::test_sanity
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.im'>
    testMethod()

Tests/test_file_mic.py::TestFileMic::test_sanity
  /Users/hugo/github/Pillow/src/PIL/ImageMath.py:267: ResourceWarning: unclosed file <_io.FileIO name='Tests/images/hopper.mic' mode='rb' closefd=True>
    out = builtins.eval(expression, args)

Tests/test_file_mpo.py::TestFileMpo::test_image_grab
  /Users/hugo/github/Pillow/Tests/test_file_mpo.py:116: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/sugarshack.mpo'>
    im = Image.open(test_file)
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/frozenpond.mpo'>
    testMethod()

Tests/test_file_mpo.py::TestFileMpo::test_sanity
  /Users/hugo/github/Pillow/Tests/test_file_mpo.py:28: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/sugarshack.mpo'>
    im = Image.open(test_file)
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/frozenpond.mpo'>
    testMethod()

Tests/test_file_mpo.py::TestFileMpo::test_save
  /Users/hugo/github/Pillow/Tests/test_file_mpo.py:131: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/sugarshack.mpo'>
    im = Image.open(test_file)
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/frozenpond.mpo'>
    testMethod()

Tests/test_file_palm.py::TestFilePalm::test_monochrome
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py:250: ResourceWarning: unclosed file <_io.FileIO name='Tests/images/hopper.mic' mode='rb' closefd=True>
    self.name = name

Tests/test_file_pdf.py::TestFilePdf::test_multiframe_normal_save
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/dispose_bgnd.gif'>
    testMethod()

Tests/test_file_pdf.py::TestFilePdf::test_save_all
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/dispose_bgnd.gif'>
    testMethod()

Tests/test_file_png.py::TestFilePng::test_load_verify
  /Users/hugo/github/Pillow/src/PIL/PngImagePlugin.py:603: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.png'>
    self.fp = None

Tests/test_file_ppm.py::TestFilePpm::test_truncated_file
  /Users/hugo/github/Pillow/src/PIL/Image.py:603: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/tempbpwn0d6c.pgm'>
    self.fp = None

Tests/test_file_spider.py::TestImageSpider::test_loadImageSeries
  /Users/hugo/github/Pillow/src/PIL/SpiderImagePlugin.py:213: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.spider'>
    im = Image.open(img).convert2byte()

Tests/test_file_spider.py::TestImageSpider::test_sanity
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.spider'>
    testMethod()

Tests/test_file_tar.py::TestFileTar::test_sanity
  /Users/hugo/github/Pillow/Tests/test_file_tar.py:27: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.tar'>
    tar = TarIO.TarIO(TEST_TAR_FILE, 'hopper.jpg')
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.tar'>
    testMethod()

Tests/test_file_tiff.py::TestFileTiff::test_multipage
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/multipage.tiff'>
    testMethod()

Tests/test_file_webp_alpha.py::TestFileWebpAlpha::test_write_unsupported_mode_PA
  /Users/hugo/github/Pillow/Tests/test_file_webp_alpha.py:111: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/transparent.gif'>
    Image.open(file_path).save(temp_file)
  /Users/hugo/github/Pillow/Tests/test_file_webp_alpha.py:120: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/transparent.gif'>
    target = Image.open(file_path).convert("RGBA")

Tests/test_file_webp_animated.py::TestFileWebpAnimation::test_write_animation_L
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/iss634.gif'>
    testMethod()

Tests/test_image_convert.py::TestImageConvert::test_gif_with_rgba_palette_to_p
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/hopper.gif'>
    testMethod()

Tests/test_imagedraw.py::TestImageDraw::test_valueerror
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/chi.gif'>
    testMethod()

Tests/test_imagesequence.py::TestImageSequence::test_consecutive
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/multipage.tiff'>
    testMethod()

Tests/test_imagesequence.py::TestImageSequence::test_iterator
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/multipage.tiff'>
    testMethod()

Tests/test_imagesequence.py::TestImageSequence::test_palette_mmap
  /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py:615: ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/multipage-mmap.tiff'>
    testMethod()

Tests/test_mode_i16.py::TestModeI16::test_basic
  /Users/hugo/github/Pillow/Tests/test_mode_i16.py:50: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temppqy42ayb.im'>
    imOut = imIn.crop((0, 0, w, h))
  /Users/hugo/github/Pillow/Tests/test_mode_i16.py:50: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temp33snksmk.im'>
    imOut = imIn.crop((0, 0, w, h))
  /Users/hugo/github/Pillow/Tests/test_mode_i16.py:50: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/tempa5em7h_d.im'>
    imOut = imIn.crop((0, 0, w, h))
  /Users/hugo/github/Pillow/Tests/test_mode_i16.py:50: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temp6s_24nyx.im'>
    imOut = imIn.crop((0, 0, w, h))
  /Users/hugo/github/Pillow/Tests/test_mode_i16.py:50: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temph18rp_ik.im'>
    imOut = imIn.crop((0, 0, w, h))

Tests/test_psdraw.py::TestPsDraw::test_draw_postscript
  /Users/hugo/github/Pillow/src/PIL/PSDraw.py:142: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/kt/j77sf4_n6fnbx6pg199rbx700000gn/T/temp4ajv386j.ps' encoding='latin-1'>
    EpsImagePlugin._save(im, self.fp, None, 0)

Tests/test_pyroma.py::TestPyroma::test_pyroma
  /usr/local/lib/python3.7/site-packages/docutils/io.py:245: DeprecationWarning: 'U' mode is deprecated
    self.source = open(source_path, mode, **kwargs)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=========================================== 1135 passed, 76 skipped, 85 warnings in 32.39 seconds ===========================================

@radarhere
Copy link
Member Author

Well, I've added a test for this one at least.

@hugovk hugovk merged commit 9a420fc into python-pillow:master Sep 8, 2018
@radarhere radarhere deleted the webp_fp branch September 8, 2018 13:38
homm added a commit that referenced this pull request Oct 18, 2018
homm added a commit that referenced this pull request Oct 18, 2018
@radarhere radarhere added the WebP label Aug 1, 2023
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