Open benman1 opened 8 years ago
Hey!
Thanks for checking out the project. Unfortunately, we are actually not currently using this project as we switched over to pyramid, but I left it up because it may be a starting point for others. It may get more usage as we continue to work on projects here.
However, your problem did intrigue me. I did some digging and it actually looks like there is an error in the avro-python3-1.8.1 package or rather there is a different API than the python 2 version. I've only tested this package with python2.7 and haven't tried using python 3 yet (I know should support both).
Anyways, the error is because the base class of FlaskAvroEndpoint
is the avro.ipc.Responder
class. The method in that Responder
class has a @abstract
method for the Invoke
notice the capitalized I
. In the python2 .7 version it is invoke
(lowercase i).
That is causing the TypeError
that you are getting. My suggestion is to either drop down to python2.7 or fork this repo and fix up the implementation so that it works with python3. I'm not sure what other changes or differences between the two versions are.
Let me know if this makes sense or if you have any more questions!
Cheers!
Lastly, it seems like even Avro may not be taking python 3 support seriously. You may also wanna talk to them about their API bindings as it seems to be lacking.
Hi Jeff, thanks for that. It was helpful. It seems to be really hard to find anything useful for avro parsing in python 3. I was thinking, given all the ideas in avro, you should be able to find tools for connecting (ideally the protocol description) with rest api frameworks, but the (de-)serialisation frameworks and web frameworks are largely disjoint as far as I can see. Even parsing python objects using avro schema descriptions is more painful than it should be - a bit disappointing.
On 28 May 2016 at 02:47, Jeffrey Starker notifications@github.com wrote:
Lastly, it seems like even Avro may not be taking python 3 support seriously. You may also wanna talk to them about their API bindings as it seems to be lacking.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/packagelib/flask-avro/issues/2#issuecomment-222283812, or mute the thread https://github.com/notifications/unsubscribe/AKSXfMfM13PpA92Q8f5m1nOt88jdHuKhks5qF56ogaJpZM4IolJb .
I think this is a really useful project, however I get errors even with a vanilla installation and using the example server code...
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /Users/benjamin/Downloads/avro-python3-1.8.1/example/restful.py Traceback (most recent call last): File "/Users/benjamin/Downloads/avro-python3-1.8.1/example/restful.py", line 4, in
test_avro_endpoint = FlaskAvroEndpoint.from_filename("test", "test.avpr")
File "/usr/local/lib/python3.5/site-packages/flask_avro/endpoint.py", line 38, in from_filename
endpoint = FlaskAvroEndpoint(endpoint_name, protocol)
TypeError: Can't instantiate abstract class FlaskAvroEndpoint with abstract methods Invoke
Process finished with exit code 1