Skip to content

Commit

Permalink
Version 0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan committed Mar 19, 2021
1 parent 18574b8 commit c6a4b35
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
18 changes: 11 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
## 0.10.1 (Future release)
## 0.11.0

* Added CONTRIBUTING.md to outline contribution guidelines.
* Remove deprecated `enable_lifespan` parameter [#109](https://github.com/jordaneremieff/mangum/issues/109).

* Remove deprecated `enable_lifespan` parameter [109](https://github.com/jordaneremieff/mangum/issues/109)
* Include API Gateway v2 event cookies in scope headers [#153](https://github.com/jordaneremieff/mangum/pull/153). Thanks [araki-yzrh](https://github.com/araki-yzrh)!

* Support ELB and fix APIGW v2 cookies response [#155](https://github.com/jordaneremieff/mangum/pull/155). Thanks [araki-yzrh](https://github.com/araki-yzrh)!

* Add flake8 to CI checks [#157](https://github.com/jordaneremieff/mangum/pull/157). Thanks [emcpow2](https://github.com/emcpow2)!

* Add type hints for lambda handler context parameter [#158](https://github.com/jordaneremieff/mangum/pull/158). Thanks [emcpow2](https://github.com/emcpow2)!

* Extract ASGI scope creation into function [#162](https://github.com/jordaneremieff/mangum/pull/162). Thanks [emcpow2](https://github.com/emcpow2)!

## 0.10.0

Expand All @@ -24,14 +32,10 @@

## 0.9.1

* Improve documentation, include CHANGELOG in repo, and include release notes in documentation [#111](https://github.com/jordaneremieff/mangum/pull/111)

* Bugfix lifespan startup behaviour and refactor lifespan cycle, deprecate `enable_lifespan` parameter, document protocols. [#108](https://github.com/jordaneremieff/mangum/pull/108)

## 0.9.0

* Improve documentation [#48](https://github.com/jordaneremieff/mangum/issues/48)

* Resolve issue with `rawQueryString` in HTTP APIs using wrong type [#105](https://github.com/jordaneremieff/mangum/issues/105)

* Implement new WebSocket storage backends for managing connections (PostgreSQL, Redis, DyanmoDB, S3, SQlite) using a single `dsn` configuration parameter [#103](https://github.com/jordaneremieff/mangum/pull/103)
Expand Down
18 changes: 11 additions & 7 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
## 0.10.1 (Future release)
## 0.11.0

* Added CONTRIBUTING.md to outline contribution guidelines.
* Remove deprecated `enable_lifespan` parameter [#109](https://github.com/jordaneremieff/mangum/issues/109).

* Remove deprecated `enable_lifespan` parameter [109](https://github.com/jordaneremieff/mangum/issues/109)
* Include API Gateway v2 event cookies in scope headers [#153](https://github.com/jordaneremieff/mangum/pull/153). Thanks [araki-yzrh](https://github.com/araki-yzrh)!

* Support ELB and fix APIGW v2 cookies response [#155](https://github.com/jordaneremieff/mangum/pull/155). Thanks [araki-yzrh](https://github.com/araki-yzrh)!

* Add flake8 to CI checks [#157](https://github.com/jordaneremieff/mangum/pull/157). Thanks [emcpow2](https://github.com/emcpow2)!

* Add type hints for lambda handler context parameter [#158](https://github.com/jordaneremieff/mangum/pull/158). Thanks [emcpow2](https://github.com/emcpow2)!

* Extract ASGI scope creation into function [#162](https://github.com/jordaneremieff/mangum/pull/162). Thanks [emcpow2](https://github.com/emcpow2)!

## 0.10.0

Expand All @@ -24,14 +32,10 @@

## 0.9.1

* Improve documentation, include CHANGELOG in repo, and include release notes in documentation [#111](https://github.com/jordaneremieff/mangum/pull/111)

* Bugfix lifespan startup behaviour and refactor lifespan cycle, deprecate `enable_lifespan` parameter, document protocols. [#108](https://github.com/jordaneremieff/mangum/pull/108)

## 0.9.0

* Improve documentation [#48](https://github.com/jordaneremieff/mangum/issues/48)

* Resolve issue with `rawQueryString` in HTTP APIs using wrong type [#105](https://github.com/jordaneremieff/mangum/issues/105)

* Implement new WebSocket storage backends for managing connections (PostgreSQL, Redis, DyanmoDB, S3, SQlite) using a single `dsn` configuration parameter [#103](https://github.com/jordaneremieff/mangum/pull/103)
Expand Down
7 changes: 4 additions & 3 deletions mangum/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,15 @@ def __call__(self, event: dict, context: "LambdaContext") -> dict:
elif not isinstance(initial_body, bytes):
initial_body = initial_body.encode()

scope = self._create_scope(event, context)
scope = self.create_scope(event, context)
http_cycle = HTTPCycle(scope, text_mime_types=self.text_mime_types)
response = http_cycle(self.app, initial_body)

return response

def _create_scope(self, event: dict, context: "LambdaContext") -> Scope:
"""Creates a scope object according to ASGI specification from a Lambda Event.
def create_scope(self, event: dict, context: "LambdaContext") -> Scope:
"""
Creates a scope object according to ASGI specification from a Lambda Event.
https://asgi.readthedocs.io/en/latest/specs/www.html#http-connection-scope
Expand Down
2 changes: 1 addition & 1 deletion mangum/protocols/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ async def send(self, message: Message) -> None:
self.response["headers"] = headers
if multi_value_headers:
self.response["multiValueHeaders"] = multi_value_headers
if len(cookies):
if cookies:
self.response["cookies"] = cookies
self.state = HTTPCycleState.RESPONSE

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def get_long_description():

setup(
name="mangum",
version="0.10.0",
version="0.11.0",
packages=find_packages(),
license="MIT",
url="https://github.com/jordaneremieff/mangum",
Expand Down

0 comments on commit c6a4b35

Please sign in to comment.