Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
merge-multiple: true
path: dist

- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3

testpypi:
needs: [ check, build ]
Expand All @@ -146,7 +146,7 @@ jobs:
merge-multiple: true
path: dist

- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
with:
repository-url: https://test.pypi.org/legacy/

Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
- uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: '0.12.7'
python-version: '3.12'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
shell: bash
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)" >> "$GITHUB_ENV"

- uses: pypa/cibuildwheel@b3395e271a35f73dad77f21802abe9b986dfe299 # v4.3.1
- uses: pypa/cibuildwheel@f9b966cfadf4109556cadc5bb39ddb72d0ce664e # v4.3.5
env:
CIBW_BUILD: '*-${{ matrix.platform }}'

Expand Down
7 changes: 4 additions & 3 deletions benchmarks/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from __future__ import annotations

import datetime
import datetime as dt
import os
import platform
import subprocess
Expand Down Expand Up @@ -53,7 +53,8 @@ def rgb(self) -> npt.NDArray[np.uint8]:
import numpy as np # noqa: PLC0415 -- optional, as in the binding
from PIL import Image as PILImage # noqa: PLC0415 -- optional

with PILImage.open(self.path) as img:
img = PILImage.open(self.path)
with img:
return np.ascontiguousarray(np.asarray(img.convert("RGB")))

@cached_property
Expand Down Expand Up @@ -125,7 +126,7 @@ def environment(effort: Effort) -> dict[str, object]:
if threaded:
python += f" free-threaded (GIL {'on' if gil_enabled() else 'off'})"
return {
"date": datetime.datetime.now(datetime.timezone.utc).date().isoformat(),
"date": dt.datetime.now(dt.timezone.utc).date().isoformat(),
"machine": f"{_processor()}, {os.cpu_count()} CPUs, "
f"{psutil.virtual_memory().total / 2**30:.0f} GiB",
"os": platform.platform(),
Expand Down
3 changes: 2 additions & 1 deletion examples/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def main(argv: list[str]) -> int:
return 1
path = Path(argv[1])
data = path.read_bytes()
with Image.open(path) as opened:
opened = Image.open(path)
with opened:
image = opened.convert("RGB")
sources: dict[str, ph.Source] = {
"path": path,
Expand Down
Loading
Loading