Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump version and reorder changelog #106

Merged
merged 6 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
test:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

runs-on: ubuntu-22.04
steps:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ci:
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.10
python: python3.12
cyclimse marked this conversation as resolved.
Show resolved Hide resolved
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
Expand Down
34 changes: 22 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,42 @@ All notable changes to this project will be documented in this file.
<!-- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -->

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

### Added
### Fixed

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

## [0.1.1] - 2023-04-14
### Changed

### Fixed
- Removed support for Python 3.8 as it has reached its end of life

- Fix typos in headers injected by Envoy
## [0.2.1] - 2024-07-15

### Changed
### Fixed

- Update README with link to Serverless Functions Node
- Returning a base64 encoded response would not be decoded by the framework

## [0.2.0] - 2023-04-23

### Added

- Added a simple server to test with multiple handlers

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

### Changed

- Update README with link to Serverless Functions Node

### Fixed

- Returning a base64 encoded response would not be decoded by the framework
- Fix typos in headers injected by Envoy

## [0.1.0] - 2023-03-02

### Added

- Initial project setup
- Local testing utils
- Repository setup
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![PyPI version](https://badge.fury.io/py/scaleway-functions-python.svg)](https://badge.fury.io/py/scaleway-functions-python)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/scaleway/serverless-functions-python/main.svg)](https://results.pre-commit.ci/latest/github/scaleway/serverless-functions-python/main)
![pre-commit.ci status](https://img.shields.io/badge/python-3.8_|_3.9_|_3.10_|_3.11-blue.svg)
![pre-commit.ci status](https://img.shields.io/badge/python-3.9_|_3.10_|_3.11-blue.svg)

Scaleway Serverless Functions Python is a framework that simplifies Scaleway [Serverless Functions](https://www.scaleway.com/fr/serverless-functions/) local development.
It enables you to debug your function locally and provide the event data format used in Scaleway Serverless Functions.
Expand Down
626 changes: 326 additions & 300 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "scaleway-functions-python"
version = "0.2.1"
version = "0.2.2"
description = "Utilities for testing your Python handlers for Scaleway Serverless Functions."
authors = ["Scaleway Serverless Team <opensource@scaleway.com>"]

Expand Down Expand Up @@ -31,7 +31,7 @@ classifiers = [
include = ["CHANGELOG.md"]

[tool.poetry.dependencies]
python = ">=3.8.1, <3.13"
python = ">=3.9, <3.13"
flask = ">=2.2.2,<4.0.0"
typing-extensions = { version = "^4.4.0", python = "<3.11" }

Expand All @@ -44,7 +44,7 @@ autoflake = ">=1.7.7,<3.0.0"
black = ">=23.1,<25.0"
flake8 = ">=6,<8"
isort = "^5.10.1"
pre-commit = "^3.0.4"
pre-commit = "4.0.0"
pylint = ">=2.16.2,<4.0.0"
pylint-per-file-ignores = "^1.2.0"

Expand Down
6 changes: 3 additions & 3 deletions tests/test_local/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_format_http_event(app):
assert event["pathParameters"] is None
assert not event["stageVariable"]

assert event["isBase64Encoded"] is True
assert event.get("isBase64Encoded")
cyclimse marked this conversation as resolved.
Show resolved Hide resolved

assert event["requestContext"] == expected_request_context

Expand All @@ -55,10 +55,10 @@ def test_format_http_event_with_non_unicode_body():
# Create a request with non-unicode body
non_unicode_body = b"\xff\xfe\xfd" # Invalid UTF-8 sequence
builder = EnvironBuilder(method="POST", data=non_unicode_body)
r = Request(builder.get_environ())
req = Request(builder.get_environ())

# Call the function and check the result
event = format_http_event(r)
event = format_http_event(req)

assert event is not None
assert "body" in event
Expand Down