Fix zero padding for string format specs - #8407
Conversation
Assisted-by: Codex:gpt-5
Assisted-by: Codex:gpt-5
📝 WalkthroughWalkthroughString format specifications now track explicit alignment, reject ChangesString alignment validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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_binascii.py (TODO: 4) dependencies: dependent tests: (95 tests)
[ ] lib: cpython/Lib/unittest dependencies:
dependent tests: (408 tests)
[x] test: cpython/Lib/test/test_str.py (TODO: 6) dependencies: dependent tests: (no tests depend on str) [x] lib: cpython/Lib/pdb.py dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/inspect.py dependencies:
dependent tests: (96 tests)
[x] lib: cpython/Lib/sqlite3 dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/pydoc.py dependencies:
dependent tests: (5 tests)
[x] lib: cpython/Lib/re dependencies:
dependent tests: (81 tests)
Legend:
|
youknowone
left a comment
There was a problem hiding this comment.
looks good, thank you for catching this
Summary
Resolves the
{0:08s}portion of the existingTODO: RUSTPYTHONintest_str.test_format.0flag in string format specs as zero fill with string alignment semantics.=alignment for strings with CPython'sValueErrormessage.{0.}expected-failure reason in place.Tests
prek run --all-filescargo clippycargo test --workspace --exclude rustpython_wasm --exclude rustpython-venvlaunchercargo run --release -- -m test test_strpytest -vinextra_testsusing the RustPython binaryAI assistance
Codex (GPT-5) assisted with the CPython comparison, implementation, and regression-test drafting. I reviewed the final diff and verified the behavior locally. Both commits include
Assisted-by: Codex:gpt-5.