Ignore .idea files from PyCharm.
Do not send gzip headers for streaming calls. (ref: RouxRC [73efaca])
Fix the uri extension by attribute name.
Change some default attributes and add TwitterHTTPError (ref: RouxRC [3d29eae] & [642c4a4]
Test for delimiters in the stream and removes them. Add comments.
Update to use OAuth, take in command line arguments and modify the imports to function from within the module.
IRCBot should use default API v1.1
Move the potentially uninitialized values out of the if test.
Increase the size of the read buffer to be larger than the average tweet.
Add support for both user and site streams.
Bring HTTP chunk downloading into its own separate method.
Cosmetic edit
Merge branch 'fix-stream' into pr-fix-stream
Minimize string decoding and move to use a bytearray for the buffer. This reduces memory consumption and is faster than the += operator for buffer concatenation and trimming.
Cosmetic edits.
Merge branch 'fix-stream' into pr-fix-stream
Move recv_chunk() into a stand alone function. Further minimize memory use by using a chunk sized bytearray.
Move variables out of the iterator class and into the generator function. This slightly improves locality of code and data.
As Twitter appears to send complete JSON in the chunks, we can simplify buffer management to only operate on strings and not re-encode the string as bytes. This improves readability at the expense of breakage if Twitter starts spanning JSON across HTTP chunks. This is an unlikely change to their infrastructure. That said, this is a totally optional patch.
Further refine socket management.
All HTTP chunks are read in their entirety.
Cosmetic code improvements. (The socket's blocking state is set in a more compact form after a DeMorgan's boolean transformation.)
Hangups by Twitter, as with timeouts, are signaled via a message to allow gracious recovery.