New atom.http module, please review

0 views
Skip to first unread message

Jeff S

unread,
Aug 20, 2008, 9:42:59 PM8/20/08
to GData Python Client Library Contributors
Hi all,

I've been working on a small refactoring of the HTTP request logic in
the hopes of making HTTP requests more modular. The end goal is to
allow chaining of HttpClient objects so that new layers of logic can
be injected before the request goes out over the wire. I began by
writing a replacement for some of the code in atom.service and I've
uploaded the diff here:

http://gdata-python-client-library-contributors.googlegroups.com/web/atom_http.diff?gda=01DrYEAAAACIyiLQey30jVAZJxyX7mpGVmKwVjrLZF0QQOHE54WALEjjzqgoUdibKqvn4IqbuPNtxVPdW1gYotyj7-X7wDON

Please reply with code review comments below. I'm especially
interested in hearing from Takashi since he provided the proxy logic
that I've migrated (if I recall correctly).

Happy reviewing,

Jeff

Takashi Matsuo

unread,
Aug 21, 2008, 1:05:48 PM8/21/08
to gdata-python-client-...@googlegroups.com
Hi Jeff,

I've done a quick look just on the surface of the changes you made. If
I understand correctly, it seems that you are going to change the type
of the 'handler' parameter of the gdata.service's constructor from
'module' to 'instance of HttpClient'. I think its a very good idea, so
I agree with this design.

However, I have not yet finished to vet all of the changes, so please
give me two or three more days?

I'm sorry if I misunderstand something.

Regards,

-- Takashi

Jeff S

unread,
Aug 21, 2008, 8:14:36 PM8/21/08
to GData Python Client Library Contributors
Yay Takashi,

On Aug 21, 10:05 am, "Takashi Matsuo" <matsuo.taka...@gmail.com>
wrote:
> Hi Jeff,
>
> I've done a quick look just on the surface of the changes you made. If
> I understand correctly, it seems that you are going to change the type
> of the 'handler' parameter of the gdata.service's constructor from
> 'module' to 'instance of HttpClient'. I think its a very good idea, so
> I agree with this design.

You've got the picture, I'm glad that you like it.

>
> However, I have not yet finished to vet all of the changes, so please
> give me two or three more days?

Sure, no problem :)

Thank you,

Jeff

>
> I'm sorry if I misunderstand something.
>
> Regards,
>
> -- Takashi
>
> On Thu, Aug 21, 2008 at 10:42 AM, Jeff S <j...@google.com> wrote:
>
> > Hi all,
>
> > I've been working on a small refactoring of the HTTP request logic in
> > the hopes of making HTTP requests more modular. The end goal is to
> > allow chaining of HttpClient objects so that new layers of logic can
> > be injected before the request goes out over the wire. I began by
> > writing a replacement for some of the code in atom.service and I've
> > uploaded the diff here:
>
> >http://gdata-python-client-library-contributors.googlegroups.com/web/...

Takashi Matsuo

unread,
Aug 21, 2008, 9:35:31 PM8/21/08
to gdata-python-client-...@googlegroups.com
Hi Jeff,

Fortunately, I had some time for reviewing :-)
I have made some small changes to your code. Please see the attachment.

-- Takashi

http.py

Jeff S

unread,
Aug 22, 2008, 5:02:45 PM8/22/08
to GData Python Client Library Contributors
Excellent changes Takashi. I've checked in this module as revision
462.

Cheers,

Jeff
> http.py
> 12KViewDownload
Reply all
Reply to author
Forward
0 new messages