$OpenBSD: patch-apertium_apy_gateway_py,v 1.1 2021/01/23 08:08:55 daniel Exp $

fix the build with tornado6

backport of commit 15cfa135 from upstream

Index: apertium_apy/gateway.py
--- apertium_apy/gateway.py.orig
+++ apertium_apy/gateway.py
@@ -14,6 +14,7 @@ from collections import OrderedDict
 import tornado
 import tornado.httpclient
 import tornado.httpserver
+import tornado.gen
 import tornado.web
 from tornado.options import enable_pretty_logging  # type: ignore
 from tornado.web import RequestHandler
@@ -42,7 +43,7 @@ class RedirectRequestHandler(RequestHandler):
     def initialize(self, balancer):
         self.balancer = balancer
 
-    @tornado.web.asynchronous
+    @tornado.gen.coroutine
     def get(self):
         path = self.request.path
         mode, lang_pair, per_word_modes = [None] * 3
@@ -106,7 +107,7 @@ class RedirectRequestHandler(RequestHandler):
             self.set_header(hname, hvalue)
         self.finish()
 
-    @tornado.web.asynchronous
+    @tornado.gen.coroutine
     def post(self):
         self.get()
 
@@ -120,7 +121,7 @@ class ListRequestHandler(apy.BaseHandler):
         if callbacks:
             self.callback = callbacks[0]
 
-    @tornado.web.asynchronous
+    @tornado.gen.coroutine
     def get(self):
         logging.info('Overriding list call: %s %s', self.request.path, self.get_arguments('q'))
         if self.request.path != '/listPairs' and self.request.path != '/list':
