Skip to content

FIX a raising reduce shouldn't make dump fail - #550

Merged
adrinjalali merged 4 commits into
skops-dev:mainfrom
adrinjalali:fix/reduce-guard
Sep 27, 2026
Merged

adrinjalali merged 4 commits into
skops-dev:mainfrom
adrinjalali:fix/reduce-guard

Conversation

@adrinjalali

Copy link
Copy Markdown
Member

Specifically, some cython ctypes might have a raising __reduce__.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The changelog contains an inaccurate universal claim and an unresolved PR placeholder.

Review effort: Balanced
Findings: 2 Low severity

Open (2)
What changed in this PR

Prevents serialization failures when an object’s __reduce__ raises by falling back to state-based persistence.

Changes:

  • Handles exceptions from __reduce__.
  • Adds synthetic and pandas regression tests.
  • Documents the fix for v0.17.
File Description
skops/​io/​_general.py Adds fallback behavior for raising __reduce__.
skops/​io/​tests/​test_persist.py Adds regression coverage.
docs/​changes.rst Adds the v0.17 changelog entry.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/changes.rst Outdated
Comment thread docs/changes.rst Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The fallback is narrowly scoped, preserves existing serialization behavior, and has appropriate regression coverage.

Review effort: Balanced
Findings: None

Resolved since last review (2)

@adrinjalali
adrinjalali merged commit 60cc1ff into skops-dev:main Sep 27, 2026
30 checks passed
@adrinjalali
adrinjalali deleted the fix/reduce-guard branch September 27, 2026 07:30
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