From d7db8b49b0222574431535e61e2a4476fccca14e Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Thu, 2 Jul 2026 12:18:17 +0200 Subject: [PATCH 1/2] ref: Add python_multipart to typing group --- pyproject.toml | 1 + uv.lock | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 520f33f168..88e47013b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,6 +68,7 @@ typing = [ "botocore-stubs", "werkzeug", "starlette>=1.3.1", + "python-multipart>=0.0.32", ] test = [ "dataclasses ; python_full_version < '3.7'", diff --git a/uv.lock b/uv.lock index 09742b6d5a..c9b8fba204 100644 --- a/uv.lock +++ b/uv.lock @@ -51,6 +51,7 @@ typing = [ { name = "openfeature-sdk" }, { name = "opentelemetry-distro", extras = ["otlp"] }, { name = "pymongo" }, + { name = "python-multipart", specifier = ">=0.0.32" }, { name = "starlette", specifier = ">=1.3.1" }, { name = "statsig" }, { name = "strawberry-graphql" }, @@ -1398,6 +1399,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/28/5f/8e66136582fd4b4b224326ed92a8bf8be36d156d367a96b82ad74a0eba21/python_discovery-1.3.2-py3-none-any.whl", hash = "sha256:889d67b010d31fb19331fc723d7cb201c9f77c24c70cd21b0d9cc3255e86bb23", size = 33154, upload-time = "2026-05-27T21:15:28.567Z" }, ] +[[package]] +name = "python-multipart" +version = "0.0.32" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5b/42/55c32bb9b12693c092ad250a0e82edb5b31ddeda6eb772de5f308b3804ad/python_multipart-0.0.32.tar.gz", hash = "sha256:be54b7f3fa167bb83e4fcd936b887b708f4e57fe75911c02aebf53efaf8d938e", size = 46881, upload-time = "2026-06-04T16:18:58.647Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e1/04/e8135ebd1ad02c56ec633277529b2602ff99ff634be76cdba5744cf554fd/python_multipart-0.0.32-py3-none-any.whl", hash = "sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23", size = 30042, upload-time = "2026-06-04T16:18:57.319Z" }, +] + [[package]] name = "pyyaml" version = "6.0.3" From 7ff8628b6abd6134dd5c4c3e4da7c66ac9eb9d01 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Thu, 2 Jul 2026 12:20:06 +0200 Subject: [PATCH 2/2] . --- sentry_sdk/integrations/starlette.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sentry_sdk/integrations/starlette.py b/sentry_sdk/integrations/starlette.py index 8b1e485d9e..ad9ba52413 100644 --- a/sentry_sdk/integrations/starlette.py +++ b/sentry_sdk/integrations/starlette.py @@ -81,12 +81,12 @@ # Optional dependency of Starlette to parse form data. try: # python-multipart 0.0.13 and later - import python_multipart as multipart # type: ignore + import python_multipart as multipart except ImportError: # python-multipart 0.0.12 and earlier import multipart # type: ignore except ImportError: - multipart = None + multipart = None # type: ignore[assignment] # Vendored: https://github.com/Kludex/starlette/blob/0a29b5ccdcbd1285c75c4fdb5d62ae1d244a21b0/starlette/_utils.py#L11-L17