[Twisted-Python] Final request URI from an Agent response

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Sat Mar 16 11:48:21 EDT 2013


On 02:52 pm, jonathan+twisted at jsphere.com wrote:
>On Sat, Mar 16, 2013 at 3:49 PM, <exarkun at twistedmatrix.com> wrote:
>>However, there's no reason we can't have an object that
>>represents an IRI *without* writing a parser for all those forms. 
>>Agent
>>only needs minimal functionality of being able to figure out the
>>hostname, port number, and whatever makes up the rest.
>
>
>Isn't this currently called twisted.web.client._URL? (Although _URL 
>still
>needs some more data to fill this role.)

Something like it, yea.  Although please do not expose a tuple subclass 
publicly (in fact, if you could get rid of that tuple subclass while 
working on this, I don't think it would hurt. :)
>I do like this idea, although I keep coming back to wondering how we
>provide this to Request initially, an additional parameter was not 
>received
>with much enthusiasm on IRC. It would be unfortunate if Request.uri is
>going to mean "the relative URI" forever.

Yes.  I wish the API had been more well considered before being exposed 
publicly.
>And, when the IRI ticket is
>finally complete, are we going to have to introduce yet another API for
>getting an IRI object?

The object we expose now should be forward compatible with the future 
perfect IRI object so that we can replace it with the IRI object when 
that is ready.

Jean-Paul



More information about the Twisted-Python mailing list