curl-and-python

Re: PycURL status

From: Dima Tisnek <dimaqq_at_gmail.com>
Date: Tue, 31 Jul 2012 20:56:35 +0300

my patch is here, I didn't get around to clean it up to get accepted.
I'm sure there are other possibilities.
https://github.com/dimaqq/c-ares/tree/ares-reinit

I don't have too many connections, so I just use threads and set
timeout anew for each request. lately I run a pool of pycurl.Curl
instances with some ad hoc prioritization.

d

On 31 July 2012 20:42, André Cruz <andre.cruz_at_co.sapo.pt> wrote:
> On Jul 31, 2012, at 6:30 PM, Dima Tisnek <dimaqq_at_gmail.com> wrote:
>
>> curlmulti is not clean in pycurl, you can make dangling references and
>> crashes from python.
>
> As I need gevent, I need to use Curl with an external event loop. For this, I would need curlmulti...
>
>> if you want hard timeouts, you need c-ares, then if you run on any
>> unix and you have very long-running processes, you need patched
>> c-ares, otherwise curl won't get new dns server when you move to a new
>> network or network switch is changed.
>
> Where can I find this patched c-ares? Gevent already makes use of c-ares so maybe I would not have problems there.
>
>> All in all, if you only need http/https, nowadays you can get by with
>> python alone.
>
> Thanks. I already use urllib/requests extensively, but I recall from my C days that libcurl was much more configurable. That's why I wanted to give it a try.
>
> Best regards,
> André
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2012-07-31