Skip to content

Add Ubuntu 26.04 LTS (Resolute Raccoon)#268

Merged
hugovk merged 3 commits intopython-pillow:mainfrom
hugovk:ubuntu-26.04
Apr 25, 2026
Merged

Add Ubuntu 26.04 LTS (Resolute Raccoon)#268
hugovk merged 3 commits intopython-pillow:mainfrom
hugovk:ubuntu-26.04

Conversation

@hugovk
Copy link
Copy Markdown
Member

@hugovk hugovk commented Apr 24, 2026

Released yesterday: https://documentation.ubuntu.com/release-notes/26.04/

Pretty much the same as 24.04, except it comes with python3.13 instead of python3.12.


Do you think we need all four variants of 26.04?

Or the other way round, do we need to keep all four variants of 24.04?


Another difference for ubuntu-26.04-plucky-s390x, it initially had a a WebP failure:

Details
=================================== FAILURES ===================================
____________________________ test_write_animation_L ____________________________

tmp_path = PosixPath('/tmp/pytest-of-pillow/pytest-0/test_write_animation_L0')

    def test_write_animation_L(tmp_path: Path) -> None:
        """
        Convert an animated GIF to animated WebP, then compare the frame count, and first
        and last frames to ensure they're visually similar.
        """
    
        with Image.open("Tests/images/iss634.gif") as orig:
            assert isinstance(orig, GifImagePlugin.GifImageFile)
            assert orig.n_frames > 1
    
            temp_file = tmp_path / "temp.webp"
            orig.save(temp_file, save_all=True)
            with Image.open(temp_file) as im:
                assert isinstance(im, WebPImagePlugin.WebPImageFile)
                assert im.n_frames == orig.n_frames
    
                # Compare first and last frames to the original animated GIF
                orig.load()
                im.load()
                assert_image_similar(im, orig.convert("RGBA"), 32.9)
    
                if is_big_endian() and not has_feature_version("webp", "1.2.2"):
                    pytest.skip("Fails with libwebp earlier than 1.2.2")
                orig.seek(orig.n_frames - 1)
                im.seek(im.n_frames - 1)
                orig.load()
                im.load()
>               assert_image_similar(im, orig.convert("RGBA"), 32.9)

Tests/test_file_webp_animated.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Tests/helper.py:140: in assert_image_similar
    raise e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = <PIL.WebPImagePlugin.WebPImageFile image mode=RGBA size=245x245 at 0x7FE8F15042B0>
b = <PIL.Image.Image image mode=RGBA size=245x245 at 0x7FE8F1303D50>
epsilon = 32.9, msg = None

    def assert_image_similar(
        a: Image.Image, b: Image.Image, epsilon: float, msg: str | None = None
    ) -> None:
        assert a.mode == b.mode, msg or f"got mode {repr(a.mode)}, expected {repr(b.mode)}"
        assert a.size == b.size, msg or f"got size {repr(a.size)}, expected {repr(b.size)}"
    
        a, b = convert_to_comparable(a, b)
    
        diff = 0
        for ach, bch in zip(a.split(), b.split()):
            chdiff = ImageMath.lambda_eval(
                lambda args: abs(args["a"] - args["b"]), a=ach, b=bch
            ).convert("L")
            diff += sum(i * num for i, num in enumerate(chdiff.histogram()))
    
        ave_diff = diff / (a.size[0] * a.size[1])
        try:
>           assert epsilon >= ave_diff, (
                (msg or "")
                + f" average pixel value difference {ave_diff:.4f} > epsilon {epsilon:.4f}"
            )
E           AssertionError:  average pixel value difference 50.2241 > epsilon 32.9000
E           assert 32.9 >= 50.22408996251562

Tests/helper.py:129: AssertionError

This was because, despite not listing the libwebp-dev as a dependency and building our own with ./install_webp.sh, the system libwebp-dev is being installed as a transitive dependency of another package.

Adding this means we use our own version:

ENV LD_LIBRARY_PATH=/usr/lib

PS I've not confirmed it, but it looks like the same thing is happening for ubuntu-24.04-noble-s390x, but maybe they're either the same version or it doesn't matter. So for 24.04 we might want to:

  • explicitly use the system libwebp-dev and save time by not building our own, because we don't need to build it
  • add the path to ensure we test the built one
  • or if we're going to drop ubuntu-24.04-noble-s390x, the issue goes away

@radarhere
Copy link
Copy Markdown
Member

radarhere commented Apr 25, 2026

it looks like the same thing is happening for ubuntu-24.04-noble-s390x, but maybe they're either the same version or it doesn't matter.

Yes, the packaged WebP is also being selected on 24.04 s390x, but it is WebP 1.3.2, while 26.04 has packaged 1.5.0. I tested installing 1.5.0 using our script, and that passed - I guess there is something specific to packaged WebP 1.5.0 that is causing a problem on 26.04. See also python-pillow/Pillow#5984

do we need to keep all four variants of 24.04?

#205 removed the non-amd64 variants of 22.04 when we added 24.04.

@hugovk hugovk force-pushed the ubuntu-26.04 branch 2 times, most recently from eb4e2ea to f19cd4e Compare April 25, 2026 11:09
Comment thread .github/workflows/build.yml
hugovk and others added 2 commits April 25, 2026 17:31
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
@hugovk hugovk enabled auto-merge April 25, 2026 20:44
@hugovk hugovk merged commit 731c911 into python-pillow:main Apr 25, 2026
22 checks passed
@hugovk hugovk deleted the ubuntu-26.04 branch April 26, 2026 09:05
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.

2 participants