Commit c48ecbe
committed
fix: use AsyncHTTPDigestAuth instead of HTTPDigestAuth for niquests async client
When using niquests in async mode, digest auth must use AsyncHTTPDigestAuth.
The sync HTTPDigestAuth.handle_401() calls r.connection.send() which returns
a coroutine in async context, causing "AttributeError: 'coroutine' object has
no attribute 'history'".
Reported at jawah/niquests#387 (comment)
prompt: Please check jawah/niquests#387 (comment), the last comment hints that the problem is in the caldav library
AI Prompts:
claude-sonnet-4-6: Please check jawah/niquests#387 (comment), the last comment hints that the problem is in the caldav library1 parent 9d73618 commit c48ecbe
3 files changed
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
838 | | - | |
| 838 | + | |
839 | 839 | | |
840 | | - | |
| 840 | + | |
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
312 | | - | |
313 | | - | |
| 311 | + | |
314 | 312 | | |
315 | 313 | | |
316 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 116 | | |
120 | 117 | | |
121 | 118 | | |
| |||
0 commit comments