Skip to content

Commit 54d329b

Browse files
committed
Merge branch 'main' into import
2 parents f6f3dab + 8afedb7 commit 54d329b

347 files changed

Lines changed: 6387 additions & 4254 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ init:
66
# Uncomment previous line to get RDP access during the build.
77

88
environment:
9+
COVERAGE_CORE: sysmon
910
EXECUTABLE: python.exe
1011
TEST_OPTIONS:
1112
DEPLOY: YES
@@ -14,7 +15,7 @@ environment:
1415
ARCHITECTURE: x86
1516
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
1617
- PYTHON: C:/Python38-x64
17-
ARCHITECTURE: x64
18+
ARCHITECTURE: AMD64
1819
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
1920

2021

.ci/requirements-cibw.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cibuildwheel==2.16.2
1+
cibuildwheel==2.17.0

.ci/requirements-mypy.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mypy==1.9.0

.coveragerc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22

33
[report]
44
# Regexes for lines to exclude from consideration
5-
exclude_lines =
6-
# Have to re-enable the standard pragma:
7-
pragma: no cover
8-
9-
# Don't complain if non-runnable code isn't run:
5+
exclude_also =
6+
# Don't complain if non-runnable code isn't run
107
if 0:
118
if __name__ == .__main__.:
129
# Don't complain about debug code
1310
if DEBUG:
11+
# Don't complain about compatibility code for missing optional dependencies
12+
except ImportError
13+
if TYPE_CHECKING:
14+
@abc.abstractmethod
15+
# Empty bodies in protocols or abstract methods
16+
^\s*def [a-zA-Z0-9_]+\(.*\)(\s*->.*)?:\s*\.\.\.(\s*#.*)?$
17+
^\s*\.\.\.(\s*#.*)?$
1418

1519
[run]
1620
omit =

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tidelift: "pypi/Pillow"
1+
tidelift: "pypi/pillow"

.github/problem-matchers/gcc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"__comment": "Based on vscode-cpptools' Extension/package.json gcc rule",
3+
"problemMatcher": [
4+
{
5+
"owner": "gcc-problem-matcher",
6+
"pattern": [
7+
{
8+
"regexp": "^\\s*(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
9+
"file": 1,
10+
"line": 2,
11+
"column": 3,
12+
"severity": 4,
13+
"message": 5
14+
}
15+
]
16+
}
17+
]
18+
}

.github/release-drafter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ categories:
1313
label: "Removal"
1414
- title: "Testing"
1515
label: "Testing"
16+
- title: "Type hints"
17+
label: "Type hints"
1618

1719
exclude-labels:
1820
- "changelog: skip"

.github/workflows/docs.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ on:
77
paths:
88
- ".github/workflows/docs.yml"
99
- "docs/**"
10+
- "src/PIL/**"
1011
pull_request:
1112
paths:
1213
- ".github/workflows/docs.yml"
1314
- "docs/**"
15+
- "src/PIL/**"
1416
workflow_dispatch:
1517

1618
permissions:
@@ -37,16 +39,26 @@ jobs:
3739
with:
3840
python-version: "3.x"
3941
cache: pip
40-
cache-dependency-path: ".ci/*.sh"
42+
cache-dependency-path: |
43+
".ci/*.sh"
44+
"pyproject.toml"
4145
4246
- name: Build system information
4347
run: python3 .github/workflows/system-info.py
4448

49+
- name: Cache libimagequant
50+
uses: actions/cache@v4
51+
id: cache-libimagequant
52+
with:
53+
path: ~/cache-libimagequant
54+
key: ${{ runner.os }}-libimagequant-${{ hashFiles('depends/install_imagequant.sh') }}
55+
4556
- name: Install Linux dependencies
4657
run: |
4758
.ci/install.sh
4859
env:
4960
GHA_PYTHON_VERSION: "3.x"
61+
GHA_LIBIMAGEQUANT_CACHE_HIT: ${{ steps.cache-libimagequant.outputs.cache-hit }}
5062

5163
- name: Build
5264
run: |

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v4
2424

2525
- name: pre-commit cache
26-
uses: actions/cache@v3
26+
uses: actions/cache@v4
2727
with:
2828
path: ~/.cache/pre-commit
2929
key: lint-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}

.github/workflows/macos-install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
set -e
44

5-
brew install libtiff libjpeg openjpeg libimagequant webp little-cms2 freetype libraqm
5+
brew install \
6+
freetype \
7+
ghostscript \
8+
libimagequant \
9+
libjpeg \
10+
libraqm \
11+
libtiff \
12+
little-cms2 \
13+
openjpeg \
14+
webp
615
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
716

817
# TODO Update condition when cffi supports 3.13

0 commit comments

Comments
 (0)