Skip to content

Commit

Permalink
Merge branch '19.12LTS' of github.com:huge-success/sanic into 19.12LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
ahopkins committed Oct 25, 2020
2 parents eb3d0a3 + c5070bd commit df4970a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sanic/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "19.12.2"
__version__ = "19.12.3"
7 changes: 7 additions & 0 deletions sanic/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@


class BaseHTTPResponse:
def __init__(self):
self.asgi = False

def _encode_body(self, data):
try:
# Try to encode it regularly
Expand Down Expand Up @@ -59,6 +62,8 @@ def __init__(
content_type="text/plain",
chunked=True,
):
super().__init__()

self.content_type = content_type
self.streaming_fn = streaming_fn
self.status = status
Expand Down Expand Up @@ -146,6 +151,8 @@ def __init__(
content_type=None,
body_bytes=b"",
):
super().__init__()

self.content_type = content_type

if body is not None:
Expand Down
13 changes: 4 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import os
import re
import sys

from distutils.util import strtobool

from setuptools import setup
Expand Down Expand Up @@ -39,9 +38,7 @@ 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.")

Expand Down Expand Up @@ -71,9 +68,7 @@ def open_local(paths, mode="r", encoding="utf8"):
],
}

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

Expand All @@ -83,13 +78,13 @@ def open_local(paths, mode="r", encoding="utf8"):
ujson,
"aiofiles>=0.3.0",
"websockets>=7.0,<9.0",
"multidict>=4.0,<5.0",
"multidict==5.0.0",
"httpx==0.9.3",
]

tests_require = [
"pytest==5.2.1",
"multidict>=4.0,<5.0",
"multidict==5.0.0",
"gunicorn",
"pytest-cov",
"httpcore==0.3.0",
Expand Down

0 comments on commit df4970a

Please sign in to comment.