From 4b3962260f7f8459417212fd9532ee501d5f7249 Mon Sep 17 00:00:00 2001 From: Ilya Nekhay Date: Wed, 20 Nov 2024 07:04:56 -0600 Subject: [PATCH 1/3] change api_version validator to support all values of api-version matching "1.[0-9]+" --- src/lambda_function/function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lambda_function/function.py b/src/lambda_function/function.py index e24228b..7c47d55 100644 --- a/src/lambda_function/function.py +++ b/src/lambda_function/function.py @@ -139,7 +139,7 @@ class PyPIMeta(BaseModel, json_dumps=orjson_dumps, json_loads=orjson.loads): @validator("api_version") def api_version_validator(cls, value: str) -> str: - if value != "1.0": + if not re.match(r"1\.[0-9]+", value): raise ValueError(f"Received an unknown 'api-version': {value}") return value From 2e3f3148cbc4bee486cd18fcd402174621bb44e9 Mon Sep 17 00:00:00 2001 From: Ilya Nekhay Date: Wed, 20 Nov 2024 10:21:18 -0600 Subject: [PATCH 2/3] build: downgrade pydantic to <2 --- requirements.dev.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.dev.txt b/requirements.dev.txt index abce08e..d836acb 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -8,7 +8,7 @@ fastapi mangum orjson passlib -pydantic +pydantic<2 python-multipart requests uvicorn diff --git a/setup.py b/setup.py index 47fd4e4..45398b9 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ "mangum", "orjson", "passlib", - "pydantic", + "pydantic<2", "python-multipart", "requests", ] From 6a61ec1aab2ef0672fe0e0ca1c2ac82d22682d69 Mon Sep 17 00:00:00 2001 From: Ilya Nekhay Date: Wed, 20 Nov 2024 10:33:20 -0600 Subject: [PATCH 3/3] build: downgrade fastapi to <0.89.0 --- requirements.dev.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.dev.txt b/requirements.dev.txt index d836acb..c3af712 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -4,7 +4,7 @@ beautifulsoup4 black boto3 boto3-stubs[lambda,s3] -fastapi +fastapi<0.89.0 mangum orjson passlib diff --git a/setup.py b/setup.py index 45398b9..fa73861 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ "aws-error-utils", "backoff", "beautifulsoup4", - "fastapi", + "fastapi<0.89.0", "mangum", "orjson", "passlib",