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

Python 3 compatibility #116

Merged
merged 19 commits into from Aug 1, 2016
Merged

Python 3 compatibility #116

merged 19 commits into from Aug 1, 2016

Conversation

wbolster
Copy link
Member

No description provided.

@wbolster
Copy link
Member Author

wbolster commented Apr 2, 2016

all tests pass on python3.5 now

@scttcper
Copy link

We've been using this branch at our office for a while and it seems stable enough. Would love it if it went up on pypi.

@wbolster
Copy link
Member Author

good to hear this code works well for others.

a new upstream thriftpy release was a blocker for us, but that has been resolved in the mean time. only need to bump the minimum version in the deps.

i also want to update some docs a bit now that the bytes/text distinction is more explicit, since py3 no longer does "helpful" implicit conversions. also, the api docs generation is broken on readthedocs currently, not sure how to fix that yet.

currently travelling without access to a dev env, but will get back to (finally) resolving this py3 transition soonish.

— wouter

sent from my phone. please forgive my tpyos.

On May 16, 2016 6:21:59 PM GMT+02:00, Scott Cooper notifications@github.com wrote:

We've been using this branch at our office for a while and it seems
stable enough. Would love it if it went up on pypi.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#116 (comment)

@sibiryakov
Copy link

Hey @wbolster , great job! We have a @Preetwinder our beloved Google Summer of Code student working on porting https://github.com/scrapinghub/frontera to support Python 3. In short, Frontera is a framework used to build large scale web crawlers with Python. In Frontera integration with HBase is crucial, and current lack of Python 3 support in happybase is a blocker for us.

If possible, could you please get Py3 happybase port done? This is very important for Preet to accomplish his GSoC goals. Let us know if you need any help: PR, reviews, testing, etc. At Scrapinghub we have lots of experience porting open source projects to Python 3.

Thank you!

cc @redapple.

@wbolster
Copy link
Member Author

the code is looking ok imho, but the docs aren't properly building. also, the docs need a few notes on bytes vs. strings. perhaps these issues should be ignored for now since it's not blocking any functionality.

@sibiryakov
Copy link

@wbolster Nobody except you understand all the details that needs to be reflected in documentation, therefore I'm not sure if we can help there. What if you release a new version explaining that code is Py3 compatible and put a disclaimer in the docs saying that docs are outdated and missing type definitions? I would love to see it available on PyPI.

wbolster and others added 15 commits July 27, 2016 19:08
...which behaves differently on Python 3.
...to coerce unicode text into UTF-8 encoded byte strings.
...hence require splitting using a byte string.
...and make it work on both Python 3 and 2.
In HBase, the name is a byte string, but transparently encoding text
using UTF-8 allows for cleaner code on the Python side. This makes code
like

  connection.table("sometable")

work on both Python 3 and 2.
...since Python 3 does not have that function anymore.
@wbolster wbolster changed the title [wip] Python 3 compatibility Python 3 compatibility Aug 1, 2016
@wbolster wbolster merged commit 04eae0b into master Aug 1, 2016
@wbolster wbolster deleted the python3 branch August 1, 2016 18:17
@wbolster wbolster mentioned this pull request Aug 1, 2016
3 tasks
@wbolster
Copy link
Member Author

wbolster commented Aug 1, 2016

merged, fixes #40

@wbolster
Copy link
Member Author

wbolster commented Aug 1, 2016

@scttcper @sibiryakov @Preetwinder @jeroenvlek @surfacepatterns

since you expressed interest in python 3 support for happybase, please test current master and report any issues! i think we're almost there ;)

@Preetwinder
Copy link

@wbolster Thanks for doing this. I and @sibiryakov have been testing happybase on Python3 for the past few days. We have mainly used - connection.create/delete_table, table.batch and table.scan. These components have been working fine for us, and we didn't face any issue up-till now. If we encounter any issue in the future we will let you know. We hope you get to release a Python 3 supporting version soon. Thanks.

@sibiryakov
Copy link

also table.rows()

@wbolster
Copy link
Member Author

ok, cool, thanks for testing this.

the tests also cover quite a large bit of the api, but since i don't use happybase myself anymore i don't have any real world applications to test against.

i'll make a release soon (when i find my pypi credentials 😕) i'll update #131 once i did so.

@wbolster
Copy link
Member Author

happybase 1.0.0 is available from pypi

https://happybase.readthedocs.io/en/latest/news.html

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.

None yet

4 participants