Drop deprecation warnings on the templating module#3118
Merged
Conversation
Merged
3 tasks
sentrivana
added a commit
to getsentry/sentry-python
that referenced
this pull request
Feb 24, 2026
…5525) ## Summary - Fix `test_template_tracing_meta` failure on `starlette==1.0.0rc1` across all Python versions (3.10, 3.13, 3.14, 3.14t) Closes #5523 ## Analysis Starlette 1.0.0rc1 removed the deprecated `TemplateResponse(name, context)` calling convention ([Kludex/starlette#3118](Kludex/starlette#3118), commit [`96479da`](Kludex/starlette@96479da)). The new required signature is `TemplateResponse(request, name, context)`. When the old-style call was made, the string template name was passed as the `request` parameter and the context dict as `name`, which then got used as part of a Jinja2 cache key tuple, causing `TypeError: unhashable type: 'dict'`. The fix branches on `STARLETTE_VERSION >= (1,)` to use the new API for Starlette 1.0+ while keeping the old API for older versions. ## Test plan - [x] `tox -e py3.14-starlette-v1.0.0rc1` — 71 passed - [x] `tox -e py3.14-starlette-v0.52.1` — 71 passed (no regression) - [ ] CI passes on all Web 1 jobs 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.