Skip to content

Use _binary prefix for bytes/bytearray parameters (now optional)#140

Merged
methane merged 1 commit into
PyMySQL:masterfrom
vtermanis:bytes_binary_prefix_optional
Feb 10, 2017
Merged

Use _binary prefix for bytes/bytearray parameters (now optional)#140
methane merged 1 commit into
PyMySQL:masterfrom
vtermanis:bytes_binary_prefix_optional

Conversation

@vtermanis

Copy link
Copy Markdown
Contributor

This should hopefully address the problems of the previous attempt (#106, #123). An optional connection parameter is used to enable the behaviour. I've also added a unit test to check expected query parameter handling.

- Based on PyMySQL#106 but now disabled by default
- Can be enabled via 'binary_prefix' connection parameter
- Added unit tests to verify behaviour
@vtermanis vtermanis changed the title Use _binary prefix for bytes/bytearray parameters (take #2, optional) Use _binary prefix for bytes/bytearray parameters (now optional) Jan 7, 2017
@methane methane merged commit cba486e into PyMySQL:master Feb 10, 2017
@methane

methane commented Feb 10, 2017

Copy link
Copy Markdown
Member

thanks

@jkrukoff

jkrukoff commented Feb 11, 2017

Copy link
Copy Markdown

Excited to see this merged, my logs have been full of the spurious "invalid utf8" mysql warning since I switched to storing binary UUIDs due to this.

Had to do some digging to find that this was underlying cause of sqlalchemy issue: https://bitbucket.org/zzzeek/sqlalchemy/issues/3804/invalid-utf8-character-string-warning-on

Doesn't look like will get any attention from that end, since maintainer isn't running mysql, so isn't seeing issue.

@pawl

pawl commented Feb 13, 2017

Copy link
Copy Markdown

@methane do you plan to cut a release for this change soon?

@methane

methane commented Feb 13, 2017

Copy link
Copy Markdown
Member

It seems Oracle start releasing MySQL Connector/C 6.1.9 with vs14 support.
https://dev.mysql.com/downloads/connector/c/

Currently, only win32 zip is upload.
Since I don't want to use MSI installer, I hope winx64 zip will be released soon.
This week is good timing to cut new release.

@vtermanis vtermanis deleted the bytes_binary_prefix_optional branch February 13, 2017 08:28
@methane

methane commented Feb 20, 2017

Copy link
Copy Markdown
Member

I released mysqlclient 1.4.10 with Python 3.5 & 3.6 * 32bit & 64bit on Windows.
OTOH, Python 2.7 wheel is not built anymore. Oracle stopped shipping vc9 and vc10 libs.
It's time to drop Python 2.7 support on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants