Skip to content

[3.12] gh-113785: csv: fields starting with escapechar are not quoted (GH-122110) #122259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jul 25, 2024

(cherry picked from commit a3327db)

Co-authored-by: Mikołaj Kuranowski mkuranowski@gmail.com

…ythonGH-122110)

(cherry picked from commit a3327db)

Co-authored-by: Mikołaj Kuranowski <mkuranowski@gmail.com>
@hugovk
Copy link
Member

hugovk commented Aug 9, 2024

@serhiy-storchaka This didn't automerge because test_csv is failing on the CI:

======================================================================
FAIL: test_read_quoting (test.test_csv.Test_Csv.test_read_quoting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/admin/actions-runner/_work/cpython/cpython/Lib/test/test_csv.py", line 428, in test_read_quoting
    self._read_test(['1\\.5,\\.5,.5'], [[1.5, 0.5, 0.5]],
  File "/Users/admin/actions-runner/_work/cpython/cpython/Lib/test/test_csv.py", line 354, in _read_test
    self.assertEqual(result, expect)
AssertionError: Lists differ: [[1.5, '.5', 0.5]] != [[1.5, 0.5, 0.5]]

First differing element 0:
[1.5, '.5', 0.5]
[1.5, 0.5, 0.5]

- [[1.5, '.5', 0.5]]
?        ^  -

+ [[1.5, 0.5, 0.5]]
?        ^

@serhiy-storchaka
Copy link
Member

Oh yes. It depended on #113732. It is possible to resolve this issue without touching that change. But It may be safer to not backport this change to 3.12.

@serhiy-storchaka serhiy-storchaka merged commit 9d7209f into python:3.12 Aug 9, 2024
28 checks passed
@serhiy-storchaka
Copy link
Member

Oh, I did not mean to merge it now. Well, it doesn't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants