From be10fe54a8d1332f46a131620362a3842d6dc337 Mon Sep 17 00:00:00 2001 From: Matt McFarland Date: Mon, 24 Oct 2022 10:29:50 -0400 Subject: [PATCH] Temporarily use fork for starlette 0.21 release The 0.21 release resolves a frequent error on our fastapi version. See: https://github.com/encode/starlette/pull/1710 https://github.com/encode/starlette/pull/1715 --- pccommon/setup.py | 7 ++++++- pcfuncs/Dockerfile | 3 +++ pctiler/Dockerfile | 3 +++ requirements-dev.txt | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pccommon/setup.py b/pccommon/setup.py index cb95fc2b..86e88a39 100644 --- a/pccommon/setup.py +++ b/pccommon/setup.py @@ -4,7 +4,12 @@ # Runtime requirements. inst_reqs = [ - "fastapi>=0.75.2", + # ---> + # TODO: restore fastapi release install after starlette dep upgraded to >= 0.21.0 + # "fastapi>=0.75.2", + "fastapi @ git+https://github.com/mmcfarland/fastapi/@982e7caf086bffeace8554da6d69e5f3082f14a3#egg=fastapi", + "starlette>=0.21.0,<0.22.0", + # <--- "opencensus-ext-azure==1.0.8", "opencensus-ext-logging==0.1.0", "orjson==3.5.2", diff --git a/pcfuncs/Dockerfile b/pcfuncs/Dockerfile index 37d1e619..9ffc6bc0 100644 --- a/pcfuncs/Dockerfile +++ b/pcfuncs/Dockerfile @@ -1,5 +1,8 @@ FROM mcr.microsoft.com/azure-functions/python:4-python3.8 +# git required for pip installs from git +RUN apt update && apt install -y git + ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ AzureFunctionsJobHost__Logging__Console__IsEnabled=true diff --git a/pctiler/Dockerfile b/pctiler/Dockerfile index e2e4bc01..e418eb8a 100644 --- a/pctiler/Dockerfile +++ b/pctiler/Dockerfile @@ -1,5 +1,8 @@ FROM python:3.9-slim +# git required for pip installs from git +RUN apt update && apt install -y git + # The devops Personal Access Token for accessing # Azure Artifacts. Note: This will be visible as # plain text in the docker build logs. Only use your diff --git a/requirements-dev.txt b/requirements-dev.txt index 475c0c79..dc30db33 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,8 +6,8 @@ openapi-spec-validator==0.3.0 cachetools<=4.2. pytest==7.* pytest-asyncio==0.18.* -httpx==0.19.0 +httpx>=0.22.0 # Mypy types -types-cachetools \ No newline at end of file +types-cachetools