Skip to content
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

fixed displaying bit columns would throw a TypeError on python 3. #14

Merged
merged 2 commits into from
Jun 2, 2016

Conversation

kristianperkins
Copy link
Collaborator

For this fix string_types is basestring in python 2 and str in python 3. Bit fields are represented as bytes which are strings in python 2 but not in python 3.

This is how they are displayed atm in different python versions:

+---------+---------+
| value   | python2 |
+---------+---------+
| true    | ^A       |
| false   | ^@       |
+---------+---------+
| value   | python3 |
+---------+---------+
| true    | b'\x01' |
| false   | b'\x00' |

So also need to think about how they should be displayed. Unfortunately bit data types are inconsistent between different DBs: Oracle doesn't have a bit data type, SQL Server does and MySQL has a bit data type that can be up to 64 bits long.

@kristianperkins
Copy link
Collaborator Author

Looks like the tests are failing. I haven't looked at them yet but I'm guessing a (test) dependency has changed and is causing the failures. Running nosetests on the previously passing commits fails now too.

@coveralls
Copy link

coveralls commented Jun 2, 2016

Coverage Status

Coverage remained the same at 84.207% when pulling b1581c9 on kristianperkins:master into 1b6f0b8 on jaysw:master.

@kristianperkins kristianperkins merged commit ecb1014 into jaysw:master Jun 2, 2016
@jaysw
Copy link
Owner

jaysw commented Jun 3, 2016

Thanks KP, much appreciated!

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.

3 participants