scrapy-jsonrpc
scrapy-jsonrpc copied to clipboard
Refactored for Python3 compatibility
Refactored the code so that is Python3 compatible. It mostly had trouble when dealing with bytes and returning keys from dictionaries.
I also added object
in the inheritance for JsonResource
and Webservice
because their base classes did not do, which required the call to the unbound __init__
method of the parent.
This should solve, at least partially, issue #12 .
I've also overridden the log
method in WebService
because it encoded the log line even if it was on Python3, which turned it into bytes.
@kmike Any other observations on this PR?
This works well for me with python3, no issues encountered
Can we merge it?
Hi @ChiraMircea can you guys write a test for this? It's extremely hard to reason on your code without tests.
Hey @sibiryakov I added a few basic tests and py37 to tox, hope it's enough, please let me know if you think more tests are required.