Repository navigation
Fix Dependabot alerts: upgrade Pillow to 13.0.0 and require Python >=3.11 - #382
Conversation
…3.11 Addresses open Pillow security advisories by upgrading to patched version 13.0.0. Pillow 13 requires Python >=3.11, so minimum supported Python version is bumped accordingly and CI/workflows updated.
Reviewer's GuideImplementationRestore ValueError for invalid masked-array inputs in the image-processing workflows.
ConfigurationMove project metadata and dependencies to PEP 621 with Hatchling, require Python 3.11+, and declare Pillow 13.0.0 or later.
Update Dependabot to check GitHub Actions, Python, and Rust dependencies weekly, grouping updates by ecosystem.
Drop Python 3.10 from the test matrix and wheel builds to match the new minimum supported version.
Remove the Poetry configuration and setuptools setup script as part of the build-system migration.
DocumentationUpdate contributor instructions and project documentation to use uv and reflect Python 3.11+ support.
Lock files and vendored codeReplace the Poetry lockfile with a uv lockfile for the migrated project metadata and dependency set.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 4 issues
Fixed security issues:
- pillow (link)
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="pyproject.toml" line_range="32" />
<code_context>
[tool.poetry.dependencies]
-python = ">=3.10"
+python = ">=3.11"
numpy = ">=2.0.0"
imageio = ">=2.35.0"
</code_context>
<issue_to_address>
**Fallback installs retain vulnerable Pillow**
When the package is installed through setuptools or the Conda recipe, `setup.py` and recipe metadata do not consistently enforce the new Python floor or Pillow 13; setuptools can resolve Pillow through ImageIO's weaker requirement, leaving fallback installs on vulnerable Pillow versions.
Update `setup.py` and the Conda recipe to enforce Python >=3.11 and require Pillow >=13.
Also at `pyproject.toml:41`.
</issue_to_address>
### Comment 2
<location path="pyproject.toml" line_range="32" />
<code_context>
[tool.poetry.dependencies]
-python = ">=3.10"
+python = ">=3.11"
numpy = ">=2.0.0"
imageio = ">=2.35.0"
</code_context>
<issue_to_address>
**Supported Python installs fail**
When a user runs uv with Python 3.11, 3.12, or 3.13, `uv.lock` declares `requires-python = ">=3.14"`, so `uv sync` or other locked installs reject interpreters that the project metadata and CI support.
Regenerate `uv.lock` with a compatibility range and dependency resolution that support Python 3.11–3.13.
</issue_to_address>
### Comment 3
<location path=".github/workflows/testing.yml" line_range="12" />
<code_context>
fail-fast: false
matrix:
- python-version: ["3.10", "3.11", "3.12", "3.13"]
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
</code_context>
<issue_to_address>
**Python 3.14 locked install fails**
When a user installs the project from `poetry.lock` on Python 3.14, `poetry.lock` pins SciPy 1.13.0 and NumPy 2.2.6, whose locked artifacts do not include Python 3.14 wheels; installing the declared Python 3.14-supported project from the Poetry lock falls back to building these versions from source, and the unsupported SciPy build fails.
Update the locked dependency versions to releases that support Python 3.14 and regenerate the Poetry lockfile.
</issue_to_address>
### Comment 4
<location path=".github/workflows/wheels.yml" line_range="44" />
<code_context>
with:
target: ${{ matrix.target }}
- args: --release --out dist -i python3.10 python3.11 python3.12 python3.13 --manifest-path crates/openpiv_rust/Cargo.toml
+ args: --release --out dist -i python3.11 python3.12 python3.13 python3.14 --manifest-path crates/openpiv_rust/Cargo.toml
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
</code_context>
<issue_to_address>
**Rust extra lacks platform wheels**
When a user on Windows or macOS installs the optional Rust extra with Python 3.11, 3.13, or 3.14, the Windows and macOS Maturin jobs still build only for Python 3.12. Because the extension does not enable PyO3’s stable ABI, those jobs produce `cp312`-only wheels, leaving users on Python 3.11, 3.13, or 3.14 without an installable Rust extra on those platforms.
Build and publish compatible Rust wheels for each supported Python version on Windows and macOS, or configure and verify stable-ABI wheels.
</issue_to_address>Sourcery assessment
Approval pending. 4 findings to address first.
Blocking findings: pyproject.toml:32, pyproject.toml:32, .github/workflows/testing.yml:12, .github/workflows/wheels.yml:44
| with: | ||
| target: ${{ matrix.target }} | ||
| args: --release --out dist -i python3.10 python3.11 python3.12 python3.13 --manifest-path crates/openpiv_rust/Cargo.toml | ||
| args: --release --out dist -i python3.11 python3.12 python3.13 python3.14 --manifest-path crates/openpiv_rust/Cargo.toml |
There was a problem hiding this comment.
🟡 Medium · Rust extra lacks platform wheels
When a user on Windows or macOS installs the optional Rust extra with Python 3.11, 3.13, or 3.14, the Windows and macOS Maturin jobs still build only for Python 3.12. Because the extension does not enable PyO3’s stable ABI, those jobs produce cp312-only wheels, leaving users on Python 3.11, 3.13, or 3.14 without an installable Rust extra on those platforms.
Build and publish compatible Rust wheels for each supported Python version on Windows and macOS, or configure and verify stable-ABI wheels.
Prompt for AI agents
In `.github/workflows/wheels.yml` at line 44:
**Rust extra lacks platform wheels**
When a user on Windows or macOS installs the optional Rust extra with Python 3.11, 3.13, or 3.14, the Windows and macOS Maturin jobs still build only for Python 3.12. Because the extension does not enable PyO3’s stable ABI, those jobs produce `cp312`-only wheels, leaving users on Python 3.11, 3.13, or 3.14 without an installable Rust extra on those platforms.
Build and publish compatible Rust wheels for each supported Python version on Windows and macOS, or configure and verify stable-ABI wheels.Sourcery withdrew this approval because the latest commits introduced blocking findings.
Remove poetry.lock/setup.py, convert pyproject.toml to PEP 621 with hatchling build backend, regenerate uv.lock, and update docs/workflow instructions to use uv.
Summary
pillowfrom 12.3.0 to 13.0.0 inpoetry.lockto address open Pillow security advisories.Why
Dependabot reports multiple open Pillow vulnerabilities (including critical/high) fixed in 13.0.0.
Notes
poetry.lockregenerated with Poetry.Summary by Sourcery
Modernize project packaging and dependency management while upgrading Pillow and the supported Python baseline to improve security and maintainability.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation: