Title: csv.writer: multi-character lineterminator is truncated to a single byte · Issue #8322 · RustPython/RustPython · GitHub
Open Graph Title: csv.writer: multi-character lineterminator is truncated to a single byte · Issue #8322 · RustPython/RustPython
X Title: csv.writer: multi-character lineterminator is truncated to a single byte · Issue #8322 · RustPython/RustPython
Description: Feature Follow-up from #8302 / #8315. csv.writer should accept an arbitrary string as lineterminator. RustPython stores it as a single byte, so a multi-character terminator is truncated instead of being emitted in full. import csv, io si...
Open Graph Description: Feature Follow-up from #8302 / #8315. csv.writer should accept an arbitrary string as lineterminator. RustPython stores it as a single byte, so a multi-character terminator is truncated instead of ...
X Description: Feature Follow-up from #8302 / #8315. csv.writer should accept an arbitrary string as lineterminator. RustPython stores it as a single byte, so a multi-character terminator is truncated instead of ...
Opengraph URL: https://github.com/RustPython/RustPython/issues/8322
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"csv.writer: multi-character lineterminator is truncated to a single byte","articleBody":"## Feature\n\n\u003c!-- What Python feature is missing from RustPython? Give a short description of the feature and how you ran into its absence. --\u003e\n\nFollow-up from #8302 / #8315.\n\n`csv.writer` should accept an arbitrary string as `lineterminator`. RustPython stores it as a single byte, so a multi-character terminator is truncated instead of being emitted in full.\n\n```python\nimport csv, io\nsio = io.StringIO()\ncsv.writer(sio, lineterminator=\"!@#\").writerow([\"a\", \"b\"])\nprint(repr(sio.getvalue()))\n# CPython: 'a,b!@#'\n# RustPython: 'a,b!'\n```\n\nBecause of this, `test_write_lineterminator` (Lib/test/test_csv.py) is marked `@unittest.expectedFailure` — it fails only on the `'!@#'` subcase.\n\nScope is limited to the multi-character `lineterminator`. Left as separate follow-ups: lineterminator validation parity, non-ASCII `delimiter`/`quotechar`/`escapechar` (see #8310), and reader semantics (CPython's reader ignores `lineterminator` and only recognizes CR/LF).\n\n## Python Documentation or reference to CPython source code\n\n\u003c!-- Give a link to the feature in the CPython documentation (https://docs.python.org/3/) in order to assist in its implementation. --\u003e\n\nhttps://docs.python.org/3/library/csv.html#csv.Dialect.lineterminator\n\n\u003csub\u003eDrafted with AI assistance (Claude Code), reviewed by me.\u003c/sub\u003e","author":{"url":"https://github.com/jinmay","@type":"Person","name":"jinmay"},"datePublished":"2026-07-19T12:10:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/8322/RustPython/issues/8322"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e1ef8b9d-818b-607d-46b9-cc3214066d36 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E13A:3E4484:0910:0B22:6A61F5F5 |
| html-safe-nonce | 01084f360f8a12703deadcad46b3c21045f238c403a931e6c3cd216eae404a1c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTNBOjNFNDQ4NDowOTEwOjBCMjI6NkE2MUY1RjUiLCJ2aXNpdG9yX2lkIjoiODAzMDY0OTk1Njg2Mzk2NDY2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8d49393878cec971e1107e6b11ecc3bf24cda01e5b0c5f23e4db41c26ab420df |
| hovercard-subject-tag | issue:4922602552 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/RustPython/RustPython/8322/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8839dbdf9305ec444c573e3334f1621277b442aeb3d0234df9ffe5624bf9a4d1/RustPython/RustPython/issues/8322 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8839dbdf9305ec444c573e3334f1621277b442aeb3d0234df9ffe5624bf9a4d1/RustPython/RustPython/issues/8322 |
| og:image:alt | Feature Follow-up from #8302 / #8315. csv.writer should accept an arbitrary string as lineterminator. RustPython stores it as a single byte, so a multi-character terminator is truncated instead of ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jinmay |
| hostname | github.com |
| expected-hostname | github.com |
| None | d88d9dd41cd32712dc23ff01ba406271c88c4858198430c255d591be42a1166f |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a7f024eda6b8ce06d29c9276168423bfe05bafae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width