Skip to content

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

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 1 commit into from
Feb 10, 2017

Conversation

vtermanis
Copy link
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
Copy link
Member

methane commented Feb 10, 2017

thanks

@jkrukoff
Copy link

jkrukoff commented Feb 11, 2017

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
Copy link

pawl commented Feb 13, 2017

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

@methane
Copy link
Member

methane commented Feb 13, 2017

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
Copy link
Member

methane commented Feb 20, 2017

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