From e2979f9103c466156e964bd0ad9be7b7b8b7f5d7 Mon Sep 17 00:00:00 2001 From: kaiyou Date: Tue, 25 Jun 2019 19:17:35 +0200 Subject: [PATCH] Merge pull request #6 from Nebukadneza/fix_py37 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t use deprecated now-keyword "async" --- core/base/libs/podop/podop/postfix.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/base/libs/podop/podop/postfix.py b/core/base/libs/podop/podop/postfix.py index 84c7b08d..3140a3a8 100644 --- a/core/base/libs/podop/podop/postfix.py +++ b/core/base/libs/podop/podop/postfix.py @@ -4,7 +4,6 @@ import asyncio import logging - class NetstringProtocol(asyncio.Protocol): """ Netstring asyncio protocol implementation. @@ -91,7 +90,7 @@ class SocketmapProtocol(NetstringProtocol): if space != -1: name = string[:space].decode('ascii') key = string[space+1:].decode('utf8') - return asyncio.async(self.process_request(name, key)) + return asyncio.ensure_future(self.process_request(name, key)) async def process_request(self, name, key): """ Process a request by querying the provided map.