Skip to content

Commit

Permalink
Merge branch 'main' into pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 26, 2023
2 parents 2b806c5 + f8e65ec commit 4de1765
Show file tree
Hide file tree
Showing 315 changed files with 737 additions and 236 deletions.
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
@@ -0,0 +1,6 @@
# Flake8
8de95676e0fd89f2326b3953488ab66ff29cd2d0
# Format with Black
53a7e3500437a9fd5826bc04758f7116bd7e52dc
# Format the C code with ClangFormat
46b7e86bab79450ec0a2866c6c0c679afb659d17
4 changes: 2 additions & 2 deletions .github/workflows/cifuzz.yml
Expand Up @@ -42,13 +42,13 @@ jobs:
language: python
dry-run: false
- name: Upload New Crash
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
- name: Upload Legacy Crash
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: steps.run.outcome == 'success'
with:
name: crash
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Expand Up @@ -2,6 +2,9 @@ name: Lint

on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1

permissions:
contents: read

Expand Down Expand Up @@ -46,3 +49,6 @@ jobs:
run: tox -e lint
env:
PRE_COMMIT_COLOR: always

- name: Mypy
run: tox -e mypy
2 changes: 2 additions & 0 deletions .github/workflows/system-info.py
Expand Up @@ -6,6 +6,8 @@
Requested here:
https://github.com/actions/virtual-environments/issues/79
"""
from __future__ import annotations

import os
import platform
import sys
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-cygwin.yml
Expand Up @@ -132,7 +132,7 @@ jobs:
dash.exe -c "mkdir -p Tests/errors"
- name: Upload errors
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: errors
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Expand Up @@ -190,7 +190,7 @@ jobs:
shell: bash

- name: Upload errors
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: errors
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -112,7 +112,7 @@ jobs:
mkdir -p Tests/errors
- name: Upload errors
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: errors
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/wheels.yml
Expand Up @@ -116,10 +116,7 @@ jobs:
& python.exe -m pip install -r .ci/requirements-cibw.txt
# Cannot cross-compile FriBiDi (only used for tests)
$FLAGS = ("--no-imagequant", "--architecture=${{ matrix.arch }}")
if ('${{ matrix.arch }}' -eq 'ARM64') { $FLAGS += "--no-fribidi" }
& python.exe winbuild\build_prepare.py -v @FLAGS
& python.exe winbuild\build_prepare.py -v --no-imagequant --architecture=${{ matrix.arch }}
shell: pwsh

- name: Build wheels
Expand Down Expand Up @@ -162,19 +159,11 @@ jobs:
name: dist-${{ matrix.arch }}
path: ./wheelhouse/*.whl

- name: Prepare to upload FriBiDi
if: "matrix.arch != 'ARM64'"
run: |
mkdir fribidi\${{ matrix.arch }}
copy winbuild\build\bin\fribidi* fribidi\${{ matrix.arch }}
shell: cmd

- name: Upload fribidi.dll
if: "matrix.arch != 'ARM64'"
uses: actions/upload-artifact@v4
with:
name: fribidi-${{ matrix.arch }}
path: fribidi\*
name: fribidi-windows-${{ matrix.arch }}
path: winbuild\build\bin\fribidi*

sdist:
runs-on: ubuntu-latest
Expand Down
18 changes: 18 additions & 0 deletions CHANGES.rst
Expand Up @@ -5,6 +5,24 @@ Changelog (Pillow)
10.2.0 (unreleased)
-------------------

- Fix incorrect color blending for overlapping glyphs #7497
[ZachNagengast, nulano, radarhere]

- Attempt memory mapping when tile args is a string #7565
[radarhere]

- Fill identical pixels with transparency in subsequent frames when saving GIF #7568
[radarhere]

- Corrected duration when combining multiple GIF frames into single frame #7521
[radarhere]

- Handle disposing GIF background from outside palette #7515
[radarhere]

- Seek past the data when skipping a PSD layer #7483
[radarhere]

- Import plugins relative to the module #7576
[deliangyang, jaxx0n]

Expand Down
1 change: 1 addition & 0 deletions Tests/32bit_segfault_check.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
from __future__ import annotations

import sys

Expand Down
1 change: 1 addition & 0 deletions Tests/bench_cffi_access.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import time

from PIL import PyAccess
Expand Down
1 change: 1 addition & 0 deletions Tests/check_fli_oob.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
from __future__ import annotations

from PIL import Image

Expand Down
1 change: 1 addition & 0 deletions Tests/check_fli_overflow.py
@@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import Image

TEST_FILE = "Tests/images/fli_overflow.fli"
Expand Down
1 change: 1 addition & 0 deletions Tests/check_icns_dos.py
@@ -1,5 +1,6 @@
# Tests potential DOS of IcnsImagePlugin with 0 length block.
# Run from anywhere that PIL is importable.
from __future__ import annotations

from io import BytesIO

Expand Down
1 change: 1 addition & 0 deletions Tests/check_imaging_leaks.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
from __future__ import annotations
import pytest

from PIL import Image
Expand Down
1 change: 1 addition & 0 deletions Tests/check_j2k_dos.py
@@ -1,5 +1,6 @@
# Tests potential DOS of Jpeg2kImagePlugin with 0 length block.
# Run from anywhere that PIL is importable.
from __future__ import annotations

from io import BytesIO

Expand Down
1 change: 1 addition & 0 deletions Tests/check_j2k_leaks.py
@@ -1,3 +1,4 @@
from __future__ import annotations
from io import BytesIO

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/check_j2k_overflow.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import Image
Expand Down
1 change: 1 addition & 0 deletions Tests/check_jp2_overflow.py
Expand Up @@ -12,6 +12,7 @@
# the output should be empty. There may be python issues
# in the valgrind especially if run in a debug python
# version.
from __future__ import annotations


from PIL import Image
Expand Down
1 change: 1 addition & 0 deletions Tests/check_jpeg_leaks.py
@@ -1,3 +1,4 @@
from __future__ import annotations
from io import BytesIO

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/check_large_memory.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import sys

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/check_large_memory_numpy.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import sys

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/check_libtiff_segfault.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import Image
Expand Down
1 change: 1 addition & 0 deletions Tests/check_png_dos.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import zlib
from io import BytesIO

Expand Down
1 change: 1 addition & 0 deletions Tests/check_release_notes.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import sys
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions Tests/check_wheel.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import sys

from PIL import features
Expand Down
1 change: 1 addition & 0 deletions Tests/conftest.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import io


Expand Down
1 change: 1 addition & 0 deletions Tests/createfontdatachunk.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
from __future__ import annotations
import base64
import os

Expand Down
Binary file added Tests/fonts/CBDTTestFont.ttf
Binary file not shown.
Binary file added Tests/fonts/EBDTTestFont.ttf
Binary file not shown.
3 changes: 2 additions & 1 deletion Tests/fonts/LICENSE.txt
Expand Up @@ -2,7 +2,6 @@
NotoNastaliqUrdu-Regular.ttf and NotoSansSymbols-Regular.ttf, from https://github.com/googlei18n/noto-fonts
NotoSans-Regular.ttf, from https://www.google.com/get/noto/
NotoSansJP-Thin.otf, from https://www.google.com/get/noto/help/cjk/
NotoColorEmoji.ttf, from https://github.com/googlefonts/noto-emoji
AdobeVFPrototype.ttf, from https://github.com/adobe-fonts/adobe-variable-font-prototype
TINY5x3GX.ttf, from http://velvetyne.fr/fonts/tiny
ArefRuqaa-Regular.ttf, from https://github.com/google/fonts/tree/master/ofl/arefruqaa
Expand All @@ -25,3 +24,5 @@ FreeMono.ttf is licensed under GPLv3.
10x20-ISO8859-1.pcf, from https://packages.ubuntu.com/xenial/xfonts-base

"Public domain font. Share and enjoy."

CBDTTestFont.ttf and EBDTTestFont.ttf from https://github.com/nulano/font-tests are public domain.
Binary file removed Tests/fonts/NotoColorEmoji.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions Tests/helper.py
@@ -1,6 +1,7 @@
"""
Helper functions.
"""
from __future__ import annotations

import logging
import os
Expand Down
Binary file added Tests/images/background_outside_palette.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tests/images/bitmap_font_blend.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Tests/images/bitmap_font_stroke_basic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Tests/images/bitmap_font_stroke_raqm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tests/images/cbdt.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tests/images/cbdt_mask.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Tests/images/cbdt_notocoloremoji.png
Binary file not shown.
Binary file removed Tests/images/cbdt_notocoloremoji_mask.png
Binary file not shown.
Binary file modified Tests/images/default_font_freetype.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tests/images/five_channels.psd
Binary file not shown.
Binary file modified Tests/images/test_combine_caron_below_ttb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Tests/images/test_combine_caron_below_ttb_lb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Tests/images/test_combine_caron_ttb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Tests/images/test_combine_caron_ttb_lt.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Tests/oss-fuzz/fuzz_font.py
Expand Up @@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import annotations


import atheris
Expand Down
1 change: 1 addition & 0 deletions Tests/oss-fuzz/fuzz_pillow.py
Expand Up @@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import annotations


import atheris
Expand Down
1 change: 1 addition & 0 deletions Tests/oss-fuzz/fuzzers.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import io
import warnings

Expand Down
1 change: 1 addition & 0 deletions Tests/oss-fuzz/test_fuzzers.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import subprocess
import sys

Expand Down
1 change: 1 addition & 0 deletions Tests/test_000_sanity.py
@@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import Image


Expand Down
1 change: 1 addition & 0 deletions Tests/test_binary.py
@@ -1,3 +1,4 @@
from __future__ import annotations
from PIL import _binary


Expand Down
1 change: 1 addition & 0 deletions Tests/test_bmp_reference.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import os
import warnings

Expand Down
1 change: 1 addition & 0 deletions Tests/test_box_blur.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import Image, ImageFilter
Expand Down
1 change: 1 addition & 0 deletions Tests/test_color_lut.py
@@ -1,3 +1,4 @@
from __future__ import annotations
from array import array

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/test_core_resources.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import sys

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/test_decompression_bomb.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import Image
Expand Down
1 change: 1 addition & 0 deletions Tests/test_deprecate.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import _deprecate
Expand Down
1 change: 1 addition & 0 deletions Tests/test_features.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import io
import re

Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_apng.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import Image, ImageSequence, PngImagePlugin
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_blp.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import Image
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_bmp.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import io

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_bufrstub.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import BufrStubImagePlugin, Image
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_container.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import ContainerIO, Image
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_cur.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import CurImagePlugin, Image
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_dcx.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import warnings

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_dds.py
@@ -1,4 +1,5 @@
"""Test DdsImagePlugin"""
from __future__ import annotations
from io import BytesIO

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_eps.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import io

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_fits.py
@@ -1,3 +1,4 @@
from __future__ import annotations
from io import BytesIO

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_fli.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import warnings

import pytest
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_fpx.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import Image
Expand Down
1 change: 1 addition & 0 deletions Tests/test_file_ftex.py
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest

from PIL import FtexImagePlugin, Image
Expand Down

0 comments on commit 4de1765

Please sign in to comment.