Skip to content

Commit 477e033

Browse files
Jordanfour43
authored andcommitted
Version 0.11.0
1 parent ba62cfd commit 477e033

File tree

5 files changed

+28
-19
lines changed

5 files changed

+28
-19
lines changed

CHANGELOG.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
## 0.10.1 (Future release)
1+
## 0.11.0
22

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

5-
* Remove deprecated `enable_lifespan` parameter [109](https://github.com/jordaneremieff/mangum/issues/109)
5+
* 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)!
6+
7+
* Support ELB and fix APIGW v2 cookies response [#155](https://github.com/jordaneremieff/mangum/pull/155). Thanks [araki-yzrh](https://github.com/araki-yzrh)!
8+
9+
* Add flake8 to CI checks [#157](https://github.com/jordaneremieff/mangum/pull/157). Thanks [emcpow2](https://github.com/emcpow2)!
10+
11+
* Add type hints for lambda handler context parameter [#158](https://github.com/jordaneremieff/mangum/pull/158). Thanks [emcpow2](https://github.com/emcpow2)!
12+
13+
* Extract ASGI scope creation into function [#162](https://github.com/jordaneremieff/mangum/pull/162). Thanks [emcpow2](https://github.com/emcpow2)!
614

715
## 0.10.0
816

@@ -24,14 +32,10 @@
2432

2533
## 0.9.1
2634

27-
* Improve documentation, include CHANGELOG in repo, and include release notes in documentation [#111](https://github.com/jordaneremieff/mangum/pull/111)
28-
2935
* Bugfix lifespan startup behaviour and refactor lifespan cycle, deprecate `enable_lifespan` parameter, document protocols. [#108](https://github.com/jordaneremieff/mangum/pull/108)
3036

3137
## 0.9.0
3238

33-
* Improve documentation [#48](https://github.com/jordaneremieff/mangum/issues/48)
34-
3539
* Resolve issue with `rawQueryString` in HTTP APIs using wrong type [#105](https://github.com/jordaneremieff/mangum/issues/105)
3640

3741
* 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)

docs/release-notes.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
## 0.10.1 (Future release)
1+
## 0.11.0
22

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

5-
* Remove deprecated `enable_lifespan` parameter [109](https://github.com/jordaneremieff/mangum/issues/109)
5+
* 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)!
6+
7+
* Support ELB and fix APIGW v2 cookies response [#155](https://github.com/jordaneremieff/mangum/pull/155). Thanks [araki-yzrh](https://github.com/araki-yzrh)!
8+
9+
* Add flake8 to CI checks [#157](https://github.com/jordaneremieff/mangum/pull/157). Thanks [emcpow2](https://github.com/emcpow2)!
10+
11+
* Add type hints for lambda handler context parameter [#158](https://github.com/jordaneremieff/mangum/pull/158). Thanks [emcpow2](https://github.com/emcpow2)!
12+
13+
* Extract ASGI scope creation into function [#162](https://github.com/jordaneremieff/mangum/pull/162). Thanks [emcpow2](https://github.com/emcpow2)!
614

715
## 0.10.0
816

@@ -24,14 +32,10 @@
2432

2533
## 0.9.1
2634

27-
* Improve documentation, include CHANGELOG in repo, and include release notes in documentation [#111](https://github.com/jordaneremieff/mangum/pull/111)
28-
2935
* Bugfix lifespan startup behaviour and refactor lifespan cycle, deprecate `enable_lifespan` parameter, document protocols. [#108](https://github.com/jordaneremieff/mangum/pull/108)
3036

3137
## 0.9.0
3238

33-
* Improve documentation [#48](https://github.com/jordaneremieff/mangum/issues/48)
34-
3539
* Resolve issue with `rawQueryString` in HTTP APIs using wrong type [#105](https://github.com/jordaneremieff/mangum/issues/105)
3640

3741
* 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)

mangum/adapter.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,15 @@ def __call__(self, event: dict, context: "LambdaContext") -> dict:
9898
elif not isinstance(initial_body, bytes):
9999
initial_body = initial_body.encode()
100100

101-
scope = self._create_scope(event, context)
101+
scope = self.create_scope(event, context)
102102
http_cycle = HTTPCycle(scope, text_mime_types=self.text_mime_types)
103103
response = http_cycle(self.app, initial_body)
104104

105105
return response
106106

107-
def _create_scope(self, event: dict, context: "LambdaContext") -> Scope:
108-
"""Creates a scope object according to ASGI specification from a Lambda Event.
107+
def create_scope(self, event: dict, context: "LambdaContext") -> Scope:
108+
"""
109+
Creates a scope object according to ASGI specification from a Lambda Event.
109110
110111
https://asgi.readthedocs.io/en/latest/specs/www.html#http-connection-scope
111112

mangum/protocols/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ async def send(self, message: Message) -> None:
174174
self.response["headers"] = headers
175175
if multi_value_headers:
176176
self.response["multiValueHeaders"] = multi_value_headers
177-
if len(cookies):
177+
if cookies:
178178
self.response["cookies"] = cookies
179179
self.state = HTTPCycleState.RESPONSE
180180

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def get_long_description():
77

88
setup(
99
name="mangum",
10-
version="0.10.0",
10+
version="0.11.0",
1111
packages=find_packages(),
1212
license="MIT",
1313
url="https://github.com/jordaneremieff/mangum",

0 commit comments

Comments
 (0)