-
-
Notifications
You must be signed in to change notification settings - Fork 460
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
16 June 2015 - Replace "liked" with "upvoted" for all purposes #429
Conversation
The "liked" and "disliked" names will eventually be phased out. Add methods get_upvoted and get_downvoted to objects.Redditor, keeping get_liked as a pointer.
Fixed test_scope_history to use Redditor.get_upvoted
I'll try taking a look at this in a bit so we can get this merged in. |
So here's what I'm assuming is why the tests passed in an inverted state. I'm guessing you have a Either removing the Merged as: 2ea38cb Thanks! |
The praw.ini file in my branch matches the one in the master repo 100%, so that can't be it. Could it have something to do with the oauth tokens needing to be regularly refreshed, and maybe the cassette I generated was outdated by the time Travis ran the test? I don't know enough about oauth to make any better guesses. |
The oauth tokens I think only ever needed to be refreshed once (if at all). My guess is you have a Try running:
Does the output url match: https://127.0.0.1:65010/authorize_callback? |
You're right, there's a copy from February 2014 in AppData/Roaming, haha. Looks like the config loader does a for-loop over all the filepaths, overwriting the dictionary values each time. Because the appdata file was the last to load, these settings became finalized. Changing the You might want to consider making this change in the repo so that local files always land on top. edit: The third entry in the |
That order is by design if you look at the documents. It allows you to overwrite the global ini if you want to. Generally you wouldn't use it to redefine any sections other than the reddit one though. You can always add more new config sections. Does that make sense? |
I see what you mean here. That could be a problem. However, betamax captures the request to obtain a new access token, and thus always returns the same one in replayed tests. |
Yeah, you're right about that, the http line must have been the problem. I guess I see your point about the config locations. In my case, the CWD was the praw folder itself, so I was expecting it to load that config instead of jumping out to AppData. If I had been anywhere else it would have made more immediate sense. Most people don't work from within their python Lib, so I suppose they won't be running into that issue. |
I just realized that praw never received this update. Reddit isn't closing "liked" and "disliked" yet, but it will probably happen eventually.
http://www.reddit.com/r/changelog/comments/36t36j/reddit_change_all_remaining_uses_of_liked_and/
Added methods get_upvoted and get_downvoted to objects.Redditor, keeping get_liked and get_disliked as shortcut methods with a note in the docstring. I didn't think a full-blown
deocrators.deprecated
warning was necessary, since the functionality doesn't change at all.I'm not sure what's going on with
test_oauth2_reddit.test_scope_history
. When I runpy setup.py test
I see this:The Travis error log is inverted -- all ok except for test_scope_history. What does this mean?