Skip to content

Commit d05d197

Browse files
committed
chore: bump version and reorder changelog
1 parent 8081e45 commit d05d197

File tree

3 files changed

+28
-21
lines changed

3 files changed

+28
-21
lines changed

CHANGELOG.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,38 @@ All notable changes to this project will be documented in this file.
55
<!-- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -->
77

8-
## [0.1.0] - 2023-03-02
8+
## [0.2.2] - 2024-11-27
99

10-
### Added
10+
### Fixed
1111

12-
- Initial project setup
13-
- Local testing utils
14-
- Repository setup
12+
- Fix Internal Server Error when body contained non-ASCII characters [#73](https://github.com/scaleway/serverless-functions-python/issues/73)
1513

16-
## [0.1.1] - 2023-04-14
14+
## [0.2.1] - 2024-07-15
1715

1816
### Fixed
1917

20-
- Fix typos in headers injected by Envoy
21-
22-
### Changed
23-
24-
- Update README with link to Serverless Functions Node
18+
- Returning a base64 encoded response would not be decoded by the framework
2519

2620
## [0.2.0] - 2023-04-23
2721

2822
### Added
2923

3024
- Added a simple server to test with multiple handlers
3125

32-
## [0.2.1] - 2024-07-15
26+
## [0.1.1] - 2023-04-14
27+
28+
### Changed
29+
30+
- Update README with link to Serverless Functions Node
3331

3432
### Fixed
3533

36-
- Returning a base64 encoded response would not be decoded by the framework
34+
- Fix typos in headers injected by Envoy
35+
36+
## [0.1.0] - 2023-03-02
37+
38+
### Added
39+
40+
- Initial project setup
41+
- Local testing utils
42+
- Repository setup

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "scaleway-functions-python"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
description = "Utilities for testing your Python handlers for Scaleway Serverless Functions."
55
authors = ["Scaleway Serverless Team <[email protected]>"]
66

tests/test_local/test_event.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,22 @@ def test_format_http_event(app):
4444
assert event["pathParameters"] is None
4545
assert not event["stageVariable"]
4646

47-
assert event["isBase64Encoded"] is True
47+
assert event.get("isBase64Encoded")
4848

4949
assert event["requestContext"] == expected_request_context
5050

5151
assert event["body"] == ""
5252

53+
5354
def test_format_http_event_with_non_unicode_body():
5455
# Create a request with non-unicode body
55-
non_unicode_body = b'\xff\xfe\xfd' # Invalid UTF-8 sequence
56-
builder = EnvironBuilder(method='POST', data=non_unicode_body)
57-
r = Request(builder.get_environ())
56+
non_unicode_body = b"\xff\xfe\xfd" # Invalid UTF-8 sequence
57+
builder = EnvironBuilder(method="POST", data=non_unicode_body)
58+
req = Request(builder.get_environ())
5859

5960
# Call the function and check the result
60-
event = format_http_event(r)
61+
event = format_http_event(req)
6162

6263
assert event is not None
63-
assert 'body' in event
64-
assert event.get('isBase64Encoded', False) is False
64+
assert "body" in event
65+
assert event.get("isBase64Encoded", False) is False

0 commit comments

Comments
 (0)