Fixup _mysql.c custom converters binary switch statement to not guess… #351
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… about encoding of unknown fields for python3
Before Most string fields were passed to custom converter functions as "bytes",
everything else was assumed to be valid encoded utf-8 and passed as str.
This could cause issues where some unknown field was not valid utf-8 and
a decode error is triggered where it can't be fixed or avoided by the
end user.
Instead we should short list those fields that we know for sure have to
be str type because the existing converters expect it to be that way.
So all the date conversions, and (NEW)DECIMAL since the python decimal
type will not accept bytes object.
Everything else stays bytes, which is the least suprising and safest
thing to do.