Skip to content

Commit

Permalink
Merge branch 'develop' into chore/refactor-e2e
Browse files Browse the repository at this point in the history
* develop:
  chore(deps-dev): bump types-requests from 2.28.7 to 2.28.8 (aws-powertools#1423)
  chore(ci): update changelog with latest changes
  fix(jmespath_util): snappy as dev dep and typing example (aws-powertools#1446)

Signed-off-by: heitorlessa <[email protected]>
  • Loading branch information
heitorlessa committed Aug 12, 2022
2 parents 0ba7678 + 0e20ee0 commit d736e00
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 27 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@

## Bug Fixes

* **ci:** move from pip-tools to poetry on layers reusable workflow
* **ci:** move from pip-tools to poetry on layers to fix conflicts
* **ci:** typo and bust gh actions cache
* **ci:** use poetry to resolve layer deps; pip for CDK
* **ci:** disable poetry venv for layer workflow as cdk ignores venv
* **ci:** add cdk v2 dep for layers workflow
* **ci:** move from pip-tools to poetry on layers reusable workflow
* **ci:** move from pip-tools to poetry on layers
* **ci:** temporarily disable changelog upon release
* **ci:** add explicit origin to fix release detached head
* **jmespath_util:** snappy as dev dep and typing example ([#1446](https://github.com/awslabs/aws-lambda-powertools-python/issues/1446))

## Documentation

Expand All @@ -29,6 +30,7 @@
* **ci:** update changelog with latest changes
* **ci:** update changelog with latest changes
* **ci:** update changelog with latest changes
* **ci:** update changelog with latest changes
* **ci:** reduce payload and only send prod notification
* **ci:** update changelog with latest changes
* **ci:** update changelog with latest changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class LambdaFunctionUrlEvent(APIGatewayProxyEventV2):
Notes:
-----
Lambda Function URL follows the API Gateway HTTP APIs Payload Format Version 2.0.
Keys related to API Gateway features not available in Function URL use a sentinel value (e.g.`routeKey`, `stage`).
Documentation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class PaymentError(Exception):
def handler(event, context) -> dict:
body = json.loads(event["body"])
try:
payment = create_subscription_payment(user=body["user"], product_id=body["product_id"])
return {"payment_id": payment.id, "message": "success", "statusCode": 200}
payment: dict = create_subscription_payment(user=body["user"], product_id=body["product_id"])
return {"payment_id": payment.get("id"), "message": "success", "statusCode": 200}
except requests.HTTPError as e:
raise PaymentError("Unable to create payment subscription") from e

Expand Down
5 changes: 4 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ ignore_missing_imports = True
ignore_missing_imports = True

[mypy-aiohttp]
ignore_missing_imports = True
ignore_missing_imports = True

[mypy-snappy]
ignore_missing_imports = True
100 changes: 79 additions & 21 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ mypy-boto3-lambda = "^1.24.0"
mypy-boto3-xray = "^1.24.0"
mypy-boto3-s3 = { version = "^1.24.0", python = ">=3.7" }
mypy-boto3-cloudformation = { version = "^1.24.0", python = ">=3.7" }
types-requests = "^2.28.7"
types-requests = "^2.28.8"
typing-extensions = { version = "^4.3.0", python = ">=3.7" }
python-snappy = "^0.6.1"

[tool.poetry.extras]
pydantic = ["pydantic", "email-validator"]
Expand Down

0 comments on commit d736e00

Please sign in to comment.