11.08., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit 3e3cbffd authored by eckhart's avatar eckhart

- server.py: compatibility with pypy3 (e.g. python 3.6) fixed

parent c5b90ba1
...@@ -41,6 +41,7 @@ For JSON see: ...@@ -41,6 +41,7 @@ For JSON see:
https://json.org/ https://json.org/
""" """
# TODO: Test with python 3.5
import asyncio import asyncio
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, CancelledError from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, CancelledError
...@@ -54,6 +55,7 @@ from DHParser.syntaxtree import DHParser_JSONEncoder ...@@ -54,6 +55,7 @@ from DHParser.syntaxtree import DHParser_JSONEncoder
from DHParser.toolkit import get_config_value, re from DHParser.toolkit import get_config_value, re
from DHParser.versionnumber import __version__ from DHParser.versionnumber import __version__
__all__ = ('RPC_Table', __all__ = ('RPC_Table',
'RPC_Type', 'RPC_Type',
'JSON_Type', 'JSON_Type',
...@@ -400,7 +402,7 @@ class Server: ...@@ -400,7 +402,7 @@ class Server:
self.loop.run_forever() self.loop.run_forever()
finally: finally:
self.server.close() self.server.close()
self.server.wait_closed() asyncio_run(self.server.wait_closed())
def _empty_message_queue(self): def _empty_message_queue(self):
while not self.server_messages.empty(): while not self.server_messages.empty():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment