Match CPython unsigned socket conversion errors - #8257
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 (4)
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughInteger conversion now rejects negative values for unsigned targets and exposes raw conversion for callers. Array elements, socket arguments, and the Windows wait-status helper use VM-based Python integer conversion. ChangesInteger conversion behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 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] test: cpython/Lib/test/test_resource.py (TODO: 3) dependencies: dependent tests: (4 tests)
[x] lib: cpython/Lib/socket.py dependencies:
dependent tests: (101 tests)
[x] lib: cpython/Lib/io.py dependencies:
dependent tests: (108 tests)
[x] lib: cpython/Lib/lzma.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:)
9176b4a to
c3fa208
Compare
|
you fixed many tests: please remove expected failure marks from those tests |
c3fa208 to
3a7b464
Compare
Assisted-by: Codex:gpt-5.4
4f12c39 to
e65442f
Compare
youknowone
left a comment
There was a problem hiding this comment.
Thank you so much! and welcome to RustPython 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
flowinfovalue.ValueError.waitstatus_to_exitcodeinput handling to accept Python integer-like values consistently.