Merged
Conversation
…ed minimum required Python version to 3.9 (#8) * Using importlib instead of pkg_resources to get version * Bumped min supported python version to... the min supported python version
* Updated maturin CI * macOS 12 runner image is deprecated, switching to macOS 13 * Updating test CI
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the project’s minimum requirements and dependencies while addressing a CLI bug and modernizing the code for compatibility with newer versions of PyO3, maturin, and Rust. Key changes include:
- Bumping Python’s minimum version to 3.9 and Rust’s to 1.63, with an update of PyO3 from 0.17.3 to 0.24.2 and maturin from 0.14–0.15 to 1.0–2.0.
- Adjusting PyO3 function annotations and module initialization to align with the updated API.
- Updating workflows, CLI version retrieval, README formatting, and package metadata.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib.rs | Updated PyO3 annotations and module initialization to accommodate API changes. |
| python/maptide/cli.py | Switched version retrieval from pkg_resources to importlib.metadata. |
| pyproject.toml | Updated dependency versions and metadata, and adjusted Python version requirements. |
| README.md | Improved formatting and instructions for setting up a virtual environment. |
| Cargo.toml | Updated package version, Rust version, and PyO3 dependency to reflect new requirements. |
| .github/workflows/test.yml | Added a new test workflow for basic CLI health checks across Python versions. |
| .github/workflows/CI.yml | Modified CI workflows to use newer GitHub actions versions and expanded matrix support. |
Comments suppressed due to low confidence (2)
src/lib.rs:16
- The Coordinate struct now derives IntoPyObject, replacing the manual IntoPy implementation. Confirm that this change handles all required Python object conversions and fully aligns with the updated PyO3 API.
#[derive(IntoPyObject, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
src/lib.rs:588
- The maptide function signature has been updated to use Bound in accordance with the new PyO3 API. Ensure that this change is reflected in dependent code and documentation for consistent module initialization.
fn maptide(m: &Bound<'_, PyModule>) -> PyResult<()> {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Software Updates
0.17.3to0.24.2. Fixed API changes insrc/lib.rs.>=0.14,<0.15to>=1.0,<2.0.Workflows
CI.ymlfrom maturinv1.3.0tov1.8.3.test.ymlfor basic CLI health check across supported Python versions.Bug Fixes
importlib.metadata.versionoverpkg_resourcesto determine version number in CLI, caused issues in Python>=3.12 aspkg_resourcesrequiressetuptoolsis installed: Usingimportlibinstead ofpkg_resourcesfor version number, bumped minimum required Python version to 3.9 #8Other
README.mdformatting and wording.pyproject.tomlwith package metadata.