In fact, even the addErrback line won't ever get executed
I'm pretty sure the same bug happens even without Cooperator
runciter
ok
no, Cooperator turned it into a Failure
(there's an except: clause in CooperativeTask._oneWorkUnit)
nanonyme
Yes, but that's later
That's not a problem
runciter
right, the issue is that the URL can't be encoded, before it hits Agent
ok, i'm caught up now
eh
this is hard
nanonyme
Apparently one way to get it to bork like this is if HTTPS URL contains hostname that has an asterisk
It's obviously invalid but I think it still should result in a Failure, not a raised exception
runciter
yeah, the client guts have to idna code the domain to do SNI
i think this is worth a mailing list post
*i* think arises from conflating pure and impure operations - i'd like to see treq.head(URL('https://whatever'))
but i expect i'm in a distinct minority
but i think others will agree that it sucks to have to know when a code path hits the wire to know when it'll have to catch an exception and when it get a Failure
you might have to know how an implementation works to *act* on an error, but you shouldn't have to know that to even *catch* an error
i expect this will also dovetail into a discussion of synchronous vs asynchronous Deferreds
nanonyme: you can also file a ticket against Agent, i think, if you want to track any work on it
but this is a class of API issues that are worth discussing more generally
that *is
nanonyme
Thanks. I'll write a simpler test case for this and post further once my headache gets less bad
runciter
nanonyme: i've got to step out to run some errands - maybe i can draft something for you to look at if i get back, you're around, and haven't sent anything?
nanonyme
My project codebase is unnecessarily complicated to show what goes wrong