0.5.0: 2013-02-16¶
100% (mock) test coverage
Add support for conditional refreshing, e.g.,
import github3 u = github3.user('sigmavirus24') # some time later u.refresh() # Will ALWAYS send a GET request and lower your ratelimit u.refresh(True) # Will send the GET with a header such that if nothing # has changed, it will not count against your ratelimit # otherwise you'll get the updated user object.
Add support for conditional iterables. What this means is that you can do:
import github3 i = github3.iter_all_repos(10) for repo in i: # do stuff i = github3.iter_all_repos(10, etag=i.etag)
And the second call will only give you the new repositories since the last request. This mimics behavior in pengwynn/octokit
Add support for sortable stars.
In github3.users.User,
iter_keys
now allows you to iterate over any user’s keys. No name is returned for each key. This is the equivalent of visiting: github.com/:user.keysIn github3.repos.Repository,
pubsubhubbub
has been removed. Use github3.github.Github.pubsubhubbub insteadIn github3.api,
iter_repo_issues
’s signature has been corrected.Remove
list_{labels, comments, events}
methods from github3.issues.IssueRemove
list_{comments, commits, files}
methods from github3.pulls.PullRequestIn github3.gists.Gist:
- the
user
attribute was changed by GitHub and is now theowner
attribute - the
public
attribute and theis_public
method return the same information. The method will be removed in the next version. - the
is_starred
method now requires authentication - the default
refresh
method is no longer over-ridden. In a change made in before, a genericrefresh
method was added to most objects. This was overridden in the Gist object and would cause otherwise unexpected results.
- the
github3.events.Event.is_public()
andgithub3.events.Event.public
now return the same information. In the next version, the former will be removed.In github3.issues.Issue
add_labels
now returns the list of Labels on the issue instead of a boolean.remove_label
now retuns a boolean.remove_all_labels
andreplace_labels
now return lists. The former should return an empty list on a successful call. The latter should return a list ofgithub3.issue.Label
objects.
Now we won’t get spurious GitHubErrors on 404s, only on other expected errors whilst accessing the json in a response. All methods that return an object can now actually return None if it gets a 404 instead of just raising an exception. (Inspired by #49)
GitHubStatus API now works.