From fdabb804cf4ade9f18186a30bc52439a98f4372c Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 7 Aug 2018 17:19:25 +0200 Subject: [PATCH 1/3] Call print as a function --- cps/asyncmail.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/asyncmail.py b/cps/asyncmail.py index 857ca0d1..a3161c62 100644 --- a/cps/asyncmail.py +++ b/cps/asyncmail.py @@ -44,7 +44,8 @@ class email(smtplib.SMTP): def send(self, str): """Send `str' to the server.""" if self.debuglevel > 0: - print>> sys.stderr, 'send:', repr(str) + from __future__ import print_function + print('send:', repr(str), file=sys.stderr) if hasattr(self, 'sock') and self.sock: try: if self.transferSize: @@ -235,7 +236,7 @@ class StderrLogger(object): def write(self, message): if message == '\n': self.logger.debug(self.buffer) - print self.buffer + print(self.buffer) self.buffer = '' else: self.buffer += message From 5ec9051f2ef6da7cdd212647c6cf6d185ed50e6a Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Tue, 7 Aug 2018 18:19:08 +0200 Subject: [PATCH 2/3] Add charset to opds feed for read books --- cps/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/web.py b/cps/web.py index 8fd41410..0e7a389d 100755 --- a/cps/web.py +++ b/cps/web.py @@ -1864,7 +1864,7 @@ def render_read_books(page, are_read, as_xml=False): if as_xml: xml = render_title_template('feed.xml', entries=entries, pagination=pagination) response = make_response(xml) - response.headers["Content-Type"] = "application/xml" + response.headers["Content-Type"] = "application/xml; charset=utf-8" return response else: if are_read: From 1e5cb29fc97b37af337595ae307133cda8da34f5 Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Wed, 8 Aug 2018 06:54:38 +0200 Subject: [PATCH 3/3] #571 (temporary fix) --- cps/asyncmail.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/asyncmail.py b/cps/asyncmail.py index a3161c62..620e0a06 100644 --- a/cps/asyncmail.py +++ b/cps/asyncmail.py @@ -44,8 +44,9 @@ class email(smtplib.SMTP): def send(self, str): """Send `str' to the server.""" if self.debuglevel > 0: - from __future__ import print_function - print('send:', repr(str), file=sys.stderr) + # from __future__ import print_function + # print('send:', repr(str), file=sys.stderr) + pass if hasattr(self, 'sock') and self.sock: try: if self.transferSize: