Miserlou / NoDB

NoDB isn't a database.. but it sort of looks like one.
https://blog.zappa.io/posts/introducing-nodb-pythonic-data-store-s3
380 stars 45 forks source link

Light touch python 3 compatibility #14

Closed nephlm closed 6 years ago

nephlm commented 6 years ago

It looks like mcrowson's pull request for python compatibility has stalled. If not, feel free to reject this.

This is a super simple compatibility patch that does little more than use encode/decode and a configurable encoding to ensure data is either in byte or unicode representation when it needs to be.

Since it uses encode/decode methods of string I believe it will require something newer than python 2.2, which seems reasonable at this point.

There are no new dependencies and all the unit tests passed for me. I ran some live tests and got up to 83% coverage. I created a record with the master branch and was able to read it properly using this branch running under python 2 and python 3.

Anyway this is my attempt to jump start getting the project up to python 3, which I need for purely selfish reasons. :)

If there are any anything I missed, let me know and I'll try and get it fixed.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.3%) to 56.391% when pulling a41de16719d83e14f96900828567083584e0100f on nephlm:minimal_py3 into 26124840dfffcf6234b4b067531a8ec40d7362dd on Miserlou:master.

bendog commented 6 years ago

Fixes #1