Skip to content

Conversation

@nbaertsch
Copy link
Owner

No description provided.

Noah Baertsch and others added 2 commits December 31, 2025 18:33
Handle error.NotLink in toWasiError() to return EINVAL instead of panicking
when path_readlink is called on a regular file (non-symlink).

This fixes CPython 3.13.1 and other WASI programs that use path_readlink
for symlink detection during import resolution.

Per POSIX/WASI spec, readlink should return EINVAL when the target is not
a symbolic link.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements WASI poll_oneoff syscall to enable:
- Non-blocking socket I/O
- File descriptor polling (similar to select/poll)
- Support for Python's select module and socket timeouts

Implementation supports FD_READ and FD_WRITE events with 100ms timeout.
Uses fixed-size buffer (64 fds) to avoid dynamic allocation complexity.

This enables requests/urllib3 to work with Python's standard socket library.
@nbaertsch nbaertsch merged commit 1fcc368 into master Jan 1, 2026
36 of 86 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