]> jfr.im git - z_archive/twitter.git/log
z_archive/twitter.git
10 years agoVersion 1.11.1. twitter-1.11.1
Mike Verdone [Mon, 3 Feb 2014 22:59:30 +0000 (23:59 +0100)] 
Version 1.11.1.

10 years agoauthorship
RouxRC [Fri, 27 Dec 2013 10:42:09 +0000 (11:42 +0100)] 
authorship

10 years agoActually, the POST 'place' method is deprecated and removed.
Mike Verdone [Mon, 3 Feb 2014 22:53:39 +0000 (23:53 +0100)] 
Actually, the POST 'place' method is deprecated and removed.

10 years agoDon't crash with 'python -OO'.
Mike Verdone [Mon, 3 Feb 2014 22:49:24 +0000 (23:49 +0100)] 
Don't crash with 'python -OO'.

10 years agoIgnore .pyo
Mike Verdone [Mon, 3 Feb 2014 22:45:00 +0000 (23:45 +0100)] 
Ignore .pyo

10 years agoMake the logger work again.
Mike Verdone [Mon, 3 Feb 2014 22:44:42 +0000 (23:44 +0100)] 
Make the logger work again.

10 years agoUse POST for all methods requiring it in specs
RouxRC [Fri, 27 Dec 2013 09:38:15 +0000 (10:38 +0100)] 
Use POST for all methods requiring it in specs

Added all missing methods from https://dev.twitter.com/docs/api/1.1
Also included some of the streaming methods which work with both GET
and POST but accept arguments like "track" which can quickly require
POST.

