Skip to content

host_env: export remaining WinSock rffi constants - #8745

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowone:host-env-winsock-rffi-consts
Sep 19, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowone:host-env-winsock-rffi-consts

Conversation

@youknowone

@youknowone youknowone commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

_socket's rffi layer still reads FIONBIO, POLLIN, WSAEINTR, INVALID_SOCKET, and SOCKET_ERROR from windows_sys. Those names belong on host_env::socket with the rest of the WinSock constants, so a consumer does not have to keep a second windows_sys constant table.

SOCKET_ERROR stays available as SOCKET_ERROR_CODE as well.

Summary by CodeRabbit

  • New Features
    • Windows builds now expose additional socket constants for platform-specific integrations.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: RustPython/RustPython/.coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: 092ff3eb-60ef-446f-b9c2-d6d9da9a7bcd

📥 Commits

Reviewing files that changed from the base of the PR and between 7f610e5 and 252a993.

📒 Files selected for processing (1)
  • crates/host_env/src/socket.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Windows socket module now publicly re-exports FIONBIO, INVALID_SOCKET, POLLIN, and SOCKET_ERROR. The existing SOCKET_ERROR_CODE alias remains available.

Changes

Windows socket exports

Layer / File(s) Summary
Public WinSock constants
crates/host_env/src/socket.rs
The private imports of INVALID_SOCKET and SOCKET_ERROR are removed. The module publicly re-exports FIONBIO, INVALID_SOCKET, POLLIN, and unaliased SOCKET_ERROR. The SOCKET_ERROR_CODE alias remains.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: exporting the remaining WinSock constants from host_env for the rffi layer.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@youknowone
youknowone merged commit 7d6612a into RustPython:main Sep 19, 2026
30 checks passed
@youknowone
youknowone deleted the host-env-winsock-rffi-consts branch September 19, 2026 23:27
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.

1 participant