Match CPython unsigned socket conversion errors#8257
Conversation
Assisted-by: Codex:gpt-5.4
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe socket byte-order helpers now accept Python objects and perform VM-based integer conversion. Unsigned conversions explicitly reject negative integers with a ChangesSocket conversion behavior
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] lib: cpython/Lib/socket.py dependencies:
dependent tests: (101 tests)
Legend:
|
ShaharNaveh
left a comment
There was a problem hiding this comment.
lgtm:)
tysm, and welcome to the project:)
Assisted-by: Codex:gpt-5.4
Summary
test_socket.GeneralModuleTests.testNtoHErrorsby aligning RustPython’ssocket.htons(),socket.htonl(),socket.ntohs(), andsocket.ntohl()error handling with CPython.ValueErrorfor negative inputs instead of incorrectly surfacingOverflowError. It also updates the shared integer conversion helper so unsigned primitive conversions report the CPython-style negative-number error, which lets the expected-failure marker be removed fromLib/test/test_socket.py.Summary by CodeRabbit
ValueErrorinstead.