- Package Name: azure-core
- Package Version: 1.40.0
- Operating System: All
- Python Version: All
Describe the bug
Starting with Requests 2.34.0, typing will be moving from Typeshed to inline types for Requests. Those are largely the same except for some technical corrections, and more complete compound types.
We've been testing downstream projects and most are passing with our pre-release (2.34.0.dev1). We're seeing two issues with pyright in the Azure SDK for Python though.
Both of these send implementations type proxies as MutableMapping[str, str]. While that matches Typeshed, .copy() will be called on input for the proxies parameter. The MutableMapping interface doesn't require this, which can lead to runtime failures. The parameter should be typed as dict[str, str] to reflect the actual API contract.
To Reproduce
Steps to reproduce the behavior:
- Install the pre-release of Requests (2.34.0.dev1).
- Run type checking as usual.
Expected behavior
The type checkers pass with valid types.
Describe the bug
Starting with Requests 2.34.0, typing will be moving from Typeshed to inline types for Requests. Those are largely the same except for some technical corrections, and more complete compound types.
We've been testing downstream projects and most are passing with our pre-release (2.34.0.dev1). We're seeing two issues with pyright in the Azure SDK for Python though.
Both of these
sendimplementations typeproxiesasMutableMapping[str, str]. While that matches Typeshed,.copy()will be called on input for the proxies parameter. TheMutableMappinginterface doesn't require this, which can lead to runtime failures. The parameter should be typed asdict[str, str]to reflect the actual API contract.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The type checkers pass with valid types.