Skip to content

Enable PyDSD to support rustmatrix, enabling modern Python compatibility - #112

Open
rcjackson wants to merge 4 commits into
josephhardinee:masterfrom
rcjackson:rustmatrix
Open

rcjackson wants to merge 4 commits into
josephhardinee:masterfrom
rcjackson:rustmatrix

Conversation

@rcjackson

Copy link
Copy Markdown
Contributor

This PR implements support for rustmatrix, the new T-matrix scattering package written in rust with syntax based on pytmatrix. This edit enables support for either pymatrix or rustmatrix, defaulting to rustmatrix if it is installed and pytmatrix otherwise. This will enable support for Python 3.14, as pytmatrix was the package blocking such support.

PR assisted by Claude Sonnet 5

Robert Jackson and others added 4 commits July 8, 2026 10:22
Route all T-matrix scattering imports through a new pydsd/scattering.py
shim that selects rustmatrix when available and falls back to pytmatrix
otherwise. Handles two API layout differences: Scatterer is top-level in
rustmatrix, and ldr is sourced from the scatter module (rustmatrix does
not re-export it through radar).

Make rustmatrix a hard requirement and set python_requires>=3.9, which
rustmatrix mandates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SafeConfigParser and readfp were removed in Python 3.12. Use
ConfigParser and read_file instead so editable installs succeed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant