Python 3 Compatibility #183

Merged
michaelhelmick merged 5 commits from python3-compat into master 2013-04-29 08:27:43 -07:00
michaelhelmick commented 2013-04-18 23:24:24 -07:00 (Migrated from github.com)
  • Added a HISTORY.rst to start tracking history of changes
  • Updated twitter_endpoints.py to endpoints.py for cleanliness
  • Removed twython3k directory, no longer needed
  • Added compat.py for compatability with Python 2.6 and greater
  • Added some ascii art, moved description of Twython and __author__ to __init__.py
  • Added version.py to store the current Twython version, instead of repeating it twice -- it also had to go into it's own file because of dependencies of requests and requests-oauthlib, install would fail because those libraries weren't installed yet (on fresh install of Twython)
  • Removed find_packages() from setup.py, only one package -- we can
    just define it
  • added quick publish method for Ryan and I: python setup.py publish is faster to type and easier to remember than python setup.py sdist upload
  • Removed base_url from endpoints.py because we're just repeating it in
    Twython.__init__
  • Twython.get_authentication_tokens() now takes callback_url argument rather than passing the callback_url through Twython.__init__, callback_url is only used in the get_authentication_tokens method and nowhere else (kept in init though for backwards compatability)
  • Updated README to better reflect current Twython codebase
  • Added warnings.simplefilter('default') line in twython.py for Python 2.7 and greater to display Deprecation Warnings in console
  • Added Deprecation Warnings for usage of twitter_token, twitter_secret and callback_url in Twython.__init__
  • Headers now always include the User-Agent as Twython vXX unless User-Agent is overwritten
  • Removed senseless TwythonError thrown if method is not GET or POST, who cares -- if the user passes something other than GET or POST just let Twitter return the error that they messed up
  • Removed conversion to unicode of (int, bool) params passed to a requests. requests isn't greedy about variables that can't be converted to unicode anymore
  • Removed bulkUserLookup (please use lookupUser instead), removed getProfileImageUrl (will be completely removed from Twitter API on May 7th, 2013)
  • Updated shortenUrl to actually work for those using it, but it is being deprecated since requests makes it easy for developers to implement their own url shortening in their app (see https://github.com/ryanmcgrath/twython/issues/184)
  • Twython Deprecation Warnings will now be seen in shell when using Python 2.7 and greater
  • Twython now takes ssl_verify parameter, defaults True. Set False if you're having development server issues
  • Removed internal _media_update function, we could have always just used self.post
- Added a `HISTORY.rst` to start tracking history of changes - Updated `twitter_endpoints.py` to `endpoints.py` for cleanliness - Removed twython3k directory, no longer needed - Added `compat.py` for compatability with Python 2.6 and greater - Added some ascii art, moved description of Twython and `__author__` to `__init__.py` - Added `version.py` to store the current Twython version, instead of repeating it twice -- it also had to go into it's own file because of dependencies of `requests` and `requests-oauthlib`, install would fail because those libraries weren't installed yet (on fresh install of Twython) - Removed `find_packages()` from `setup.py`, only one package -- we can just define it - added quick publish method for Ryan and I: `python setup.py publish` is faster to type and easier to remember than `python setup.py sdist upload` - Removed `base_url` from `endpoints.py` because we're just repeating it in `Twython.__init__` - `Twython.get_authentication_tokens()` now takes `callback_url` argument rather than passing the `callback_url` through `Twython.__init__`, `callback_url` is only used in the `get_authentication_tokens` method and nowhere else (kept in init though for backwards compatability) - Updated README to better reflect current Twython codebase - Added `warnings.simplefilter('default')` line in `twython.py` for Python 2.7 and greater to display Deprecation Warnings in console - Added Deprecation Warnings for usage of `twitter_token`, `twitter_secret` and `callback_url` in `Twython.__init__` - Headers now always include the User-Agent as Twython vXX unless User-Agent is overwritten - Removed senseless TwythonError thrown if method is not GET or POST, who cares -- if the user passes something other than GET or POST just let Twitter return the error that they messed up - Removed conversion to unicode of (int, bool) params passed to a requests. `requests` isn't greedy about variables that can't be converted to unicode anymore - Removed `bulkUserLookup` (please use `lookupUser` instead), removed `getProfileImageUrl` (will be completely removed from Twitter API on May 7th, 2013) - Updated shortenUrl to actually work for those using it, but it is being deprecated since `requests` makes it easy for developers to implement their own url shortening in their app (see https://github.com/ryanmcgrath/twython/issues/184) - Twython Deprecation Warnings will now be seen in shell when using Python 2.7 and greater - Twython now takes `ssl_verify` parameter, defaults True. Set False if you're having development server issues - Removed internal `_media_update` function, we could have always just used `self.post`
michaelhelmick commented 2013-04-18 23:25:11 -07:00 (Migrated from github.com)

And of course @ryanmcgrath approval of such large changes would be appreciated :)
(Ps. Take your time, no rush to push this)

And of course @ryanmcgrath approval of such large changes would be appreciated :) (Ps. Take your time, no rush to push this)
ryanmcgrath commented 2013-04-18 23:31:25 -07:00 (Migrated from github.com)

Offhand this looks great. Will confirm in morning. Nice!

On Friday, April 19, 2013, Mike Helmick wrote:

And of course @ryanmcgrath https://github.com/ryanmcgrath approval of
such large changes would be appreciated :)
(Ps. Take your time, no rush to push this)


Reply to this email directly or view it on GitHubhttps://github.com/ryanmcgrath/twython/pull/183#issuecomment-16637875
.

Skype: ryanmcgrathr
Twitter: http://twitter.com/ryanmcgrath/
Web: http://venodesigns.net/
GitHub: http://github.com/ryanmcgrath/

Offhand this looks great. Will confirm in morning. Nice! On Friday, April 19, 2013, Mike Helmick wrote: > And of course @ryanmcgrath https://github.com/ryanmcgrath approval of > such large changes would be appreciated :) > (Ps. Take your time, no rush to push this) > > — > Reply to this email directly or view it on GitHubhttps://github.com/ryanmcgrath/twython/pull/183#issuecomment-16637875 > . ## Skype: ryanmcgrathr Twitter: http://twitter.com/ryanmcgrath/ Web: http://venodesigns.net/ GitHub: http://github.com/ryanmcgrath/
ryanmcgrath commented 2013-04-20 15:12:37 -07:00 (Migrated from github.com)

I think we're good here, yeah. Amazing work @michaelhelmick.

I think we're good here, yeah. Amazing work @michaelhelmick.
michaelhelmick commented 2013-04-22 18:42:09 -07:00 (Migrated from github.com)

Alright man, I fixed #184 (I updated the function for those using it [only for is.gd] and we can fully remove it in a future release)

I won't be available the week of Twitter deprecating their v1 API (May 7th, 2013) and I'm not sure of your schedule Ryan, so I went ahead and removed the bulkUserLookup and getProfileImageUrl methods completely; bulkUserLookup has been a long time coming I believe, I forget what actually happened to it, I think the url just changed or something. and getProfileImageUrl will be completely unavailable as there is no dedicated endpoint in v1.1 for this functionality

I know we talked about a 2.7.5 release but since those methods will no longer be available I say that calls for a 2.8.0 release since we're removing functions

Alright man, I fixed #184 (I updated the function for those using it [only for is.gd] and we can fully remove it in a future release) I won't be available the week of Twitter deprecating their v1 API (May 7th, 2013) and I'm not sure of your schedule Ryan, so I went ahead and removed the `bulkUserLookup` and `getProfileImageUrl` methods completely; `bulkUserLookup` has been a long time coming I believe, I forget what actually happened to it, I think the url just changed or something. and `getProfileImageUrl` will be completely unavailable as there is no dedicated endpoint in v1.1 for this functionality I know we talked about a `2.7.5` release but since those methods will no longer be available I say that calls for a `2.8.0` release since we're removing functions
michaelhelmick commented 2013-04-26 15:26:07 -07:00 (Migrated from github.com)

Hopefully I can get a 👍 to merge this in this weekend? :D

Hopefully I can get a :+1: to merge this in this weekend? :D
ryanmcgrath commented 2013-04-28 16:43:55 -07:00 (Migrated from github.com)

Honestly this seems good to go, from what I'm seeing. I think you made the right call with is.gd and then removing it down the road; 2.8 is fine with me.

Cheers, rock it~

Honestly this seems good to go, from what I'm seeing. I think you made the right call with is.gd and then removing it down the road; `2.8` is fine with me. Cheers, rock it~
michaelhelmick commented 2013-04-28 16:44:28 -07:00 (Migrated from github.com)

👍 Will merge and push release tomorrow!

:+1: Will merge and push release tomorrow!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: code/twython#183
No description provided.