Describe the bug
When the client is initialized with allow_redirects=True, the per request allow_redirects=False is ignored.
To Reproduce
Code to reproduce:
#!/usr/bin/env python
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "rnet",
# ]
# ///
from rnet import BlockingClient
client = BlockingClient(
allow_redirects=True,
timeout=10,
)
response = client.get(
"https://httpbin.org//redirect-to?url=https://google.com",
allow_redirects=False,
)
print(response.status_code, response.url)
Output:
200 https://www.google.com/
Expected output
302 https://httpbin.org//redirect-to?url=https://google.com
Environment
OS: Manjaro Linux x86_64 Gnome 48
uv: 0.7.17
Python: cpython-3.13.5-linux-x86_64-gnu
rnet: 2.4.1
Describe the bug
When the client is initialized with
allow_redirects=True, the per requestallow_redirects=Falseis ignored.To Reproduce
Code to reproduce:
Output:
Expected output
Environment
OS: Manjaro Linux x86_64 Gnome 48
uv: 0.7.17
Python: cpython-3.13.5-linux-x86_64-gnu
rnet: 2.4.1