Skip to content

Commit b894197

Browse files
committed
fix(python): bump to 3.12
1 parent 2a35757 commit b894197

File tree

16 files changed

+219
-284
lines changed

16 files changed

+219
-284
lines changed

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414

15-
- name: Set up Python 3.11
15+
- name: Set up Python 3.12
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: 3.11
18+
python-version: 3.12
1919

2020
- name: Install dependencies
2121
run: |

.github/workflows/tox.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python: [3.11]
13+
python: [3.12]
1414
steps:
1515
- uses: actions/checkout@v4
1616
- name: Setup Python

lib/database/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {
2-
Stack,
3-
aws_rds as rds,
4-
aws_ec2 as ec2,
5-
aws_secretsmanager as secretsmanager,
6-
aws_lambda,
72
CustomResource,
8-
RemovalPolicy,
93
Duration,
4+
RemovalPolicy,
5+
Stack,
6+
aws_lambda,
107
aws_logs,
8+
aws_ec2 as ec2,
9+
aws_rds as rds,
10+
aws_secretsmanager as secretsmanager,
1111
} from "aws-cdk-lib";
1212
import { Construct } from "constructs";
1313
import { CustomLambdaFunctionProps, DEFAULT_PGSTAC_VERSION } from "../utils";
@@ -82,7 +82,7 @@ export class PgStacDatabase extends Construct {
8282
code: aws_lambda.Code.fromDockerBuild(__dirname, {
8383
file: "bootstrapper_runtime/Dockerfile",
8484
buildArgs: {
85-
PYTHON_VERSION: "3.11",
85+
PYTHON_VERSION: "3.12",
8686
PGSTAC_VERSION: this.pgstacVersion,
8787
},
8888
}),

lib/ingestor-api/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import {
22
aws_apigateway as apigateway,
3+
aws_logs,
4+
Duration,
35
aws_dynamodb as dynamodb,
46
aws_ec2 as ec2,
7+
aws_lambda_event_sources as events,
58
aws_iam as iam,
69
aws_lambda as lambda,
7-
aws_logs,
8-
aws_lambda_event_sources as events,
10+
RemovalPolicy,
911
aws_secretsmanager as secretsmanager,
1012
aws_ssm as ssm,
11-
Duration,
12-
RemovalPolicy,
1313
Stack,
1414
} from "aws-cdk-lib";
1515
import { Construct } from "constructs";
@@ -126,7 +126,7 @@ export class StacIngestor extends Construct {
126126
code: lambda.Code.fromDockerBuild(__dirname, {
127127
file: "runtime/Dockerfile",
128128
buildArgs: {
129-
PYTHON_VERSION: "3.11",
129+
PYTHON_VERSION: "3.12",
130130
PGSTAC_VERSION: props.pgstacVersion || DEFAULT_PGSTAC_VERSION,
131131
},
132132
}),
@@ -177,7 +177,7 @@ export class StacIngestor extends Construct {
177177
code: lambda.Code.fromDockerBuild(__dirname, {
178178
file: "runtime/Dockerfile",
179179
buildArgs: {
180-
PYTHON_VERSION: "3.11",
180+
PYTHON_VERSION: "3.12",
181181
PGSTAC_VERSION: props.pgstacVersion || DEFAULT_PGSTAC_VERSION,
182182
},
183183
}),

lib/ingestor-api/runtime/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM --platform=linux/amd64 public.ecr.aws/lambda/python:${PYTHON_VERSION}
44

55
WORKDIR /tmp
66

7-
RUN yum install -y git
7+
RUN dnf install -y git
88

99
RUN python -m pip install pip -U
1010

lib/stac-api/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import {
22
aws_apigatewayv2 as apigatewayv2,
3+
aws_logs,
4+
CfnOutput,
5+
Duration,
36
aws_ec2 as ec2,
4-
aws_rds as rds,
57
aws_lambda as lambda,
8+
aws_rds as rds,
69
aws_secretsmanager as secretsmanager,
7-
Duration,
8-
aws_logs,
9-
CfnOutput,
1010
Stack,
1111
} from "aws-cdk-lib";
1212
import { Construct } from "constructs";
13-
import { CustomLambdaFunctionProps } from "../utils";
14-
import { LambdaApiGateway } from "../lambda-api-gateway";
1513
import * as path from "path";
14+
import { LambdaApiGateway } from "../lambda-api-gateway";
15+
import { CustomLambdaFunctionProps } from "../utils";
1616

1717
export const EXTENSIONS = {
1818
QUERY: "query",
@@ -78,7 +78,7 @@ export class PgStacApiLambdaRuntime extends Construct {
7878
timeout: Duration.seconds(30),
7979
code: lambda.Code.fromDockerBuild(path.join(__dirname, ".."), {
8080
file: "stac-api/runtime/Dockerfile",
81-
buildArgs: { PYTHON_VERSION: "3.11" },
81+
buildArgs: { PYTHON_VERSION: "3.12" },
8282
}),
8383
vpc: props.vpc,
8484
vpcSubnets: props.subnetSelection,

lib/stac-loader/runtime/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PYTHON_VERSION=3.11
1+
ARG PYTHON_VERSION=3.12
22
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION}
33
COPY --from=ghcr.io/astral-sh/uv:0.7.8 /uv /uvx /bin/
44

lib/stac-loader/runtime/pyproject.toml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
name = "stac-loader"
33
version = "0.1.0"
44
description = "An application for loading STAC collections and items into a pgstac database"
5-
authors = [
6-
{ name = "hrodmn", email = "henry@developmentseed.org" }
7-
]
8-
requires-python = ">=3.11"
9-
dependencies = [
10-
"boto3",
11-
"pypgstac[psycopg]",
12-
"stac-pydantic>=3.2.0",
13-
]
5+
authors = [{ name = "hrodmn", email = "henry@developmentseed.org" }]
6+
requires-python = ">=3.12"
7+
dependencies = ["boto3", "pypgstac[psycopg]", "stac-pydantic>=3.2.0"]
148

159
[build-system]
1610
requires = ["hatchling"]

lib/stactools-item-generator/runtime/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PYTHON_VERSION=3.11
1+
ARG PYTHON_VERSION=3.12
22
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION}
33
COPY --from=ghcr.io/astral-sh/uv:0.7.8 /uv /uvx /bin/
44

@@ -13,7 +13,7 @@ WORKDIR ${LAMBDA_TASK_ROOT}
1313
COPY stactools-item-generator/runtime/pyproject.toml pyproject.toml
1414
COPY stactools-item-generator/runtime/src/stactools_item_generator/ ${LAMBDA_TASK_ROOT}/stactools_item_generator/
1515

16-
RUN yum install -y git && yum clean all && rm -rf /var/cache/yum && \
16+
RUN dnf install -y git && dnf clean all && rm -rf /var/cache/dnf && \
1717
uv export --no-dev --no-editable -o requirements.txt && \
1818
uv pip install --target ${LAMBDA_TASK_ROOT} -r requirements.txt && \
1919
uv tool install --with "numpy<2.3.0",requests stactools;

lib/stactools-item-generator/runtime/pyproject.toml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
name = "stactools-item-generator"
33
version = "0.1.0"
44
description = "An application for generating STAC metadata with any stactools package"
5-
authors = [
6-
{ name = "hrodmn", email = "henry@developmentseed.org" }
7-
]
8-
requires-python = ">=3.11"
9-
dependencies = [
10-
"pydantic>=2.11.0",
11-
"stac-pydantic>=3.2.0",
12-
]
5+
authors = [{ name = "hrodmn", email = "henry@developmentseed.org" }]
6+
requires-python = ">=3.12"
7+
dependencies = ["pydantic>=2.11.0", "stac-pydantic>=3.2.0"]
138

149
[build-system]
1510
requires = ["hatchling"]

0 commit comments

Comments
 (0)