Skip to content

Conversation

@minrk
Copy link

@minrk minrk commented Jan 21, 2016

rather than hardcoding json.loads, which fails on Python 3.5

Messages should never be deserialized by any means other than the Session API.

rather than hardcoding json.loads

Messages should **never** be deserialized by any means other than the Session API.
@jdfreder
Copy link
Owner

Ah interesting, I was doing this earlier but kept running into an error because I tried to deserialize the same message twice (duplicate signatures). I didn't think to change the base method like you do here.

jdfreder added a commit that referenced this pull request Jan 21, 2016
use session.deserialize to unpack message for rate limiting
@jdfreder jdfreder merged commit cc6aaf8 into jdfreder:ratelimit Jan 21, 2016
@minrk
Copy link
Author

minrk commented Jan 21, 2016

If need be, you could use session.unpack to unpack a single frame (I vacillated on whether I should do that here). But that's still putting an assumption about the wire format in code that shouldn't have it.

@minrk minrk deleted the limiter branch January 21, 2016 16:28
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.

2 participants