v2.34.2
Breaking Changes📦 requestsView on GitHub →
⚠ 2 breaking🔧 1 symbols
Summary
This patch reverts the type hint for the `headers` input back to `Mapping` to resolve invariance issues, which may require minor type adjustments for users modifying request headers.
⚠️ Breaking Changes
- The type hint for the `headers` input has been reverted to `Mapping`. Code relying on `MutableMapping` or inferred dict types for `Request.headers` might experience issues if they attempt to use methods like `.update()` directly, as the type is now more strictly enforced as immutable.
- Users calling `Request.headers.update()` may need to narrow typing in their code to satisfy the new `Mapping` type constraint.
Migration Steps
- If you were relying on mutable dictionary behavior for `Request.headers`, ensure your type annotations reflect the expected `Mapping` type or use explicit casting if mutation is necessary.