Skip to content

Commit

Permalink
Default to Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
kjagiello committed May 1, 2024
1 parent 0a37bbb commit 155abce
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@ jobs:
lint-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install dependencies
run: pip install --pre flake8==4.0.1 black==22.3.0
run: pip install ruff

- uses: actions/checkout@v4
- run: flake8
- run: black --check .
- run: ruff check .
- run: ruff format --check .

test-python:
runs-on: ubuntu-latest
Expand All @@ -71,13 +72,13 @@ jobs:
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

# Keep boto version in sync with what is installed inside of the Python
# 3.8 lambda. See the link below for reference.
# 3.12 lambda. See the link below for reference.
# https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
- name: Install dependencies
run: pip install boto3==1.20.32 botocore==1.23.32
run: pip install boto3==1.34.95

- uses: actions/checkout@v4
- run: python -m tests
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module "codepipeline_notifications" {
| <a name="input_label_key_case"></a> [label\_key\_case](#input\_label\_key\_case) | The letter case of label keys (`tag` names) (i.e. `name`, `namespace`, `environment`, `stage`, `attributes`) to use in `tags`.<br>Possible values: `lower`, `title`, `upper`.<br>Default value: `title`. | `string` | `null` | no |
| <a name="input_label_order"></a> [label\_order](#input\_label\_order) | The naming order of the id output and Name tag.<br>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br>You can omit any of the 5 elements, but at least one must be present. | `list(string)` | `null` | no |
| <a name="input_label_value_case"></a> [label\_value\_case](#input\_label\_value\_case) | The letter case of output label values (also used in `tags` and `id`).<br>Possible values: `lower`, `title`, `upper` and `none` (no transformation).<br>Default value: `lower`. | `string` | `null` | no |
| <a name="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime) | The runtime to use for the lambda function | `string` | `"python3.8"` | no |
| <a name="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime) | The runtime to use for the lambda function | `string` | `"python3.12"` | no |
| <a name="input_name"></a> [name](#input\_name) | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |
| <a name="input_pipeline_event_type_ids"></a> [pipeline\_event\_type\_ids](#input\_pipeline\_event\_type\_ids) | The list of pipeline events to trigger a notification on | `list(string)` | <pre>[<br> "started",<br> "failed",<br> "canceled",<br> "resumed",<br> "succeeded",<br> "superseded"<br>]</pre> | no |
Expand Down
5 changes: 2 additions & 3 deletions lambdas/notifier/notifier.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json
import logging
import os
import typing as t
import urllib
import urllib.request

Expand Down Expand Up @@ -39,8 +38,8 @@ def format_slack_attachment(
environment: str,
region: str,
action: str,
revision_summary: t.Optional[str],
revision_url: t.Optional[str],
revision_summary: str | None,
revision_url: str | None,
) -> dict:
execution_link = (
f"<https://{region}.console.aws.amazon.com/codesuite/codepipeline/"
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ variable "approval_event_type_ids" {
variable "lambda_runtime" {
type = string
description = "The runtime to use for the lambda function"
default = "python3.8"
default = "python3.12"
}

0 comments on commit 155abce

Please sign in to comment.