Update io from v3.14.3 and fix#7089
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds PyByteArray::resize, refactors BytesIO initialization to use BytesIOArgs, tightens BytesIO seek/close/getbuffer semantics (including closed/export checks), sets UnsupportedOperation.module, and records _pyio.py as a hard dependency in update_lib tooling. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Code has been automatically formatted The code in this PR has been formatted using:
git pull origin io |
1924eb7 to
0b79cf4
Compare
34fe444 to
0a3ac12
Compare
- Add bytearray.resize() method - BytesIO: support keyword arg for initial_bytes - BytesIO.seek: clamp negative positions to 0 - BytesIO.close: raise BufferError on active exports - BytesIO.getbuffer: check closed state - Set UnsupportedOperation.__module__ to "io"
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@scripts/update_lib/cmd_quick.py`:
- Around line 409-410: The code sets dep_lib_path =
pathlib.Path("crates/pylib/Lib") / dep_name which stages hard dependencies from
the generated location; change it to use the canonical Lib directory by setting
dep_lib_path = pathlib.Path("Lib") / dep_name (matching how lib_file_path is
derived) so hard deps are sourced from Lib/ rather than crates/pylib/Lib; update
any related references in the same block that rely on dep_lib_path to use the
new path variable.
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] lib: cpython/Lib/io.py dependencies:
dependent tests: (87 tests)
[x] lib: cpython/Lib/typing.py dependencies:
dependent tests: (13 tests)
Legend:
|
Summary by CodeRabbit
New Features
resize()to PyByteArray.getbuffer()to BytesIO.Bug Fixes
Chores