Skip to content

Prerelease 26.10.1 - #59

Open
johmedr wants to merge 22 commits into
mainfrom
prerelease-26.10.1
Open

johmedr wants to merge 22 commits into
mainfrom
prerelease-26.10.1

Conversation

@johmedr

@johmedr johmedr commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

I have generated the new wrapper from SPM26.10.1, bumped the version in _version.py to 26.10.1, and updated the dependencies in pyproject.toml so that it's ready to merge.
New docstrings are also raw (r"") to properly escape some characters from equations (e.g. \grad).

@balbasty, does that seem good to you and does it track recent changes to spm-runtime?

@johmedr
johmedr requested a review from balbasty November 4, 2026 15:14
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread spm/__init__.py Resolved
@balbasty

balbasty commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Tests are failing because on R2026b, the matlab python sdk returns an empty list ([]) for empty arrays instead of an empty matlab.double. In mpython, we always interpret lists as (1d) cells.

The only solution I see is catch all cells (even 1D) in mpython_endpoint and convert them to dicts (i.e., change the test here: https://github.com/MPython-Package-Factory/mpython/blob/e70a4dae410766e7bd7df469b4adef2fb3ce942f/mpython_endpoint.m#L157).

It means recompiling the CTFs though.

@johmedr

@balbasty

balbasty commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

So this is specifically a 2026b bug (might also be there in 2026a but I haven't checked. It wasn't there in 2025b) where empty numeric arrays in a cell are returned as empty lists on the python side.

And I didn't think through: we cannot convert 1d cells to dict (the data field will still be a 1d cell with the same problem) so we need to catch empty arrays. Empty arrays are kept as matlab array when they are in a dict, they only get converted to lists when they are in a cell. In mpython#9, I encoded them in a dict with type__ = 'emptynum'. And I have added the corresponding parser in mpython-core (already merged and released as 26.11.1 because that part was non-breaking).

It does mean that CTFs built with the proposed changes will not be runnable on old versions of mpython-core. But I don't think we'll recompile SPM25 anyway.

@johmedr Could you check that mpython#9 makes sense? Once merged, I'll trigger a new batch of compilation on spm-runtime and update ther version pins here.

@johmedr

johmedr commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Good catch ! I have merged your fix in mpython#9.

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.

2 participants