From 8c628c69fbf8579335de8e6591cf9044f2e58b26 Mon Sep 17 00:00:00 2001 From: Adam Hopkins Date: Mon, 15 Feb 2021 14:23:30 +0200 Subject: [PATCH] fix uvloop version --- setup.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index e762a088..43952819 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,7 @@ import codecs import os import re import sys + from distutils.util import strtobool from setuptools import setup @@ -24,6 +25,7 @@ class PyTest(TestCommand): def run_tests(self): import shlex + import pytest errno = pytest.main(shlex.split(self.pytest_args)) @@ -38,7 +40,9 @@ def open_local(paths, mode="r", encoding="utf8"): with open_local(["sanic", "__version__.py"], encoding="latin1") as fp: try: - version = re.findall(r"^__version__ = \"([^']+)\"\r?$", fp.read(), re.M)[0] + version = re.findall( + r"^__version__ = \"([^']+)\"\r?$", fp.read(), re.M + )[0] except IndexError: raise RuntimeError("Unable to determine version.") @@ -68,9 +72,11 @@ setup_kwargs = { ], } -env_dependency = '; sys_platform != "win32" ' 'and implementation_name == "cpython"' +env_dependency = ( + '; sys_platform != "win32" ' 'and implementation_name == "cpython"' +) ujson = "ujson>=1.35" + env_dependency -uvloop = "uvloop>=0.5.3" + env_dependency +uvloop = "uvloop>=0.5.3,<0.15.0" + env_dependency requirements = [ "httptools>=0.0.10",