Skip to content

Commit

Permalink
Merge branch 'main' into gif
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 12, 2022
2 parents e6ffbfd + a653daa commit 5f8938c
Show file tree
Hide file tree
Showing 101 changed files with 2,015 additions and 1,625 deletions.
4 changes: 2 additions & 2 deletions .appveyor.yml
Expand Up @@ -25,8 +25,8 @@ install:
- mv c:\pillow-depends-main c:\pillow-depends
- xcopy /S /Y c:\pillow-depends\test_images\* c:\pillow\tests\images
- 7z x ..\pillow-depends\nasm-2.15.05-win64.zip -oc:\
- ..\pillow-depends\gs9561w32.exe /S
- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs9.56.1\bin;%PATH%
- ..\pillow-depends\gs1000w32.exe /S
- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs10.0.0\bin;%PATH%
- cd c:\pillow\winbuild\
- ps: |
c:\python37\python.exe c:\pillow\winbuild\build_prepare.py -v --depends=C:\pillow-depends\
Expand Down
17 changes: 17 additions & 0 deletions .github/renovate.json
@@ -0,0 +1,17 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"labels": [
"Dependency"
],
"packageRules": [
{
"groupName": "github-actions",
"matchManagers": ["github-actions"],
"separateMajorMinor": "false"
}
],
"schedule": ["on the 3rd day of the month"]
}
4 changes: 4 additions & 0 deletions .github/workflows/cifuzz.yml
Expand Up @@ -14,6 +14,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Fuzzing:
runs-on: ubuntu-latest
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/lint.yml
Expand Up @@ -5,6 +5,10 @@ on: [push, pull_request, workflow_dispatch]
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

Expand All @@ -16,15 +20,15 @@ jobs:
- uses: actions/checkout@v3

- name: pre-commit cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: lint-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
restore-keys: |
lint-pre-commit-
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release-drafter.yml
Expand Up @@ -10,6 +10,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
update_release_draft:
permissions:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/stale.yml
Expand Up @@ -8,6 +8,10 @@ on:
permissions:
issues: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
stale:
if: github.repository_owner == 'python-pillow'
Expand All @@ -16,7 +20,7 @@ jobs:

steps:
- name: "Check issues"
uses: actions/stale@v5
uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
only-labels: "Awaiting OP Action"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-cygwin.yml
Expand Up @@ -5,6 +5,10 @@ on: [push, pull_request, workflow_dispatch]
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: windows-latest
Expand Down Expand Up @@ -44,7 +48,7 @@ jobs:
qt5-devel-tools subversion xorg-server-extra zlib-devel
- name: Add Lapack to PATH
uses: egor-tensin/cleanup-path@v1
uses: egor-tensin/cleanup-path@v2
with:
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack'

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-docker.yml
Expand Up @@ -5,6 +5,10 @@ on: [push, pull_request, workflow_dispatch]
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

Expand Down Expand Up @@ -79,7 +83,7 @@ jobs:
MATRIX_DOCKER: ${{ matrix.docker }}

- name: Upload coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
flags: GHA_Docker
name: ${{ matrix.docker }}
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/test-mingw.yml
Expand Up @@ -5,6 +5,10 @@ on: [push, pull_request, workflow_dispatch]
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: windows-latest
Expand Down Expand Up @@ -73,11 +77,11 @@ jobs:
python3 -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests
- name: Upload coverage
run: |
python3 -m pip install codecov
bash <(curl -s https://codecov.io/bash) -F GHA_Windows
env:
CODECOV_NAME: ${{ matrix.name }}
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: GHA_Windows
name: ${{ matrix.name }}

success:
permissions:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-valgrind.yml
Expand Up @@ -16,6 +16,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/test-windows.yml
Expand Up @@ -5,6 +5,10 @@ on: [push, pull_request, workflow_dispatch]
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: windows-latest
Expand Down Expand Up @@ -36,7 +40,7 @@ jobs:

# sets env: pythonLocation
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
Expand All @@ -55,8 +59,8 @@ jobs:
7z x winbuild\depends\nasm-2.15.05-win64.zip "-o$env:RUNNER_WORKSPACE\"
echo "$env:RUNNER_WORKSPACE\nasm-2.15.05" >> $env:GITHUB_PATH
winbuild\depends\gs9561w32.exe /S
echo "C:\Program Files (x86)\gs\gs9.56.1\bin" >> $env:GITHUB_PATH
winbuild\depends\gs1000w32.exe /S
echo "C:\Program Files (x86)\gs\gs10.0.0\bin" >> $env:GITHUB_PATH
xcopy /S /Y winbuild\depends\test_images\* Tests\images\
Expand All @@ -66,7 +70,7 @@ jobs:

- name: Cache build
id: build-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: winbuild\build
key:
Expand Down Expand Up @@ -171,7 +175,7 @@ jobs:
shell: pwsh

- name: Upload coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: GHA_Windows
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Expand Up @@ -5,6 +5,10 @@ on: [push, pull_request, workflow_dispatch]
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

Expand All @@ -30,11 +34,6 @@ jobs:
REVERSE: "--reverse"
- python-version: "3.8"
PYTHONOPTIMIZE: 2
# Include new variables for Codecov
- os: ubuntu-latest
codecov-flag: GHA_Ubuntu
- os: macos-latest
codecov-flag: GHA_macOS

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
Expand All @@ -43,7 +42,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down Expand Up @@ -99,17 +98,18 @@ jobs:
- name: Docs
if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == 3.10
run: |
python3 -m pip install furo sphinx-copybutton sphinx-issues sphinx-removed-in sphinxext-opengraph
make doccheck
- name: After success
run: |
.ci/after_success.sh
- name: Upload coverage
run: bash <(curl -s https://codecov.io/bash) -F ${{ matrix.codecov-flag }}
env:
CODECOV_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }}
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: ${{ matrix.os == 'macos-latest' && 'GHA_macOS' || 'GHA_Ubuntu' }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

success:
permissions:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/tidelift.yml
@@ -1,4 +1,5 @@
name: Tidelift Align

on:
schedule:
- cron: "30 2 * * *" # daily at 02:30 UTC
Expand All @@ -15,6 +16,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
if: github.repository_owner == 'python-pillow'
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Expand Up @@ -40,6 +40,7 @@ repos:
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: check-json
- id: check-yaml

- repo: https://github.com/sphinx-contrib/sphinx-lint
Expand Down
42 changes: 42 additions & 0 deletions CHANGES.rst
Expand Up @@ -5,6 +5,48 @@ Changelog (Pillow)
9.3.0 (unreleased)
------------------

- Round box position to integer when pasting embedded color #6517
[radarhere, nulano]

- Removed EXIF prefix when saving WebP #6582
[radarhere]

- Pad IM palette to 768 bytes when saving #6579
[radarhere]

- Added DDS BC6 reading #6449
[ShadelessFox, REDxEYE, radarhere]

- Added support for opening WhiteIsZero 16-bit integer TIFF images #6642
[JayWiz, radarhere]

- Raise an error when allocating translucent color to RGB palette #6654
[jsbueno, radarhere]

- Added reading of TIFF child images #6569
[radarhere]

- Improved ImageOps palette handling #6596
[PososikTeam, radarhere]

- Defer parsing of palette into colors #6567
[radarhere]

- Apply transparency to P images in ImageTk.PhotoImage #6559
[radarhere]

- Use rounding in ImageOps contain() and pad() #6522
[bibinhashley, radarhere]

- Fixed GIF remapping to palette with duplicate entries #6548
[radarhere]

- Allow remap_palette() to return an image with less than 256 palette entries #6543
[radarhere]

- Corrected BMP and TGA palette size when saving #6500
[radarhere]

- Do not call load() before draft() in Image.thumbnail #6539
[radarhere]

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Expand Up @@ -25,6 +25,7 @@ exclude .coveragerc
exclude .editorconfig
exclude .readthedocs.yml
exclude codecov.yml
exclude renovate.json
global-exclude .git*
global-exclude *.pyc
global-exclude *.so
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -17,11 +17,12 @@ coverage:

.PHONY: doc
doc:
python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install .
$(MAKE) -C docs html

.PHONY: doccheck
doccheck:
$(MAKE) -C docs html
$(MAKE) doc
# Don't make our tests rely on the links in the docs being up every single build.
# We don't control them. But do check, and update them to the target of their redirects.
$(MAKE) -C docs linkcheck || true
Expand Down
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -74,6 +74,9 @@ As of 2019, Pillow development is
<a href="https://pypi.org/project/Pillow/"><img
alt="Number of PyPI downloads"
src="https://img.shields.io/pypi/dm/pillow.svg"></a>
<a href="https://bestpractices.coreinfrastructure.org/projects/6331"><img
alt="OpenSSF Best Practices"
src="https://bestpractices.coreinfrastructure.org/projects/6331/badge"></a>
</td>
</tr>
<tr>
Expand Down
Binary file added Tests/images/bc6h.dds
Binary file not shown.
Binary file added Tests/images/bc6h.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/bc6h_sf.dds
Binary file not shown.
Binary file added Tests/images/bc6h_sf.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/bw_gradient.imt
Binary file not shown.
Binary file added Tests/images/child_ifd.tiff
Binary file not shown.
Binary file added Tests/images/child_ifd_jpeg.tiff
Binary file not shown.
Binary file added Tests/images/hopper_palette_chunk_second.fli
Binary file not shown.
Binary file added Tests/images/text_float_coord.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/text_float_coord_1_alt.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/unimplemented_dxgi_format.dds
Binary file not shown.

0 comments on commit 5f8938c

Please sign in to comment.