Title: Fix csv.writer QUOTE_NONE with quotechar=None by doma17 · Pull Request #8201 · RustPython/RustPython · GitHub
Open Graph Title: Fix csv.writer QUOTE_NONE with quotechar=None by doma17 · Pull Request #8201 · RustPython/RustPython
X Title: Fix csv.writer QUOTE_NONE with quotechar=None by doma17 · Pull Request #8201 · RustPython/RustPython
Description: Closes #8200 This PR follows our AI policy Summary Fixes csv.writer with quoting=csv.QUOTE_NONE and quotechar=None. Problem This case should match CPython: 'a\\,b,x"y\r\n' RustPython accepted the dialect, but reached an internal todo!() path and panicked while writing the row. Fixes Skip csv-core quote character configuration when quotechar=None. Add a QUOTE_NONE writer path that escapes fields without quoting them. Match CPython behavior for missing escapechar and single empty fields. Add regression coverage in extra_tests/snippets/stdlib_csv.py. Testing Verified the reproducer no longer panics. Verified test_csv behavior locally. Verified the new stdlib_csv regression. Verified formatting, lint, pre-commit hooks, and workspace tests before opening the PR. AI use Assisted by Codex:gpt-5.5 for implementation, test drafting, verification. I reviewed and verified the changes locally. Summary by CodeRabbit Bug Fixes Improved CSV writing when using QUOTE_NONE with no quote character, including correct escaping of commas, quotes, backslashes, and line breaks. CSV output now handles empty fields more consistently and preserves expected validation errors for invalid writer settings.
Open Graph Description: Closes #8200 This PR follows our AI policy Summary Fixes csv.writer with quoting=csv.QUOTE_NONE and quotechar=None. Problem This case should match CPython: 'a\\,b,x"y\r\n' RustPython...
X Description: Closes #8200 This PR follows our AI policy Summary Fixes csv.writer with quoting=csv.QUOTE_NONE and quotechar=None. Problem This case should match CPython: 'a\\,b,x"y\r\n'...
Opengraph URL: https://github.com/RustPython/RustPython/pull/8201
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:273ff979-ed14-b14d-33da-1662468524cc |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A772:B1E72:83438C:B085F7:6A6186F3 |
| html-safe-nonce | 8be939841664d8a089fec816bf13a95a03e233979c794bb145b000206555ad79 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzcyOkIxRTcyOjgzNDM4QzpCMDg1Rjc6NkE2MTg2RjMiLCJ2aXNpdG9yX2lkIjoiNzkxMjAwNzk5NjQ4MjM1Njk3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4cf6dee7af40860c1d317885a9bde9304983b3752eb35e4bf31b58eecde991ec |
| hovercard-subject-tag | pull_request:3962894799 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/8201/files |
| twitter:image | https://avatars.githubusercontent.com/u/67214970?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/67214970?s=400&v=4 |
| og:image:alt | Closes #8200 This PR follows our AI policy Summary Fixes csv.writer with quoting=csv.QUOTE_NONE and quotechar=None. Problem This case should match CPython: 'a\\,b,x"y\r\n' RustPython... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c28c2f6607f2aacbd934868d997038895c9780d08babfe918550d73773326f4c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cd05235d52ffb3318513d883a56c87a121015c8b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width