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 rate limit u.refresh(True) # Will send the GET with a header such that if nothing # has changed, it will not count against your rate limit # 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_keysnow 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,
pubsubhubbubhas 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
userattribute was changed by GitHub and is now theownerattributethe
publicattribute and theis_publicmethod return the same information. The method will be removed in the next version.the
is_starredmethod now requires authenticationthe default
refreshmethod is no longer over-ridden. In a change made in before, a genericrefreshmethod was added to most objects. This was overridden in the Gist object and would cause otherwise unexpected results.
github3.events.Event.is_public()andgithub3.events.Event.publicnow return the same information. In the next version, the former will be removed.In github3.issues.Issue
add_labelsnow returns the list of Labels on the issue instead of a boolean.remove_labelnow returns a boolean.remove_all_labelsandreplace_labelsnow return lists. The former should return an empty list on a successful call. The latter should return a list ofgithub3.issue.Labelobjects.
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.