magalbraith / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

In GetUserTimeline(), since_id and max_id should be Python longs instead of ints to avoid Twitpocalypse #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open Twitter.py and look for GetUserTimeline() function
2. since_id and max_id are converted to Python ints 

What is the expected output? What do you see instead?
Expect: long
Actual: int

What version of the product are you using? On what operating system?
Python 2.6.2 on Mac OS X 10.5.7

Please provide any additional information below.

http://www.twitpocalypse.com/

On my Mac, the maximum integer value is not big enough to hold Tweet ids >
2,147,483,647.

>>> sys.maxint
2,147,483,647

Original issue reported on code.google.com by dougire...@gmail.com on 4 Aug 2009 at 5:49

GoogleCodeExporter commented 9 years ago
I am on a mac also.  This is a non issue as the int() function will auto 
convert to longs when needed. 

[jrossi@jeremy-rossi]~/src/% /opt/local/bin/python
Python 2.6.1 (r261:67515, Mar 11 2009, 18:51:29) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> int('3129030209')
3129030209L
>>> sys.maxint
2147483647

[jrossi@jeremy-rossi]~/src/% /usr/bin/python
Python 2.5.1 (r251:54863, Feb  6 2009, 19:02:12) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> int('3129030209')
3129030209L
>>> sys.maxint
2147483647
>>> 

I have been using my version of python-twitter live now and am not getting any 
problem due to twitpocalypse.

Original comment by jeremyro...@fastmail.fm on 4 Aug 2009 at 6:36

GoogleCodeExporter commented 9 years ago
Fixed in r181 and r182 for the trunk and -dclinton branches respectively.  
Please 
verify.

Original comment by dclinton on 4 Aug 2009 at 6:51