Skip to content

Commit

Permalink
prepare beta release
Browse files Browse the repository at this point in the history
  • Loading branch information
nggit committed Oct 13, 2023
1 parent 2cc8ef8 commit a1f98fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
```

## Installing
Tremolo is still in the early stages of development. But you can try installing it if you like.

```
python3 -m pip install --upgrade tremolo
```
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

setup(
name='tremolo',
packages=['tremolo'],
package_data={'': ['lib/*', 'lib/h1parser/*']},
version='0.0.118',
license='MIT',
author='nggit',
Expand All @@ -25,6 +23,8 @@
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/nggit/tremolo',
packages=['tremolo'],
package_data={'': ['lib/*', 'lib/h1parser/*']},
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
Expand Down
11 changes: 7 additions & 4 deletions tremolo/http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ async def _handle_response(self, func, options={}):
self.request.upgraded = True
else:
if not self.response.http_chunked:
# no chunk, no close, no size.
# Assume close to signal end
self.request.http_keepalive = False

if not no_content:
Expand All @@ -201,13 +203,14 @@ async def _handle_response(self, func, options={}):
await self.response.write(None)
return

if options.get('stream', True):
buffer_min_size = None
else:
buffer_min_size = options['buffer_size'] // 2
buffer_min_size = options['buffer_size'] // 2

self.set_watermarks(high=options['buffer_size'] * 4,
low=buffer_min_size)

if options.get('stream', True):
buffer_min_size = None

await self.response.write(data,
rate=options['rate'],
buffer_size=options['buffer_size'],
Expand Down

0 comments on commit a1f98fb

Please sign in to comment.