chore(3p/lieer): Revert "Work around issues in Google Mail API"

This reverts commit 8b58593193.

Reason for revert: Google has fixed the upstream issue and this is not necessary anymore.

Change-Id: Ib1f7cfbc0e7e0997239514e9be75d2deab8c3c67
Reviewed-on: https://cl.tvl.fyi/c/depot/+/961
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
This commit is contained in:
tazjin 2020-07-07 09:31:04 +00:00
parent cb52c9e41d
commit c9afd22c44
3 changed files with 0 additions and 3836 deletions

View file

@ -26,10 +26,6 @@ let
export PROJECT_ID='${project}'
cat ${./api_client.patch} | ${gettext}/bin/envsubst > $out
'';
discoveryPatch = runCommand "discovery_doc.patch" {} ''
export DISCOVERY_DOC='${./gmail-api.json}'
cat ${./discovery_doc.patch} | ${gettext}/bin/envsubst > $out
'';
in python3Packages.buildPythonApplication rec {
name = "lieer-${version}";
version = "1.0";
@ -43,7 +39,6 @@ in python3Packages.buildPythonApplication rec {
patches = [
authPatch
discoveryPatch
./send_scope.patch
];

View file

@ -1,15 +0,0 @@
diff --git a/lieer/remote.py b/lieer/remote.py
index 6e3973a..2b0b59e 100644
--- a/lieer/remote.py
+++ b/lieer/remote.py
@@ -386,7 +386,9 @@ class Remote:
if timeout == 0: timeout = None
self.http = self.credentials.authorize (httplib2.Http(timeout = timeout))
- self.service = discovery.build ('gmail', 'v1', http = self.http)
+ with open('${DISCOVERY_DOC}', 'r') as file:
+ discovery_doc = file.read()
+ self.service = discovery.build_from_document(discovery_doc, http = self.http)
self.authorized = True
def __get_credentials__ (self):

File diff suppressed because it is too large Load diff