[issue12178] csv writer doesn't escape escapechar

2021-07-13 Thread Sebastian Bank
Sebastian Bank added the comment: Thanks Tal. AFAICT there was an undocumented change in behaviour related to this fix. Python 3.9 quotes values with escapechar: ``` import csv import io kwargs = {'escapechar': '\\'} value = 'spam\\eggs' print(value) with io.StringIO() as buf: writer

[issue12178] csv writer doesn't escape escapechar

2020-09-19 Thread Tal Einat
Tal Einat added the comment: After a great deal of delay, a fix for this has finally been merged, and will be available in Python 3.10. Thanks to everyone involved! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 2.7, Pyt

[issue12178] csv writer doesn't escape escapechar

2020-09-19 Thread Tal Einat
Tal Einat added the comment: New changeset 5c0eed7375fdd791cc5e19ceabfab4170ad44062 by Berker Peksag in branch 'master': bpo-12178: Fix escaping of escapechar in csv.writer() (GH-13710) https://github.com/python/cpython/commit/5c0eed7375fdd791cc5e19ceabfab4170ad44062 -- ___

[issue12178] csv writer doesn't escape escapechar

2019-10-21 Thread Larry Hastings
Change by Larry Hastings : -- nosy: -larry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue12178] csv writer doesn't escape escapechar

2019-10-21 Thread Larry Hastings
Change by Larry Hastings : -- versions: +Python 3.8, Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue12178] csv writer doesn't escape escapechar

2019-10-21 Thread Aldrian Obaja
Aldrian Obaja added the comment: I think this issue needs to be escalated, as this is clearly a bug that makes it troublesome to use csv.reader and csv.writer with escapechar. -- nosy: +Aldrian Obaja ___ Python tracker

[issue12178] csv writer doesn't escape escapechar

2019-09-14 Thread Tal Einat
Tal Einat added the comment: FWIW, though this is arguably fixing a bug, IMO this shouldn't be back-ported to 2.7 or 3.7, but only be in 3.8+, to avoid breaking backwards-compatibility. That being said, it would be great to get this into 3.8.0! -- nosy: +taleinat ___

[issue12178] csv writer doesn't escape escapechar

2019-08-14 Thread Brad MacGregor
Brad MacGregor added the comment: I needed this patch for a project, so I compiled python with the patch applied, and tested my specific use case, and it worked. Thanks for the patch! -- nosy: +avatarofhope ___ Python tracker

[issue12178] csv writer doesn't escape escapechar

2019-06-02 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: -Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue12178] csv writer doesn't escape escapechar

2019-05-31 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +13597 pull_request: https://github.com/python/cpython/pull/13710 ___ Python tracker ___ ___

[issue12178] csv writer doesn't escape escapechar

2019-05-31 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue12178] csv writer doesn't escape escapechar

2019-05-09 Thread Alex Shpilkin
Change by Alex Shpilkin : -- nosy: +Alex Shpilkin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue12178] csv writer doesn't escape escapechar

2018-01-11 Thread Sebastian Bank
Sebastian Bank added the comment: Hi, is there something we can do to get this going? As the issue breaks round-trip, it currently requires work-arounds like this: https://github.com/cldf/csvw/blob/1324550266c821ef32d1e79c124191e93aefbfa8/csvw/dsv.py#L67-L71 -- nosy: +xflr6 _

[issue12178] csv writer doesn't escape escapechar

2017-12-27 Thread Dmitriy Shashkin
Change by Dmitriy Shashkin : -- nosy: +Dmitriy Shashkin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue12178] csv writer doesn't escape escapechar

2016-08-27 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker ___ _

[issue12178] csv writer doesn't escape escapechar

2016-08-27 Thread Skip Montanaro
Skip Montanaro added the comment: The patch looked okay to me, and when applied to the 2.7 source, the new tests pass muster. I'm not going to pretend I know where this patch should be applied. That's for someone else to pronounce. -- ___ Python tr

[issue12178] csv writer doesn't escape escapechar

2016-08-27 Thread Skip Montanaro
Changes by Skip Montanaro : -- nosy: -skip.montanaro ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue12178] csv writer doesn't escape escapechar

2016-08-26 Thread Wayne Harris
Wayne Harris added the comment: Hi, I can confirm that this behavior still exists in my current python versions (3.5.2 & 2.7.11). I'm happy to take a look at the code, but considering I made this account specifically to comment on this issue I assume someone else will want to, as well. If y

[issue12178] csv writer doesn't escape escapechar

2012-07-07 Thread Catalin Iacob
Changes by Catalin Iacob : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12178] csv writer doesn't escape escapechar

2011-07-07 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the patch. The tests look good at first glance. I can’t comment on the C code, I don’t know C. Hopefully someone will do it, otherwise if you don’t get feedback in say four weeks you can ask for a review on python-dev. -- keywords: +needs r

[issue12178] csv writer doesn't escape escapechar

2011-07-06 Thread Catalin Iacob
Changes by Catalin Iacob : -- keywords: +patch Added file: http://bugs.python.org/file22596/0eb420ce6567.diff ___ Python tracker ___ _

[issue12178] csv writer doesn't escape escapechar

2011-07-06 Thread Catalin Iacob
Catalin Iacob added the comment: I looked at this and tried to provide a patch + tests. Please review. The bug is that a writer can use writerow on some input data but if a reader with the same dialect reads them back they are different from the input ones. This happens when the input data co

[issue12178] csv writer doesn't escape escapechar

2011-05-26 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report. It would be best if you could attach files as plain text instead of archives. -- components: +Extension Modules -None nosy: +eric.araujo, skip.montanaro versions: +Python 3.1, Python 3.2, Python 3.3 -Python 2.6 ___

[issue12178] csv writer doesn't escape escapechar

2011-05-25 Thread Eric Breck
New submission from Eric Breck : Consider the attached two files. A reader and writer with the same dialect parameters (escapechar \ quotechar " doublequote False) read, then write a CSV cell that looks like "C\\". It's written "C\". The problem is, when doublequote=False, the escapechar is