Skip to content

Conversation

@servoz
Copy link
Contributor

@servoz servoz commented Oct 27, 2025

Following a recent commit in capsul (cb21ec4), the Mia tests are failing.

In Mia, we do not use the completion engine (and I do not know how it works!), and process.completion_engine is None.

I therefore propose a small fix in capsul to handle cases where process.completion_engine exists but the value is None.

I did not commit it directly because I do not know if this change could introduce a regression as a side effect... so I opened this PR instead.

process.completion_engine.process = weak_proxy(
process, process.completion_engine._clear_node)
return process.completion_engine
if ce and ce.process is not process:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think != was here intentionally instead of is not, because the process may be a Process instance or a weakref or a weak proxy, and is not would be True if the same process is compared across a proxy. I'm not sure of that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes, I hadn't thought about the weak proxy case! I think you're absolutely right. I'll change ‘is not’ to ‘!=’

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@denisri denisri merged commit f168f24 into master Oct 29, 2025
9 checks passed
@denisri denisri deleted the completion_engine branch October 29, 2025 15:01
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.

3 participants