Skip to content

Tidy CABI Python code#539

Merged
lukewagner merged 2 commits into
mainfrom
writable-stream
Jun 26, 2025
Merged

Tidy CABI Python code#539
lukewagner merged 2 commits into
mainfrom
writable-stream

Conversation

@lukewagner
Copy link
Copy Markdown
Member

@lukewagner lukewagner commented Jun 26, 2025

This PR hopefully addresses the confusion surfaced in #537. (No behavior change)

Copy link
Copy Markdown
Collaborator

@vados-cosmonic vados-cosmonic left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Comment thread design/mvp/CanonicalABI.md Outdated
cancel: Callable[[], None]
drop: Callable[[], None]

class WritableStream:
Copy link
Copy Markdown
Collaborator

@vados-cosmonic vados-cosmonic Jun 26, 2025

Choose a reason for hiding this comment

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

How strict do we want to be about this class being abstract? Not sure if we want to pull in the usual Python ABC machinery here or just add a note.

Also fine leaving this as is since this is just python flavored pseudo code :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Heh, yeah, I looked into ABC a bit, and maybe I didn't find the Zen of that feature, but I thought it was less clear -- mostly I just want a thing that lets me write names and types without function bodies. Since this is just Python-flavored pseudo-code, I stopped there, but if you have any good ideas that are clear and succinct, feel free to suggest (in a separate PR).

Co-authored-by: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com>
@lukewagner lukewagner merged commit 3aef4b6 into main Jun 26, 2025
2 checks passed
@lukewagner lukewagner deleted the writable-stream branch June 26, 2025 18:48
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