Change8

v2.34.0

📦 requestsView on GitHub →
3 features🐛 4 fixes🔧 3 symbols

Summary

Version 2.34.0 introduces comprehensive inline types for improved static analysis compatibility and adds support for upcoming Python versions. Several bugs related to response history looping and proxy domain matching have been fixed.

Migration Steps

  1. If encountering issues with type checking after upgrading, report them to the pinned tracking issue: https://github.com/psf/requests/issues/7271.
  2. Ensure urllib3 version is 2.7.0 or higher to fully resolve the bug regarding stripping duplicate leading slashes in URI paths.

✨ New Features

  • Introduced inline types, replacing those provided by typeshed, aiming for full compatibility with mypy, pyright, and ty.
  • Added support for Python 3.15 (based on beta1).
  • Added support for Python 3.14t.

🐛 Bug Fixes

  • Digest Auth hashing algorithms now include `usedforsecurity=False` for clarity.
  • Response.history no longer contains a reference to itself, preventing accidental looping.
  • Requests no longer performs greedy matching on no_proxy domains; proxy_bypass implementation updated with CPython's fix from bpo-39057.
  • Requests no longer incorrectly strips duplicate leading slashes in URI paths (requires urllib3 2.7.0+ for the full fix).

Affected Symbols