Menu

#12 corrected python3 support

Unstable_(example)
closed-accepted
None
5
2013-12-15
2011-02-21
decitre
No

This is an adaptation of patch 2917775, based on (https://p.carnivore.it/G6R9Go)
I successfully used this patch with couchdb-python-curl (http://code.google.com/p/couchdb-python-curl/)

Discussion

  • decitre

    decitre - 2011-02-21

    patch for py3k support

     
  • decitre

    decitre - 2011-02-21

    patch for:
    setup.py 28 Apr 2010 16:06:35 -0000 1.152
    examples/basicfirst.py 11 Feb 2005 11:09:11 -0000 1.5
    examples/retriever-multi.py 28 Jul 2005 11:04:13 -0000 1.29
    src/pycurl.c 13 Oct 2010 15:53:40 -0000 1.150

    Do a "2to3 -w ." before "python3 setup.py build"

    Thanks for Christopher Warner for the original patch 2917775.

     
  • decitre

    decitre - 2011-02-26

    Erratum: Credits to Markus for the original patch.

     
  • Nobody/Anonymous

    when is this getting accepted?

     
  • Anonymous

    Anonymous - 2013-01-23

    We've been running this patch for a while in Ubuntu.

    One thing I've noticed is that it has several sections of code in getattr methods like:
    PyErr_Clear();
    v = my_getattro(o, n, ((CurlShareObject *)o)->dict,
    curlshareobject_constants, curlshareobject_methods);

    But that should be:
    v = my_getattro(o, n, ((CurlShareObject *)o)->dict,
    curlshareobject_constants, curlshareobject_methods);
    if( v )
    PyErr_Clear();

    Because if you clear the AttributeError, but then still don't find the attribute with my_getattro, hasattr will throw a SystemError when it gets a None object back but no exception.

    https://bugs.launchpad.net/ubuntu/+source/pycurl/+bug/1103667

     
  • Oleg Pudeyev

    Oleg Pudeyev - 2013-12-15
    • status: open --> closed-accepted
    • assigned_to: Oleg Pudeyev
    • Group: --> Unstable_(example)
     
  • Oleg Pudeyev

    Oleg Pudeyev - 2013-12-15

    Committed, thanks!