Skip to content

fix: remove decorator nesting #90

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

Merged
merged 2 commits into from
May 5, 2023
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Feature

- Add support for self hosted serverless gateway

## [1.0.2] - 2023-05-05

### Fixed

- Fixed decorator nesting that breaks compatibility with local testing framework
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "scw-serverless"
version = "1.0.1"
version = "1.0.2"
description = "Framework for writing serverless APIs in Python, using Scaleway functions and containers."
authors = ["Scaleway Serverless Team <opensource@scaleway.com>"]
readme = "README.md"
Expand Down
5 changes: 1 addition & 4 deletions scw_serverless/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ def _decorator(handler: Callable):
)
)

def _inner(*args, **kwargs):
return handler(*args, **kwargs)

return _inner
return handler

return _decorator

Expand Down
2 changes: 1 addition & 1 deletion scw_serverless/dependencies_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _check_for_scw_serverless(self):
or not self.pkg_path.joinpath(__package__).exists()
):
# Installs the current version with pip
self._run_pip_install(f"{__package__}=={version(__package__)}")
self._run_pip_install(f"{__package__}~={version(__package__)}")

def _run_pip_install(self, *args: str):
python_path = sys.executable
Expand Down