Repository navigation
Remove unused PyLease; skip flaky httpservers test on macOS - #8821
Conversation
PyLease wrapped a read guard over the object's type when `typ` was a `PyRwLock<PyTypeRef>`. Its last users, `class()` and `lease_class()`, went away when `typ` became a `PyAtomicRef<PyType>` (RustPython#3828). Its field is private and it has no constructor, so it cannot be built anywhere. Assisted-by: Claude Code:claude-opus-5-5
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: RustPython/RustPython/.coderabbit.yml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change updates the atomic import in ChangesPyLease removal
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to No repository evidence establishes a compatibility requirement or current consumer for the removed, unconstructible type. No demonstrated issue blocks merging. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Title checkExplanation The title correctly identifies removal of the unused PyLease type, which is the main change. However, it also claims that the pull request skips a flaky httpservers test on macOS, and the provided changes do not include that update.
✨ 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 |
Merging this PR will not alter performance
Comparing Footnotes
|
The test sets the CGI handler timeout to 1ms. That timeout also bounds reading the request line, so when the client has not sent the request within 1ms the server logs "Request timed out" and closes the connection. The client then gets ConnectionResetError or BrokenPipeError. This reproduces on macOS with both RustPython and CPython 3.14.6. The skip was removed in RustPython#8759 after Linux-only repeats. Assisted-by: Claude Code:claude-opus-5-5
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [ ] lib: cpython/Lib/http dependencies:
dependent tests: (51 tests)
Legend:
|
PyLeasewas introduced in f075cac to wrap a read guard over the object's type whiletypwas aPyRwLock<PyTypeRef>, soclass()could hand out the type without cloning theArc. Its last users,class()andlease_class(), went away in #3828 whentypbecame aPyAtomicRef<PyType>. It has carried#[allow(dead_code)]and a "check if we still need this" TODO since.Its only field is private and there is no constructor, so it cannot be built inside or outside the crate. This removes it and the now-unused
PyRwLockReadGuardimport.Also skips
test_httpservers.CGIHTTPServerTestCase.test_large_content_length_truncatedon macOS again. It failed macOS CI on this PR. The test sets the handler timeout to 1ms, and that timeout also bounds reading the request line: if the client has not sent the request within 1ms, the server logs "Request timed out" and closes the connection, and the client getsConnectionResetErrororBrokenPipeError. It reproduces locally on macOS about 5 runs in 6 with both RustPython and CPython 3.14.6. The skip was removed in #8759 after Linux-only repeats; Linux and Windows keep running it.🤖 Generated with Claude Code
Summary by CodeRabbit