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

Use buffer except for 2.6 #201

Closed

Conversation

adonoho
Copy link
Contributor

@adonoho adonoho commented Feb 13, 2014

Simplify the patch. Move the version test into the chunk processing. As it is probably i/o dominated, this should not be a performance issue. Experienced Pythonistas, please review this supposition.

…s not noticeable to test it each time. (Please review this logic.) Hence, I've shortened the code to just the lines necessary to maintain Python v2.6 compatibility.
@adonoho
Copy link
Contributor Author

adonoho commented Feb 14, 2014

As the system version does not change during execution, I've moved those tests out of the chunk processing in favor of a boolean, modern_python. As it is a runtime global variable, I've left it as lower case. Would you more experienced Pythonistas agree with that case choice?

RouxRC added a commit to RouxRC/twitter that referenced this pull request Feb 16, 2014
sixohsix added a commit that referenced this pull request Feb 17, 2014
Fix streams timeout & hangup behavior + ensure python2.6 compat
Here are the changes to fix the misbehavior of the timeout in case of low tweets by catching Twitter's keep-alive heartbeat signals thanks to the select.select originally added in #178 and still problematic as pointed out by @ksecrist in #202

I also generalized the hangup to all cases since there is no reason to stay in infinite loop after a hangup in non-blocking mode. 

And to make things easier and avoid merging issues, I adapted the refacto and fixed python2.6 compatibility from @adonoho's #201
@sixohsix sixohsix closed this Feb 24, 2014
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

2 participants