Update to support python3 - #86
Conversation
|
Nicely done! I'll test your code changes over the course of the next few days.
^ What do you mean by this? I've updated the suite so the test runs should be deterministic. i.e., all HTTP requests are mocked. Like you said, the tests always pass on master so the issue is likely to be in the dependencies. Hmm .. maybe it's because we are using an updated NLTK? I'll try to investigate. Meanwhile, you should submit a pull request with just these commits and i'll merge: |
|
When this will be merged? +1 Python 3 support |
|
This will be merged very very soon. Expect it in ~two weeks. |
|
Thank you. Looking forward to it :) . |
Require BeautifulSoup4 so that pip3 install works.
|
Just wanted to touch in. I haven't refactored this PR with the 3 requested commits as it was a bit of a mess. The 2to3 changes were a bit tough to untangle. |
|
I've been looking over the library today trying to get the test cases to pass. Few things .. Will continue to work on it and update as time passes. |
|
BOOYAH. I'm currently writing a detailed explanation of how the port went (a few small but nuanced changes were made due to the differences between python 2 and 3) |
|
Awesome! I just came to know of newspaper, and was looking for Python3 compatibility! Perfect timing. Thanks! |
|
I'm trying to figure out how to deploy this on pip3 right now (as well as tagging the latest trunk for the last python 2 version). For now @punchagan git clone this repo and set up your environment from there instead of a package manager |
|
Sure @codelucas. Will use |
|
Nice job, thanks! |
|
Awesome - thank you very much. Just great. |
This updates the code to work with python 3, issue #36. Similar to PR #38, but for the latest code.
The handling of utf-8 strings and bytes (decoding/encoding) is definitely not ideal. This could be cleaned up, but I'd need to study the library a bit more. Help here would be nice.
Three assertions in the tests don't pass (summary, keywords, authors), but the functionality is correct. These are because the results are random and so assertions will sometimes pass or fail. I don't know why they aren't deterministic, they always pass on master. Maybe due to an update on the dependencies. Not sure how you'd like to test or handle these.
Have a review, and let me know if there's anything else to update.