(Closes #187 #145 #188)

10 years agoUpdate follow/unfollow API calls for 1.1.
Mike Verdone [Mon, 3 Feb 2014 22:24:04 +0000 (23:24 +0100)] 
Update follow/unfollow API calls for 1.1.

10 years agoMake stream example print message if no args are given. twitter-1.11.0
Mike Verdone [Mon, 3 Feb 2014 22:02:34 +0000 (23:02 +0100)] 
Make stream example print message if no args are given.

10 years agoVersion 1.11.0
Mike Verdone [Mon, 3 Feb 2014 21:59:49 +0000 (22:59 +0100)] 
Version 1.11.0

10 years agoInitialize error instance correctly. Based on @kemkin's patch.
Mike Verdone [Mon, 3 Feb 2014 21:56:24 +0000 (22:56 +0100)] 
Initialize error instance correctly. Based on @kemkin's patch.

10 years agoMerge pull request #196 from adonoho/pr-fix-stream
Mike Verdone [Mon, 3 Feb 2014 21:51:53 +0000 (13:51 -0800)] 
Merge pull request #196 from adonoho/pr-fix-stream

A Simpler Fix to the Streaming Code due to Changes from Twitter on Jan. 13, 2014.
Gentlefolk,

This is a candidate release patch. I propose it become the formal branch of this library and have dubbed it version v1.10.3. I once again formally thank RouxRC for his efforts moving this library forward. Any errors in this patch remain mine and do not reflect upon RouxRC or his code.

This library is a high performance streaming library. Compared to other Twitter libraries, it is easily an order of magnitude faster at delivering tweets to your application. Why is that? When streaming, this library pierces Python's urllib abstraction and takes control of the socket. It interprets the HTTP stream directly. That makes it fast. It also makes it vulnerable to changes. It needed to be upgraded when Twitter upgraded the protocol version.

Twitter's switch to HTTP v1.1 was long overdue.

Summary of changes:

- Based upon RouxRC's code, I turned off gzip compression. My version is slightly different than RouxRC's version.
- Instead of incrementally reading arbitrary lengths of bytes from the socket and seeing if they parse in the JSON parser, a good technique, the switch to HTTP chunking forced us to process in chunk sized blocks. Based upon inspection, Twitter never sends partial JSON in a chunk. They also send keep-alive delimiters in single 7 byte long chunks. This code depends upon both of these observations. It does not do general purpose HTTP chunk processing. It is a Twitter specific HTTP chunk parser.
- Chunk oriented processing allowed me to isolate stream interpretation to the chunk code and migrate the wrapper code to operate exclusively using strings. This makes the wrapper code more readable.
- Once I had opened up the wrapper code, I cleaned it up. This involved modest edits in how certain socket parameters were determined and moving data exclusive to the generator into the generator and out of the containing object.
- As this is exclusively socket oriented code, the HTTP exception catching was removed from the method. The exception was moved to wrap the opening of the socket by url lib.
- Due to reading the data in larger chunks and, hence, running it through the JSON parser less often, this code is about 10% faster than the prior generation.
- When Twitter hangs up on us, this code emits a `hangup` message in the stream.
- This code has been tested using Python v2.7.6 and v3.3.3 on OS X 10.8.5 (Mountain Lion). I have tested it on the high volume sample stream and on a user stream under both versions of Python. It is believed, but not tested, that it will function under Python v2.6.x. It uses the bytearray type. I believe that has been back ported all the way to Python v2.6.x. As the code is not particularly tricky, I do not foresee that it has introduced any new issues that were not already apparent in this library.
- I use this patch in production and have captured 50M+ tweets with it. It is solid and reliable. If you find it to not be so, please contact me. I use it in production and have a vested interest in ensuring that it catches all corner cases.

Thank you for your patience while I refine this patch and I ask Mr. Verdone to select this patch as the basis for moving this library forward.

Enjoy and Anon,
Andrew

10 years agoMerge branch 'fix-stream' into pr-fix-stream
Andrew W. Donoho [Thu, 30 Jan 2014 12:52:30 +0000 (06:52 -0600)] 
Merge branch 'fix-stream' into pr-fix-stream

10 years agoClarify the comment about edge cases.
Andrew W. Donoho [Wed, 29 Jan 2014 22:00:56 +0000 (16:00 -0600)] 
Clarify the comment about edge cases.

10 years agoAdd comments detailing why we can avoid handling certain edge cases in the Twitter...
Andrew W. Donoho [Wed, 29 Jan 2014 15:30:41 +0000 (09:30 -0600)] 
Add comments detailing why we can avoid handling certain edge cases in the Twitter stream.

10 years agoHandle HTTP chunks that only contain keep-alive delimiters.
Andrew W. Donoho [Tue, 28 Jan 2014 23:44:26 +0000 (17:44 -0600)] 
Handle HTTP chunks that only contain keep-alive delimiters.
A few cosmetic edits of the iterator function.

10 years agoSet a timeout on the main sample stream to test that code path.
Andrew W. Donoho [Tue, 28 Jan 2014 20:57:26 +0000 (14:57 -0600)] 
Set a timeout on the main sample stream to test that code path.

10 years agoRemove socket timeout mutation code.
Andrew W. Donoho [Tue, 28 Jan 2014 20:56:37 +0000 (14:56 -0600)] 
Remove socket timeout mutation code.
Simplify protocol parsing checks.
Move HTTP exception catching to where it might actually be thrown.

10 years agoRemove all keep-alive delimiters to allow the hangup patch to function.
Andrew W. Donoho [Tue, 28 Jan 2014 16:18:38 +0000 (10:18 -0600)] 
Remove all keep-alive delimiters to allow the hangup patch to function.

10 years agoBump the version number.
Andrew W. Donoho [Tue, 28 Jan 2014 14:13:30 +0000 (08:13 -0600)] 
Bump the version number.

10 years agoFurther refine socket management.
Andrew W. Donoho [Tue, 28 Jan 2014 14:13:06 +0000 (08:13 -0600)] 
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.

10 years agoAs Twitter appears to send complete JSON in the chunks, we can simplify buffer manage...
Andrew W. Donoho [Mon, 27 Jan 2014 13:26:44 +0000 (07:26 -0600)] 
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.

10 years agoMove variables out of the iterator class and into the generator function. This slight...
Andrew W. Donoho [Sun, 26 Jan 2014 21:15:56 +0000 (15:15 -0600)] 
Move variables out of the iterator class and into the generator function. This slightly improves locality of code and data.

10 years agoMove recv_chunk() into a stand alone function. Further minimize memory use by using...
Andrew W. Donoho [Sun, 26 Jan 2014 21:02:59 +0000 (15:02 -0600)] 
Move recv_chunk() into a stand alone function. Further minimize memory use by using a chunk sized bytearray.

10 years agoMerge branch 'fix-stream' into pr-fix-stream
Andrew W. Donoho [Fri, 24 Jan 2014 15:44:42 +0000 (09:44 -0600)] 
Merge branch 'fix-stream' into pr-fix-stream

10 years agoCosmetic edits.
Andrew W. Donoho [Fri, 24 Jan 2014 15:44:19 +0000 (09:44 -0600)] 
Cosmetic edits.

10 years agoMinimize string decoding and move to use a bytearray for the buffer. This reduces...
Andrew W. Donoho [Thu, 23 Jan 2014 23:44:46 +0000 (17:44 -0600)] 
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.

10 years agoMerge branch 'fix-stream' into pr-fix-stream
Andrew W. Donoho [Mon, 20 Jan 2014 13:09:28 +0000 (07:09 -0600)] 
Merge branch 'fix-stream' into pr-fix-stream

10 years agoCosmetic edit
Andrew W. Donoho [Mon, 20 Jan 2014 13:06:55 +0000 (07:06 -0600)] 
Cosmetic edit

10 years agoBring HTTP chunk downloading into its own separate method.
Andrew W. Donoho [Fri, 17 Jan 2014 20:54:40 +0000 (14:54 -0600)] 
Bring HTTP chunk downloading into its own separate method.

10 years agoAdd support for both user and site streams.
Andrew W. Donoho [Fri, 17 Jan 2014 20:53:36 +0000 (14:53 -0600)] 
Add support for both user and site streams.

10 years agoIncrease the size of the read buffer to be larger than the average tweet.
Andrew W. Donoho [Thu, 16 Jan 2014 21:11:40 +0000 (15:11 -0600)] 
Increase the size of the read buffer to be larger than the average tweet.

10 years agoMove the potentially uninitialized values out of the if test.
Andrew W. Donoho [Thu, 16 Jan 2014 21:10:54 +0000 (15:10 -0600)] 
Move the potentially uninitialized values out of the if test.

10 years agoUpdate to use OAuth, take in command line arguments and modify the imports to functio...
Andrew W. Donoho [Wed, 15 Jan 2014 14:14:37 +0000 (08:14 -0600)] 
Update to use OAuth, take in command line arguments and modify the imports to function from within the module.

10 years agoTest for delimiters in the stream and removes them. Add comments.
Andrew W. Donoho [Wed, 15 Jan 2014 14:12:39 +0000 (08:12 -0600)] 
Test for delimiters in the stream and removes them. Add comments.

10 years agoChange some default attributes and add TwitterHTTPError (ref: RouxRC [3d29eae] &...
Andrew W. Donoho [Wed, 15 Jan 2014 01:26:27 +0000 (19:26 -0600)] 
Change some default attributes and add TwitterHTTPError (ref: RouxRC [3d29eae] & [642c4a4]

10 years agoFix the uri extension by attribute name.
Andrew W. Donoho [Wed, 15 Jan 2014 01:23:18 +0000 (19:23 -0600)] 
Fix the uri extension by attribute name.

10 years agoDo not send gzip headers for streaming calls. (ref: RouxRC [73efaca])
Andrew W. Donoho [Wed, 15 Jan 2014 00:00:41 +0000 (18:00 -0600)] 
Do not send gzip headers for streaming calls. (ref: RouxRC [73efaca])

10 years agoIgnore .idea files from PyCharm.
Andrew W. Donoho [Tue, 14 Jan 2014 23:58:59 +0000 (17:58 -0600)] 
Ignore .idea files from PyCharm.

10 years agoMake universal wheels.
Mike Verdone [Wed, 20 Nov 2013 21:37:56 +0000 (22:37 +0100)] 
Make universal wheels.

10 years agoVersion 1.10.2. twitter-1.10.2
Mike Verdone [Wed, 20 Nov 2013 21:33:54 +0000 (22:33 +0100)] 
Version 1.10.2.

10 years agofallback to simplejson.
Mike Verdone [Wed, 20 Nov 2013 21:32:36 +0000 (22:32 +0100)] 
fallback to simplejson.

10 years agoMerge pull request #184 from MrMitch/relative_imports
Mike Verdone [Mon, 4 Nov 2013 12:51:02 +0000 (04:51 -0800)] 
Merge pull request #184 from MrMitch/relative_imports

use relative import in oauth2.py for auth
Changed:
```py
from twitter.auth import Auth
```

To:
```py
from .auth import Auth
```

in `twitter/oauth2.py` to match import usage made in `twitter/*.py`

10 years agoMerge pull request #183 from iiSeymour/patch-1
Mike Verdone [Mon, 4 Nov 2013 11:50:38 +0000 (03:50 -0800)] 
Merge pull request #183 from iiSeymour/patch-1

Used named argument to avoid TypeError
Named argument is needed to avoid: `TypeError: __call__() takes exactly 1 argument (2 given)`

10 years agoAdd missing json import.
Mike Verdone [Mon, 4 Nov 2013 11:49:21 +0000 (12:49 +0100)] 
Add missing json import.

10 years agoMerge pull request #185 from cegme/json_status_dump
Mike Verdone [Mon, 4 Nov 2013 11:47:16 +0000 (03:47 -0800)] 
Merge pull request #185 from cegme/json_status_dump

Added a json format option
This addition allows the user to get the raw json tweet information from each row. This is helpful when the twitter json format is needed by another process.

Example usage: `twitter --format=json  friends`

This would get the latest tweets from friends in the raw json format. That json can be ported into another process or another database for processing.

10 years agoMerge pull request #178 from dkanygin/master
Mike Verdone [Mon, 4 Nov 2013 11:43:32 +0000 (03:43 -0800)] 
Merge pull request #178 from dkanygin/master

added timeout option to TwitterStream
In case of low tweet volume, we now can timeout and exit iterator to update search query or other housekeeping tasks.

10 years agoAdded a json format option
Christan Grant [Fri, 18 Oct 2013 22:44:49 +0000 (18:44 -0400)] 
Added a json format option

This addition allows the user to get the raw json tweet information from each row. This is helpful when the twitter json format is needed by another process.

Example usage: `twitter --format=json -r friends`

10 years agouse relative import in oauth2.py for auth
Mickael GOETZ [Wed, 16 Oct 2013 19:16:14 +0000 (21:16 +0200)] 
use relative import in oauth2.py for auth

10 years agoUsed named argument to avoid TypeError: __call__() takes exactly 1 argument (2 given)
Chris Seymour [Thu, 10 Oct 2013 16:51:54 +0000 (17:51 +0100)] 
Used named argument to avoid TypeError: __call__() takes exactly 1 argument (2 given)

10 years agoUpdate setup.py
Dennis Kanygin [Tue, 1 Oct 2013 21:43:58 +0000 (14:43 -0700)] 
Update setup.py

10 years agochange version number to 1.10.1
Dennis Kanygin [Tue, 1 Oct 2013 17:14:34 +0000 (10:14 -0700)] 
change version number to 1.10.1

10 years agoDeal with reading empty buffer (SSL errno2) in timeout mode
Dennis Kanygin [Tue, 24 Sep 2013 18:25:59 +0000 (11:25 -0700)] 
Deal with reading empty buffer (SSL errno2) in timeout mode

10 years agoDeal with SSL errno2 in timetout mode
Dennis Kanygin [Tue, 24 Sep 2013 18:22:34 +0000 (11:22 -0700)] 
Deal with SSL errno2 in timetout mode

10 years agoDeal with SSL errno 2 in timeout mode
Dennis Kanygin [Tue, 24 Sep 2013 18:07:19 +0000 (11:07 -0700)] 
Deal with SSL errno 2 in timeout mode

10 years agoadded timeout option to TwitterStream
Dennis Kanygin [Wed, 11 Sep 2013 23:03:31 +0000 (16:03 -0700)] 
added timeout option to TwitterStream

In case of low tweet volume, we now can timeout and exit iterator to update search query or other housekeeping tasks.

10 years agoMerge pull request #168 from mjumbewu/patch-1
Mike Verdone [Mon, 2 Sep 2013 16:36:31 +0000 (09:36 -0700)] 
Merge pull request #168 from mjumbewu/patch-1

Import TwitterHTTPError for stream module
The TwitterJSONIter raises TwitterHTTPError on HTTPError, but it is never imported into the module.

10 years agoMerge pull request #167 from lumbric/master
Mike Verdone [Mon, 2 Sep 2013 16:35:56 +0000 (09:35 -0700)] 
Merge pull request #167 from lumbric/master

Add stream documenation
It was very difficult to find information on this topic. Now that I figured out how to get direct messages, I added it to the README.

See also questions and discussions on this topic:
http://stackoverflow.com/a/17536438/859591
https://dev.twitter.com/discussions/8081
https://dev.twitter.com/discussions/8110

10 years agoMerge pull request #174 from RouxRC/master
Mike Verdone [Mon, 2 Sep 2013 16:34:50 +0000 (09:34 -0700)] 
Merge pull request #174 from RouxRC/master

POST for "statuses/filter" in Streaming API
Twitter recommends to use preferably POST for the filter method in the Streaming API https://dev.twitter.com/docs/api/1.1/post/statuses/filter
So it should be listed here

10 years agoTwitter also strongly encourage to use POST on users/lookup https://dev.twitter.com...
RouxRC [Fri, 16 Aug 2013 07:58:54 +0000 (09:58 +0200)] 
Twitter also strongly encourage to use POST on users/lookup https://dev.twitter.com/docs/api/1.1/get/users/lookup

10 years agoTwitter recommends to use preferably POST for the filter method in the Streaming...
RouxRC [Fri, 16 Aug 2013 01:46:20 +0000 (03:46 +0200)] 
Twitter recommends to use preferably POST for the filter method in the Streaming API, so it should be listed here

10 years agoImport TwitterHTTPError for stream module
Mjumbe Poe [Sun, 14 Jul 2013 08:07:34 +0000 (04:07 -0400)] 
Import TwitterHTTPError for stream module

10 years agoadd some documentation for streams
lumbric [Tue, 9 Jul 2013 16:17:30 +0000 (18:17 +0200)] 
add some documentation for streams

See also questions and discussions on this topic:
http://stackoverflow.com/a/17536438/859591
https://dev.twitter.com/discussions/8081
https://dev.twitter.com/discussions/8110

10 years agoMerge pull request #164 from LeadSift/master
Mike Verdone [Tue, 2 Jul 2013 20:34:23 +0000 (13:34 -0700)] 
Merge pull request #164 from LeadSift/master

Updating README for _id and _method docs

10 years agoAdding _id and _method docs to README
Hatem Nassrat [Wed, 26 Jun 2013 15:03:23 +0000 (12:03 -0300)] 
Adding _id and _method docs to README

10 years agoVersion 1.10.0 twitter-1.10.0
Mike Verdone [Sat, 22 Jun 2013 17:14:26 +0000 (11:14 -0600)] 
Version 1.10.0

10 years agoMerge pull request #156 from mattcen/master
Mike Verdone [Sat, 22 Jun 2013 17:11:13 +0000 (10:11 -0700)] 
Merge pull request #156 from mattcen/master

DM archiving, Twitter API upgrade, better timestamps.
You know what's awesome? Patching a program, realising you should rebase your patch on the latest commit (I based off twitter-1.8.0, so had a fair few changes to make), and then finding all the features (namely Favourites and Mentions) that got added to master in the meantime! Love your project! I will likely try to tweak the Favourites and Mentions behaviours in the near future though so they and Timeline-fetching aren't mutually exclusive.

NOTE: You'd need to update your Twitter App settings to allow viewing and posting of DMs for this to work out of the box for people.

    Add argument to get DMs
    Adapt statuses_portion()
    Adapt statuses() to optionally handle DMs
    Adapt main() to pull down DMs if instructed
    Enforce Twitter API 1.1 for archiver and follow.
    Add option to allow more accurate timestamps (specifically the timezone specification) in output files.

10 years agoFix timezone bug introduced in previous commit
Matthew Cengia [Sat, 22 Jun 2013 07:32:19 +0000 (17:32 +1000)] 
Fix timezone bug introduced in previous commit

Removed too much code; wasn't converting to local timezone anymore

10 years agoTidy up timestamp and timezone code
Matthew Cengia [Sat, 22 Jun 2013 07:26:59 +0000 (17:26 +1000)] 
Tidy up timestamp and timezone code

10 years agoFix style of exception handler
Matthew Cengia [Fri, 14 Jun 2013 00:00:24 +0000 (10:00 +1000)] 
Fix style of exception handler

http://docs.python.org/2/tutorial/errors.html#handling-exceptions

"except ValueError, e: was the syntax used for what is normally written
  as except ValueError as e: in modern Python (described below). "

10 years agoAdd mattcen as author
Matthew Cengia [Sun, 9 Jun 2013 07:10:28 +0000 (17:10 +1000)] 
Add mattcen as author

10 years agoConvert archiver.py and follow.py to API 1.1
Matthew Cengia [Sun, 9 Jun 2013 06:57:14 +0000 (16:57 +1000)] 
Convert archiver.py and follow.py to API 1.1

This is mostly done. I've not yet decided on a tidy way to re-implement
the API limit tests, since this has changed significantly between API
versions 1.0 and 1.1.

Further, as I understand it, API 1.1 requires OAuth for everything, but
it is still an optional command argument which is off by default. This
should be fairly trivial to fix, but I've not yet done so.

10 years agoAllow storage of date in ISO (RFC 3339) format
Matthew Cengia [Fri, 24 May 2013 11:49:52 +0000 (21:49 +1000)] 
Allow storage of date in ISO (RFC 3339) format

10 years agoAdapt code to archive DMs
Matthew Cengia [Wed, 22 May 2013 13:19:13 +0000 (23:19 +1000)] 
Adapt code to archive DMs

* Add argument to get DMs
* Adapt statuses_portion()
* Adapt statuses() to optionally handle DMs
* Adapt main() to pull down DMs if instructed

10 years agoFix some tests.
Mike Verdone [Fri, 21 Jun 2013 21:11:44 +0000 (15:11 -0600)] 
Fix some tests.

10 years agoUpdate some of the cmdline to support API 1.1.
Mike Verdone [Fri, 21 Jun 2013 20:17:03 +0000 (14:17 -0600)] 
Update some of the cmdline to support API 1.1.

10 years agoMerge pull request #160 from nicksloan/master
Mike Verdone [Fri, 21 Jun 2013 20:08:23 +0000 (13:08 -0700)] 
Merge pull request #160 from nicksloan/master

Fixes sixohsix/twitter#154: application-only authentication with oauth2 support
Fixes sixohsix/twitter#154: application-only authentication with oauth2 support. Tested on python 2.7 and python 3.3.

10 years agoMerge pull request #159 from StalkR/author
Mike Verdone [Fri, 21 Jun 2013 19:59:53 +0000 (12:59 -0700)] 
Merge pull request #159 from StalkR/author

add StalkR as initial contributor of archiver and follow

10 years agoAdd support for the OAuth2 application-only flow supported by /1.1/search/tweets...
Nick Sloan [Thu, 13 Jun 2013 22:00:12 +0000 (18:00 -0400)] 
Add support for the OAuth2 application-only flow supported by /1.1/search/tweets, /oauth2/token and others.

10 years agoadd StalkR as initial contributor of archiver and follow
StalkR [Thu, 13 Jun 2013 19:59:05 +0000 (21:59 +0200)] 
add StalkR as initial contributor of archiver and follow

11 years agoVersion 1.9.4. twitter-1.9.4
Mike Verdone [Sun, 21 Apr 2013 11:57:43 +0000 (13:57 +0200)] 
Version 1.9.4.

11 years agoDo not wrap str objects, Python 3.3 freaks out. Fixes #142.
Mike Verdone [Sun, 21 Apr 2013 11:56:18 +0000 (13:56 +0200)] 
Do not wrap str objects, Python 3.3 freaks out. Fixes #142.

11 years agoVersion 1.9.3. twitter-1.9.3
Mike Verdone [Sun, 21 Apr 2013 11:36:16 +0000 (13:36 +0200)] 
Version 1.9.3.

11 years agoFix search test to use 1.1 API.
Mike Verdone [Sun, 21 Apr 2013 11:26:44 +0000 (13:26 +0200)] 
Fix search test to use 1.1 API.

11 years agoMerge pull request #138 from DarkDefender/master
Mike Verdone [Thu, 18 Apr 2013 15:12:11 +0000 (08:12 -0700)] 
Merge pull request #138 from DarkDefender/master

Fix twitter stream under python 3
This fixes the "AttributeError: '_io.BufferedReader' object has no attribute '_sock'" error when trying to create a twitter stream with python3.

There are two issues (#70 and #108) that are fixed with this commit.

I have written a twitter script in python 3 with your twitter lib so I would be really glad if you can merge this and then create a new point release of the lib.

That way I can release the script without having to tell the users to manually patch the twitter lib.

I'm sorry if you've already read my reply to #108. But I would really like this to get merged and released ASAP.

11 years agoFix twitter stream error under python 3
Sebastian Parborg [Sat, 13 Apr 2013 09:11:51 +0000 (11:11 +0200)] 
Fix twitter stream error under python 3

This fixes the "AttributeError: '_io.BufferedReader' object has no
attribute '_sock'" error when trying to create a twitter stream with
python3

11 years agoMerge pull request #137 from MrMitch/relative_imports
Mike Verdone [Sun, 7 Apr 2013 20:57:00 +0000 (13:57 -0700)] 
Merge pull request #137 from MrMitch/relative_imports

use relative imports in api.py for twitter_globals and auth

11 years agouse relative imports in api.py for twitter_globals and auth
Mickael GOETZ [Sun, 7 Apr 2013 19:56:56 +0000 (21:56 +0200)] 
use relative imports in api.py for twitter_globals and auth

11 years agoVersion 1.9.2. twitter-1.9.2
Mike Verdone [Mon, 25 Mar 2013 19:53:21 +0000 (20:53 +0100)] 
Version 1.9.2.

11 years ago1.1 as default in stream. Give up on simplejson.
Mike Verdone [Mon, 25 Mar 2013 19:51:56 +0000 (20:51 +0100)] 
1.1 as default in stream. Give up on simplejson.

11 years agoDefault to 1.1 for all domains, not just api.twitter.com.
Mike Verdone [Mon, 25 Mar 2013 19:49:28 +0000 (20:49 +0100)] 
Default to 1.1 for all domains, not just api.twitter.com.

11 years agoMake Python 3.3 work again.
Mike Verdone [Mon, 25 Mar 2013 19:43:56 +0000 (20:43 +0100)] 
Make Python 3.3 work again.

11 years agoMerge pull request #134 from pykler/master
Mike Verdone [Mon, 25 Mar 2013 19:37:48 +0000 (12:37 -0700)] 
Merge pull request #134 from pykler/master

Being safe looking for content-encoding header
I managed to bump into a situation with stream.twitter.com where the content encoding header was not in the headers ... so I am making the check more robust to handle the case where the header is not there.

@sixohsix can you consider merging this in before the micro version bump.

11 years agoBe safe about looking for the Content-Encoding header.
Hatem Nassrat [Mon, 25 Mar 2013 17:25:02 +0000 (17:25 +0000)] 
Be safe about looking for the Content-Encoding header.

11 years agoMerge pull request #132 from pykler/master
Mike Verdone [Mon, 25 Mar 2013 14:54:49 +0000 (07:54 -0700)] 
Merge pull request #132 from pykler/master

Removing tests/runner.py (not needed)

11 years agoRemoving runner.py ... all you need is python-nose to run them.
Hatem Nassrat [Sun, 24 Mar 2013 20:08:15 +0000 (20:08 +0000)] 
Removing runner.py ... all you need is python-nose to run them.

11 years agoMerge pull request #125 from MrMitch/syntax-highlighting
Mike Verdone [Sun, 24 Mar 2013 17:46:16 +0000 (10:46 -0700)] 
Merge pull request #125 from MrMitch/syntax-highlighting

Make code blocks use syntax highlighting in README
Make code blocks use syntax highlighting so they are more eye-friendly
Also make URL be turned into `<a></a>` markup

11 years agoMerge pull request #131 from pykler/master
Mike Verdone [Sun, 24 Mar 2013 17:23:11 +0000 (10:23 -0700)] 
Merge pull request #131 from pykler/master

With Twitter 1.1 an invalid oauth raises httplib.IncompleteRead
An exception is happening in the TwitterHTTPError's __init__ when it is trying to read twitter's error message. This patch catches that error (IncompleteRead Error) and handles it.

Also included in this pull request is a test case to demonstrate this error as well as a runner.py file to help run all the tests.

11 years agoAdding test runner and test case for TwitterHTTPError error handling.
Hatem Nassrat [Wed, 20 Mar 2013 19:41:46 +0000 (19:41 +0000)] 
Adding test runner and test case for TwitterHTTPError error handling.

11 years agoHandling errors in TwitterHTTPError __init__
Hatem Nassrat [Wed, 20 Mar 2013 19:40:20 +0000 (19:40 +0000)] 
Handling errors in TwitterHTTPError __init__