From 44ed0f8554e2938c70946cbc1e54e6ca7f24c6f7 Mon Sep 17 00:00:00 2001 From: aoirint Date: Tue, 17 Oct 2023 14:43:29 +0900 Subject: [PATCH 1/6] Update to FastAPI 0.103.2 --- poetry.lock | 33 ++++++++++++++++----------------- pyproject.toml | 2 +- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/poetry.lock b/poetry.lock index fdc82c69a..e432065d2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -693,24 +693,23 @@ pgp = ["gpg"] [[package]] name = "fastapi" -version = "0.70.1" +version = "0.103.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.7" files = [ - {file = "fastapi-0.70.1-py3-none-any.whl", hash = "sha256:5367226c7bcd7bfb2e17edaf225fd9a983095b1372281e9a3eb661336fb93748"}, - {file = "fastapi-0.70.1.tar.gz", hash = "sha256:21d03979b5336375c66fa5d1f3126c6beca650d5d2166fbb78345a30d33c8d06"}, + {file = "fastapi-0.103.2-py3-none-any.whl", hash = "sha256:3270de872f0fe9ec809d4bd3d4d890c6d5cc7b9611d721d6438f9dacc8c4ef2e"}, + {file = "fastapi-0.103.2.tar.gz", hash = "sha256:75a11f6bfb8fc4d2bec0bd710c2d5f2829659c0e8c0afd5560fdda6ce25ec653"}, ] [package.dependencies] -pydantic = ">=1.6.2,<1.7 || >1.7,<1.7.1 || >1.7.1,<1.7.2 || >1.7.2,<1.7.3 || >1.7.3,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0" -starlette = "0.16.0" +anyio = ">=3.7.1,<4.0.0" +pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" +starlette = ">=0.27.0,<0.28.0" +typing-extensions = ">=4.5.0" [package.extras] -all = ["email_validator (>=1.1.1,<2.0.0)", "itsdangerous (>=1.1.0,<3.0.0)", "jinja2 (>=2.11.2,<4.0.0)", "orjson (>=3.2.1,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "pyyaml (>=5.3.1,<6.0.0)", "requests (>=2.24.0,<3.0.0)", "ujson (>=4.0.1,<5.0.0)", "uvicorn[standard] (>=0.12.0,<0.16.0)"] -dev = ["autoflake (>=1.4.0,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "python-jose[cryptography] (>=3.3.0,<4.0.0)", "uvicorn[standard] (>=0.12.0,<0.16.0)"] -doc = ["mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "mkdocs-material (>=7.1.9,<8.0.0)", "pyyaml (>=5.3.1,<6.0.0)", "typer-cli (>=0.0.12,<0.0.13)"] -test = ["anyio[trio] (>=3.2.1,<4.0.0)", "black (==21.9b0)", "databases[sqlite] (>=0.3.2,<0.6.0)", "email_validator (>=1.1.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "flask (>=1.1.2,<3.0.0)", "httpx (>=0.14.0,<0.19.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.910)", "orjson (>=3.2.1,<4.0.0)", "peewee (>=3.13.3,<4.0.0)", "pytest (>=6.2.4,<7.0.0)", "pytest-cov (>=2.12.0,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "requests (>=2.24.0,<3.0.0)", "sqlalchemy (>=1.3.18,<1.5.0)", "types-dataclasses (==0.1.7)", "types-orjson (==3.6.0)", "types-ujson (==0.1.1)", "ujson (>=4.0.1,<5.0.0)"] +all = ["email-validator (>=2.0.0)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.5)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] [[package]] name = "filelock" @@ -2130,20 +2129,20 @@ test = ["pytest"] [[package]] name = "starlette" -version = "0.16.0" +version = "0.27.0" description = "The little ASGI library that shines." optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "starlette-0.16.0-py3-none-any.whl", hash = "sha256:38eb24bf705a2c317e15868e384c1b8a12ca396e5a3c3a003db7e667c43f939f"}, - {file = "starlette-0.16.0.tar.gz", hash = "sha256:e1904b5d0007aee24bdd3c43994be9b3b729f4f58e740200de1d623f8c3a8870"}, + {file = "starlette-0.27.0-py3-none-any.whl", hash = "sha256:918416370e846586541235ccd38a474c08b80443ed31c578a418e2209b3eef91"}, + {file = "starlette-0.27.0.tar.gz", hash = "sha256:6a6b0d042acb8d469a01eba54e9cda6cbd24ac602c4cd016723117d6a7e73b75"}, ] [package.dependencies] -anyio = ">=3.0.0,<4" +anyio = ">=3.4.0,<5" [package.extras] -full = ["graphene", "itsdangerous", "jinja2", "python-multipart", "pyyaml", "requests"] +full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart", "pyyaml"] [[package]] name = "toml" @@ -2389,4 +2388,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "9149819d9d72c9bf3fa41a1b540ab936bc0e1efb07c420d10db357a0b29235c5" +content-hash = "4b58240c7551b3b231bdc6e89ca93f5419b5dfb4c95954c3332f4dbda821d667" diff --git a/pyproject.toml b/pyproject.toml index 5e35c6371..383a9a0f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ authors = ["Hiroshiba "] [tool.poetry.dependencies] python = "~3.11" numpy = "^1.20.0" -fastapi = "^0.70.0" +fastapi = "^0.103.2" python-multipart = "^0.0.5" uvicorn = "^0.15.0" aiofiles = "^0.7.0" From 37d85ad18476815847aa97abd9d5f6825aba06b5 Mon Sep 17 00:00:00 2001 From: aoirint Date: Tue, 17 Oct 2023 14:44:17 +0900 Subject: [PATCH 2/6] Update requirements.txt --- requirements-dev.txt | 4 ++-- requirements-license.txt | 4 ++-- requirements-test.txt | 4 ++-- requirements.txt | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a8c03aae0..55657f70b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -18,7 +18,7 @@ cryptography==41.0.3 ; python_version >= "3.11" and python_version < "3.12" and cython==0.29.36 ; python_version >= "3.11" and python_version < "3.12" distlib==0.3.7 ; python_version >= "3.11" and python_version < "3.12" dulwich==0.21.5 ; python_version >= "3.11" and python_version < "3.12" -fastapi==0.70.1 ; python_version >= "3.11" and python_version < "3.12" +fastapi==0.103.2 ; python_version >= "3.11" and python_version < "3.12" filelock==3.12.2 ; python_version >= "3.11" and python_version < "3.12" h11==0.14.0 ; python_version >= "3.11" and python_version < "3.12" identify==2.5.27 ; python_version >= "3.11" and python_version < "3.12" @@ -68,7 +68,7 @@ six==1.16.0 ; python_version >= "3.11" and python_version < "3.12" sniffio==1.3.0 ; python_version >= "3.11" and python_version < "3.12" soundfile==0.10.3.post1 ; python_version >= "3.11" and python_version < "3.12" soxr==0.3.6 ; python_version >= "3.11" and python_version < "3.12" -starlette==0.16.0 ; python_version >= "3.11" and python_version < "3.12" +starlette==0.27.0 ; python_version >= "3.11" and python_version < "3.12" tomlkit==0.12.1 ; python_version >= "3.11" and python_version < "3.12" tqdm==4.66.1 ; python_version >= "3.11" and python_version < "3.12" trove-classifiers==2023.8.7 ; python_version >= "3.11" and python_version < "3.12" diff --git a/requirements-license.txt b/requirements-license.txt index cce64d193..b419e87f4 100644 --- a/requirements-license.txt +++ b/requirements-license.txt @@ -7,7 +7,7 @@ charset-normalizer==3.2.0 ; python_version >= "3.11" and python_version < "3.12" click==8.1.7 ; python_version >= "3.11" and python_version < "3.12" colorama==0.4.6 ; python_version >= "3.11" and python_version < "3.12" and platform_system == "Windows" cython==0.29.36 ; python_version >= "3.11" and python_version < "3.12" -fastapi==0.70.1 ; python_version >= "3.11" and python_version < "3.12" +fastapi==0.103.2 ; python_version >= "3.11" and python_version < "3.12" h11==0.14.0 ; python_version >= "3.11" and python_version < "3.12" idna==3.4 ; python_version >= "3.11" and python_version < "3.12" jinja2==3.1.2 ; python_version >= "3.11" and python_version < "3.12" @@ -28,7 +28,7 @@ six==1.16.0 ; python_version >= "3.11" and python_version < "3.12" sniffio==1.3.0 ; python_version >= "3.11" and python_version < "3.12" soundfile==0.10.3.post1 ; python_version >= "3.11" and python_version < "3.12" soxr==0.3.6 ; python_version >= "3.11" and python_version < "3.12" -starlette==0.16.0 ; python_version >= "3.11" and python_version < "3.12" +starlette==0.27.0 ; python_version >= "3.11" and python_version < "3.12" tqdm==4.66.1 ; python_version >= "3.11" and python_version < "3.12" typing-extensions==4.7.1 ; python_version >= "3.11" and python_version < "3.12" urllib3==2.0.4 ; python_version >= "3.11" and python_version < "3.12" diff --git a/requirements-test.txt b/requirements-test.txt index 174d18ad2..7029058db 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -22,7 +22,7 @@ dacite==1.8.1 ; python_version >= "3.11" and python_version < "3.12" distlib==0.3.7 ; python_version >= "3.11" and python_version < "3.12" docopt==0.6.2 ; python_version >= "3.11" and python_version < "3.12" dulwich==0.21.5 ; python_version >= "3.11" and python_version < "3.12" -fastapi==0.70.1 ; python_version >= "3.11" and python_version < "3.12" +fastapi==0.103.2 ; python_version >= "3.11" and python_version < "3.12" filelock==3.12.2 ; python_version >= "3.11" and python_version < "3.12" flake8-bugbear==23.7.10 ; python_version >= "3.11" and python_version < "3.12" flake8==6.1.0 ; python_version >= "3.11" and python_version < "3.12" @@ -81,7 +81,7 @@ smmap==5.0.0 ; python_version >= "3.11" and python_version < "3.12" sniffio==1.3.0 ; python_version >= "3.11" and python_version < "3.12" soundfile==0.10.3.post1 ; python_version >= "3.11" and python_version < "3.12" soxr==0.3.6 ; python_version >= "3.11" and python_version < "3.12" -starlette==0.16.0 ; python_version >= "3.11" and python_version < "3.12" +starlette==0.27.0 ; python_version >= "3.11" and python_version < "3.12" toml==0.10.2 ; python_version >= "3.11" and python_version < "3.12" tomlkit==0.12.1 ; python_version >= "3.11" and python_version < "3.12" tqdm==4.66.1 ; python_version >= "3.11" and python_version < "3.12" diff --git a/requirements.txt b/requirements.txt index 8db49f250..e7e094014 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ charset-normalizer==3.2.0 ; python_version >= "3.11" and python_version < "3.12" click==8.1.7 ; python_version >= "3.11" and python_version < "3.12" colorama==0.4.6 ; python_version >= "3.11" and python_version < "3.12" and platform_system == "Windows" cython==0.29.36 ; python_version >= "3.11" and python_version < "3.12" -fastapi==0.70.1 ; python_version >= "3.11" and python_version < "3.12" +fastapi==0.103.2 ; python_version >= "3.11" and python_version < "3.12" h11==0.14.0 ; python_version >= "3.11" and python_version < "3.12" idna==3.4 ; python_version >= "3.11" and python_version < "3.12" jinja2==3.1.2 ; python_version >= "3.11" and python_version < "3.12" @@ -26,7 +26,7 @@ six==1.16.0 ; python_version >= "3.11" and python_version < "3.12" sniffio==1.3.0 ; python_version >= "3.11" and python_version < "3.12" soundfile==0.10.3.post1 ; python_version >= "3.11" and python_version < "3.12" soxr==0.3.6 ; python_version >= "3.11" and python_version < "3.12" -starlette==0.16.0 ; python_version >= "3.11" and python_version < "3.12" +starlette==0.27.0 ; python_version >= "3.11" and python_version < "3.12" tqdm==4.66.1 ; python_version >= "3.11" and python_version < "3.12" typing-extensions==4.7.1 ; python_version >= "3.11" and python_version < "3.12" urllib3==2.0.4 ; python_version >= "3.11" and python_version < "3.12" From 0b07ff986290daa9d7a2157e85ac983b12bdd4ce Mon Sep 17 00:00:00 2001 From: aoirint Date: Tue, 17 Oct 2023 15:24:48 +0900 Subject: [PATCH 3/6] poetry add --group=test httpx --- poetry.lock | 46 +++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index e432065d2..151a2aa6c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -799,6 +799,50 @@ files = [ {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, ] +[[package]] +name = "httpcore" +version = "0.18.0" +description = "A minimal low-level HTTP client." +optional = false +python-versions = ">=3.8" +files = [ + {file = "httpcore-0.18.0-py3-none-any.whl", hash = "sha256:adc5398ee0a476567bf87467063ee63584a8bce86078bf748e48754f60202ced"}, + {file = "httpcore-0.18.0.tar.gz", hash = "sha256:13b5e5cd1dca1a6636a6aaea212b19f4f85cd88c366a2b82304181b769aab3c9"}, +] + +[package.dependencies] +anyio = ">=3.0,<5.0" +certifi = "*" +h11 = ">=0.13,<0.15" +sniffio = "==1.*" + +[package.extras] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] + +[[package]] +name = "httpx" +version = "0.25.0" +description = "The next generation HTTP client." +optional = false +python-versions = ">=3.8" +files = [ + {file = "httpx-0.25.0-py3-none-any.whl", hash = "sha256:181ea7f8ba3a82578be86ef4171554dd45fec26a02556a744db029a0a27b7100"}, + {file = "httpx-0.25.0.tar.gz", hash = "sha256:47ecda285389cb32bb2691cc6e069e3ab0205956f681c5b2ad2325719751d875"}, +] + +[package.dependencies] +certifi = "*" +httpcore = ">=0.18.0,<0.19.0" +idna = "*" +sniffio = "*" + +[package.extras] +brotli = ["brotli", "brotlicffi"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] + [[package]] name = "identify" version = "2.5.27" @@ -2388,4 +2432,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "4b58240c7551b3b231bdc6e89ca93f5419b5dfb4c95954c3332f4dbda821d667" +content-hash = "e32fef595be23c581cd500fa935f3764b4ccaba576b64d8e9666342eee478508" diff --git a/pyproject.toml b/pyproject.toml index 383a9a0f2..da2b85e7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,7 @@ mypy = "~0.991" pytest = "^6.2.5" coveralls = "^3.2.0" poetry = "^1.3.1" +httpx = "^0.25.0" [tool.poetry.group.license.dependencies] pip-licenses = "^4.2.0" From 939906e90553245419d77cec63dada92b766711f Mon Sep 17 00:00:00 2001 From: aoirint Date: Tue, 17 Oct 2023 15:25:50 +0900 Subject: [PATCH 4/6] Update requirements.txt --- requirements-test.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements-test.txt b/requirements-test.txt index 7029058db..1df5c19de 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -29,6 +29,8 @@ flake8==6.1.0 ; python_version >= "3.11" and python_version < "3.12" gitdb==4.0.10 ; python_version >= "3.11" and python_version < "3.12" gitpython==3.1.32 ; python_version >= "3.11" and python_version < "3.12" h11==0.14.0 ; python_version >= "3.11" and python_version < "3.12" +httpcore==0.18.0 ; python_version >= "3.11" and python_version < "3.12" +httpx==0.25.0 ; python_version >= "3.11" and python_version < "3.12" idna==3.4 ; python_version >= "3.11" and python_version < "3.12" importlib-metadata==6.8.0 ; python_version >= "3.11" and python_version < "3.12" iniconfig==2.0.0 ; python_version >= "3.11" and python_version < "3.12" From b3525ffb2a625e81aa3a8fc19bdcfa14165cd3aa Mon Sep 17 00:00:00 2001 From: aoirint Date: Tue, 17 Oct 2023 15:27:37 +0900 Subject: [PATCH 5/6] add httpx note --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index da2b85e7d..7df506c71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ mypy = "~0.991" pytest = "^6.2.5" coveralls = "^3.2.0" poetry = "^1.3.1" -httpx = "^0.25.0" +httpx = "^0.25.0" # NOTE: required by starlette TestClient [tool.poetry.group.license.dependencies] pip-licenses = "^4.2.0" From de17fa40c0c65a2be6d4d940065a91a8c9a09ad2 Mon Sep 17 00:00:00 2001 From: aoirint Date: Tue, 17 Oct 2023 15:59:07 +0900 Subject: [PATCH 6/6] wrap starlette --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7df506c71..56bcecf2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,7 @@ mypy = "~0.991" pytest = "^6.2.5" coveralls = "^3.2.0" poetry = "^1.3.1" -httpx = "^0.25.0" # NOTE: required by starlette TestClient +httpx = "^0.25.0" # NOTE: required by fastapi.testclient.TestClient [tool.poetry.group.license.dependencies] pip-licenses = "^4.2.0"