Skip to content

Comments

add tcp-p3 example and test#204

Merged
dicej merged 2 commits intobytecodealliance:mainfrom
rvolosatovs:p3-tcp-example
Feb 23, 2026
Merged

add tcp-p3 example and test#204
dicej merged 2 commits intobytecodealliance:mainfrom
rvolosatovs:p3-tcp-example

Conversation

@rvolosatovs
Copy link
Member

@rvolosatovs rvolosatovs commented Feb 18, 2026

Adapt the tcp example to p3 using wasi-sockets API directly until wasi-libc/wasi-sdk/cpython are further along in p3 support

@rvolosatovs rvolosatovs force-pushed the p3-tcp-example branch 3 times, most recently from 1670783 to c3e69c5 Compare February 18, 2026 14:17
@rvolosatovs
Copy link
Member Author

Interesting, the CI just broke a few minutes ago (https://github.com/bytecodealliance/componentize-py/actions/runs/22143392814/job/64013519262?pr=204)

/usr/bin/git submodule sync --recursive
/usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1 --recursive
Submodule 'cpython' (https://github.com/dicej/cpython) registered for path 'cpython'
Cloning into '/home/runner/work/componentize-py/componentize-py/cpython'...
Error: fatal: could not read Username for 'https://github.com/': terminal prompts disabled
Error: fatal: expected flush after ref listing
Unable to fetch in submodule path 'cpython'; trying to directly fetch 0e13686da8bb881b059d35e23c32bcd2e6440099:
Error: fatal: could not read Username for 'https://github.com/': terminal prompts disabled
Error: fatal: Fetched in submodule path 'cpython', but it did not contain 0e13686da8bb881b059d35e23c32bcd2e6440099. Direct fetching of that commit failed.
Error: The process '/usr/bin/git' failed with exit code 128/usr/bin/git submodule sync --recursive
/usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1 --recursive
Submodule 'cpython' (https://github.com/dicej/cpython) registered for path 'cpython'
Cloning into '/home/runner/work/componentize-py/componentize-py/cpython'...
Error: fatal: could not read Username for 'https://github.com/': terminal prompts disabled
Error: fatal: expected flush after ref listing
Unable to fetch in submodule path 'cpython'; trying to directly fetch 0e13686da8bb881b059d35e23c32bcd2e6440099:
Error: fatal: could not read Username for 'https://github.com/': terminal prompts disabled
Error: fatal: Fetched in submodule path 'cpython', but it did not contain 0e13686da8bb881b059d35e23c32bcd2e6440099. Direct fetching of that commit failed.
Error: The process '/usr/bin/git' failed with exit code 128

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Netcat likes to close the connection if the receive half is closed by the remote
host, regardless of whether stdin has been closed, and there's no obvious way to
change that behavior.  So on the client side we hold both halves open until
we've received something, which matches the p2 example behavior.
Copy link
Collaborator

@dicej dicej left a comment

Choose a reason for hiding this comment

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

Thanks!

@dicej dicej merged commit df7c6cc into bytecodealliance:main Feb 23, 2026
4 checks passed
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