-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Make a note about buggy behavior of csv.QUOTE_NOTNULL
and csv.QUOTE_STRINGS
#116633
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
Comments
Thanks for the report, would you like to open a PR for this? |
Sure, but I have a couple of questions:
|
It is not clear to me how it should be resolved. The documentation clearly specifies how QUOTE_NOTNULL and QUOTE_STRINGS should work in the reader. But the code does not implement it -- the PR was merged prematurely, before implementing this part. There are two ways to resolve the conflict:
Option 1 only affects the users of 3.12.0 and 3.12.1. Option 2 makes this feature not particularly useful for three versions: 3.12, 3.13 and 3.14. |
csv.QUOTE_NOTNULL
and csv.QUOTE_STRINGS
in 3.12csv.QUOTE_NOTNULL
and csv.QUOTE_STRINGS
Original message about versions from T. Wouters:
That reasoning was convincing to me, treating it as a normal fix for the next feature release. |
I made PR #117235 which adds a note about the issue. I took my inspiration from a similar case with |
There is a PR for 3.12. What should happen for 3.13? |
…L and csv.QUOTE_STRINGS (GH-117235) * Add a note about bug * Properly link constants
csv.QUOTE_NOTNULL
and csv.QUOTE_STRINGS
csv.QUOTE_NOTNULL
and csv.QUOTE_STRINGS
The PR for 3.12 says "This bug is fixed in Python 3.13" so I don't think we need to do anything for 3.13. Thanks for the report and fix! |
Ah, you mean the docs already described the desired behaviour, so we only need a note in 3.12 and people reading 3.13 docs are fine? Then great! |
Both options were added in 3.12, but were not completed properly. The intended behavior for |
Uh oh!
There was an error while loading. Please reload this page.
csv.QUOTE_NOTNULL
andcsv.QUOTE_STRINGS
do not affectcsv.reader
in 3.12. This behavior is a bug which is fixed in 3.13 (#113732). But the current documentation of 3.12 still states that these constants affectcsv.reader
. In the discussion of the issue #113732, it was suggested to make a note to inform the users about the problem.Meanwhile, there is a small formatting issue: the 3rd occurrence of

None
in the description of these constants does not use inline code formatting as others. This should be addressed in 3.12 and 3.13 docs as well.Linked PRs
The text was updated successfully, but these errors were encountered: