From ca6189c3c94fac963811342ce9f77104d0b5774b Mon Sep 17 00:00:00 2001 From: AKFish Date: Wed, 21 Aug 2013 14:49:20 +0800 Subject: [PATCH] Change CompletableGithubObject.__init__ without breaking build. --- github/AuthenticatedUser.py | 3 +++ github/Authorization.py | 3 +++ github/AuthorizationApplication.py | 3 +++ github/Commit.py | 3 +++ github/CommitComment.py | 3 +++ github/Comparison.py | 3 +++ github/ContentFile.py | 3 +++ github/Download.py | 3 +++ github/Gist.py | 3 +++ github/GistComment.py | 3 +++ github/GistHistoryState.py | 3 +++ github/GitBlob.py | 3 +++ github/GitCommit.py | 3 +++ github/GitRef.py | 3 +++ github/GitTag.py | 3 +++ github/GitTree.py | 3 +++ github/GithubObject.py | 5 +++-- github/Hook.py | 3 +++ github/Issue.py | 3 +++ github/IssueComment.py | 3 +++ github/IssueEvent.py | 3 +++ github/Label.py | 3 +++ github/Milestone.py | 3 +++ github/NamedUser.py | 3 +++ github/Notification.py | 3 +++ github/Organization.py | 3 +++ github/PullRequest.py | 3 +++ github/PullRequestComment.py | 3 +++ github/Repository.py | 3 +++ github/RepositoryKey.py | 3 ++- github/Team.py | 3 +++ github/UserKey.py | 3 +++ 32 files changed, 95 insertions(+), 3 deletions(-) diff --git a/github/AuthenticatedUser.py b/github/AuthenticatedUser.py index 5c4c4866..02467ebb 100644 --- a/github/AuthenticatedUser.py +++ b/github/AuthenticatedUser.py @@ -44,6 +44,9 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject): """ This class represents AuthenticatedUsers as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def avatar_url(self): diff --git a/github/Authorization.py b/github/Authorization.py index 14cc1350..ec9d2241 100644 --- a/github/Authorization.py +++ b/github/Authorization.py @@ -32,6 +32,9 @@ class Authorization(github.GithubObject.CompletableGithubObject): """ This class represents Authorizations as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def app(self): diff --git a/github/AuthorizationApplication.py b/github/AuthorizationApplication.py index 392ec78c..af9c9b7c 100644 --- a/github/AuthorizationApplication.py +++ b/github/AuthorizationApplication.py @@ -30,6 +30,9 @@ class AuthorizationApplication(github.GithubObject.CompletableGithubObject): """ This class represents AuthorizationApplications as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def name(self): diff --git a/github/Commit.py b/github/Commit.py index 322797fe..ada886d1 100644 --- a/github/Commit.py +++ b/github/Commit.py @@ -39,6 +39,9 @@ class Commit(github.GithubObject.CompletableGithubObject): """ This class represents Commits. The reference can be found here http://developer.github.com/v3/git/commits/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def author(self): diff --git a/github/CommitComment.py b/github/CommitComment.py index 30f1df3a..166454ae 100644 --- a/github/CommitComment.py +++ b/github/CommitComment.py @@ -32,6 +32,9 @@ class CommitComment(github.GithubObject.CompletableGithubObject): """ This class represents CommitComments as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def body(self): diff --git a/github/Comparison.py b/github/Comparison.py index eb9eadd8..a131d1b6 100644 --- a/github/Comparison.py +++ b/github/Comparison.py @@ -33,6 +33,9 @@ class Comparison(github.GithubObject.CompletableGithubObject): """ This class represents Comparisons as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def ahead_by(self): diff --git a/github/ContentFile.py b/github/ContentFile.py index fda1d3d6..f38591f8 100644 --- a/github/ContentFile.py +++ b/github/ContentFile.py @@ -30,6 +30,9 @@ class ContentFile(github.GithubObject.CompletableGithubObject): """ This class represents ContentFiles as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def content(self): diff --git a/github/Download.py b/github/Download.py index 7555a8c3..47db03a8 100644 --- a/github/Download.py +++ b/github/Download.py @@ -30,6 +30,9 @@ class Download(github.GithubObject.CompletableGithubObject): """ This class represents Downloads as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def accesskeyid(self): diff --git a/github/Gist.py b/github/Gist.py index ed6aa37f..5453179f 100644 --- a/github/Gist.py +++ b/github/Gist.py @@ -37,6 +37,9 @@ class Gist(github.GithubObject.CompletableGithubObject): """ This class represents Gists as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def comments(self): diff --git a/github/GistComment.py b/github/GistComment.py index 2bb28abd..d228476f 100644 --- a/github/GistComment.py +++ b/github/GistComment.py @@ -32,6 +32,9 @@ class GistComment(github.GithubObject.CompletableGithubObject): """ This class represents GistComments as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def body(self): diff --git a/github/GistHistoryState.py b/github/GistHistoryState.py index 2f095558..34288f1d 100644 --- a/github/GistHistoryState.py +++ b/github/GistHistoryState.py @@ -33,6 +33,9 @@ class GistHistoryState(github.GithubObject.CompletableGithubObject): """ This class represents GistHistoryStates as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def change_status(self): diff --git a/github/GitBlob.py b/github/GitBlob.py index ffb12f98..e4adf50b 100644 --- a/github/GitBlob.py +++ b/github/GitBlob.py @@ -30,6 +30,9 @@ class GitBlob(github.GithubObject.CompletableGithubObject): """ This class represents GitBlobs as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def content(self): diff --git a/github/GitCommit.py b/github/GitCommit.py index 32af246a..488c82d0 100644 --- a/github/GitCommit.py +++ b/github/GitCommit.py @@ -33,6 +33,9 @@ class GitCommit(github.GithubObject.CompletableGithubObject): """ This class represents GitCommits as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def author(self): diff --git a/github/GitRef.py b/github/GitRef.py index 9ff4f30f..fd81e371 100644 --- a/github/GitRef.py +++ b/github/GitRef.py @@ -32,6 +32,9 @@ class GitRef(github.GithubObject.CompletableGithubObject): """ This class represents GitRefs as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def object(self): diff --git a/github/GitTag.py b/github/GitTag.py index 58a34598..186f8928 100644 --- a/github/GitTag.py +++ b/github/GitTag.py @@ -33,6 +33,9 @@ class GitTag(github.GithubObject.CompletableGithubObject): """ This class represents GitTags as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def message(self): diff --git a/github/GitTree.py b/github/GitTree.py index f999de89..741180f2 100644 --- a/github/GitTree.py +++ b/github/GitTree.py @@ -32,6 +32,9 @@ class GitTree(github.GithubObject.CompletableGithubObject): """ This class represents GitTrees as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def sha(self): diff --git a/github/GithubObject.py b/github/GithubObject.py index e4060dff..077cc5c2 100644 --- a/github/GithubObject.py +++ b/github/GithubObject.py @@ -85,9 +85,9 @@ class NonCompletableGithubObject(GithubObject): class CompletableGithubObject(GithubObject): - def __init__(self, requester, attributes, completed): + def __init__(self, requester, headers, attributes, completed): # Adapte for __init__ change, remove later - GithubObject.__init__(self, requester, {}, attributes, completed) + GithubObject.__init__(self, requester, headers, attributes, completed) self.__completed = completed def _completeIfNotSet(self, value): @@ -105,5 +105,6 @@ class CompletableGithubObject(GithubObject): None, None ) + self._headers = headers self._storeAndUseAttributes(data) self.__completed = True diff --git a/github/Hook.py b/github/Hook.py index 4366b559..965cc2ae 100644 --- a/github/Hook.py +++ b/github/Hook.py @@ -32,6 +32,9 @@ class Hook(github.GithubObject.CompletableGithubObject): """ This class represents Hooks as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def active(self): diff --git a/github/Issue.py b/github/Issue.py index 502263de..6c4c9161 100644 --- a/github/Issue.py +++ b/github/Issue.py @@ -41,6 +41,9 @@ class Issue(github.GithubObject.CompletableGithubObject): """ This class represents Issues as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def assignee(self): diff --git a/github/IssueComment.py b/github/IssueComment.py index 5e9e5099..d39470ab 100644 --- a/github/IssueComment.py +++ b/github/IssueComment.py @@ -33,6 +33,9 @@ class IssueComment(github.GithubObject.CompletableGithubObject): """ This class represents IssueComments as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def body(self): diff --git a/github/IssueEvent.py b/github/IssueEvent.py index 431ce2ad..2a5677af 100644 --- a/github/IssueEvent.py +++ b/github/IssueEvent.py @@ -33,6 +33,9 @@ class IssueEvent(github.GithubObject.CompletableGithubObject): """ This class represents IssueEvents as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def actor(self): diff --git a/github/Label.py b/github/Label.py index e2d42335..e09082ff 100644 --- a/github/Label.py +++ b/github/Label.py @@ -33,6 +33,9 @@ class Label(github.GithubObject.CompletableGithubObject): """ This class represents Labels. The reference can be found here http://developer.github.com/v3/issues/labels/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def color(self): diff --git a/github/Milestone.py b/github/Milestone.py index 9611d7b7..2650d24b 100644 --- a/github/Milestone.py +++ b/github/Milestone.py @@ -37,6 +37,9 @@ class Milestone(github.GithubObject.CompletableGithubObject): """ This class represents Milestones. The reference can be found here http://developer.github.com/v3/issues/milestones/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def closed_issues(self): diff --git a/github/NamedUser.py b/github/NamedUser.py index bb99030a..b1e619af 100644 --- a/github/NamedUser.py +++ b/github/NamedUser.py @@ -39,6 +39,9 @@ class NamedUser(github.GithubObject.CompletableGithubObject): """ This class represents NamedUsers as returned for example by http://developer.github.com/v3/todo """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def avatar_url(self): diff --git a/github/Notification.py b/github/Notification.py index f6f89fa5..433cfcd3 100644 --- a/github/Notification.py +++ b/github/Notification.py @@ -33,6 +33,9 @@ class Notification(github.GithubObject.CompletableGithubObject): """ This class represents Notifications. The reference can be found here http://developer.github.com/v3/activity/notifications/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def id(self): diff --git a/github/Organization.py b/github/Organization.py index bf341419..16db918d 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -41,6 +41,9 @@ class Organization(github.GithubObject.CompletableGithubObject): """ This class represents Organizations. The reference can be found here http://developer.github.com/v3/orgs/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def avatar_url(self): diff --git a/github/PullRequest.py b/github/PullRequest.py index a30fa2f8..32c213c5 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -41,6 +41,9 @@ class PullRequest(github.GithubObject.CompletableGithubObject): """ This class represents PullRequests. The reference can be found here http://developer.github.com/v3/pulls/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def additions(self): diff --git a/github/PullRequestComment.py b/github/PullRequestComment.py index c8f0ef6f..31be092b 100644 --- a/github/PullRequestComment.py +++ b/github/PullRequestComment.py @@ -34,6 +34,9 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject): """ This class represents PullRequestComments. The reference can be found here http://developer.github.com/v3/pulls/comments/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def body(self): diff --git a/github/Repository.py b/github/Repository.py index 8e3fb440..50822782 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -65,6 +65,9 @@ class Repository(github.GithubObject.CompletableGithubObject): """ This class represents Repositorys. The reference can be found here http://developer.github.com/v3/repos/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def clone_url(self): diff --git a/github/RepositoryKey.py b/github/RepositoryKey.py index 750541b2..788ac6e3 100644 --- a/github/RepositoryKey.py +++ b/github/RepositoryKey.py @@ -34,7 +34,8 @@ class RepositoryKey(github.GithubObject.CompletableGithubObject): """ def __init__(self, requester, attributes, completed, repoUrl): - github.GithubObject.CompletableGithubObject.__init__(self, requester, attributes, completed) + ##############NOTE: this one should not be removed but modified + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) self.__repoUrl = repoUrl @property diff --git a/github/Team.py b/github/Team.py index b6d681d6..0637d057 100644 --- a/github/Team.py +++ b/github/Team.py @@ -35,6 +35,9 @@ class Team(github.GithubObject.CompletableGithubObject): """ This class represents Teams. The reference can be found here http://developer.github.com/v3/orgs/teams/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def id(self): diff --git a/github/UserKey.py b/github/UserKey.py index 222cd1a5..392a0b64 100644 --- a/github/UserKey.py +++ b/github/UserKey.py @@ -31,6 +31,9 @@ class UserKey(github.GithubObject.CompletableGithubObject): """ This class represents UserKeys. The reference can be found here http://developer.github.com/v3/users/keys/ """ + def __init__(self, requester, attributes, completed): + # Adapte for __init__ change, remove later + github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def id(self):