Details

    • Type: Epic
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.10.0
    • Fix Version/s: None
    • Component/s: library
    • Security Level: Public
    • Labels:
      None

      Description

      I've made some experiments in supporting PyPy.

      Supposedly it's CPython compatible – but not really.

      I've started a branch on my own github called https://github.com/mnunberg/couchbase-python-client/tree/pypy

      As of now there is no ETA for support - but I'd like to see it working with PyPy as well.

        Issue Links

          Issues in Epic

          There are no issues in this epic.
          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

            Hide
            mnunberg Mark Nunberg added a comment -

            Why is this resolved? PyPy is still not supported

            Show
            mnunberg Mark Nunberg added a comment - Why is this resolved? PyPy is still not supported
            Hide
            jaigupta Jai Gupta added a comment -

            Is this planned to be fixed?

            Show
            jaigupta Jai Gupta added a comment - Is this planned to be fixed?
            Hide
            mnunberg Mark Nunberg added a comment -

            I'd like to have it open, but it will require a substantial amount of work to make it work with PyPy. PyPy's C extension layer is sorta broken, so it would require various workarounds in our code in order to play nice with whatever PyPy has.

            Show
            mnunberg Mark Nunberg added a comment - I'd like to have it open, but it will require a substantial amount of work to make it work with PyPy. PyPy's C extension layer is sorta broken, so it would require various workarounds in our code in order to play nice with whatever PyPy has.
            Hide
            jaigupta Jai Gupta added a comment -

            When we tested Couchbase python library last time, it used to work with PyPy. I think at that time it was in pure Python. I am not sure though.

            Now that Couchbase python library is stable, it does not support PyPy. It is bad for our project.

            Is there any workaround? Or, should we run older version of Couchbase python library?

            PyPy makes huge difference to our application.

            Show
            jaigupta Jai Gupta added a comment - When we tested Couchbase python library last time, it used to work with PyPy. I think at that time it was in pure Python. I am not sure though. Now that Couchbase python library is stable, it does not support PyPy. It is bad for our project. Is there any workaround? Or, should we run older version of Couchbase python library? PyPy makes huge difference to our application.
            Hide
            mnunberg Mark Nunberg added a comment -

            So i've done some more work regarding PyPy support. It's leaky and buggy, but 1.2 will have better support than previously. The core problem is that a lot of the stuff the extension does is implemented in pure C. It's easier to maintain and links better with libcouchbase.

            • Currently PyPy offers 'cpyext' which is buggy, not to mention being slow. The support in place now relies on CPyExt.
            • Changing the code to be pure python would be a bad idea since the overhead doesn't come from a single algorithm but from the overall structure and options provided in our code, not to mention the interaction with libcouchbase. Additionally, the C structure is proven quite well with multiple use cases in Twisted and gevent.

            In this category is included interactions with 'cffi' which would be cumbersome and buggy, since all the libcouchbase structures would need to be enumerated properly.

            A possible workaround in this case is to maintain the C logic "as-is" and implement the problematic bits in Python, perhaps bridging between the two using cffi - in the case of cffi, we'd only need to bridge the C structures internal to the extension (which are simpler and less numerous than what libcouchbase has)

            Show
            mnunberg Mark Nunberg added a comment - So i've done some more work regarding PyPy support. It's leaky and buggy, but 1.2 will have better support than previously. The core problem is that a lot of the stuff the extension does is implemented in pure C. It's easier to maintain and links better with libcouchbase. Currently PyPy offers 'cpyext' which is buggy, not to mention being slow. The support in place now relies on CPyExt. Changing the code to be pure python would be a bad idea since the overhead doesn't come from a single algorithm but from the overall structure and options provided in our code, not to mention the interaction with libcouchbase. Additionally, the C structure is proven quite well with multiple use cases in Twisted and gevent. In this category is included interactions with 'cffi' which would be cumbersome and buggy, since all the libcouchbase structures would need to be enumerated properly. A possible workaround in this case is to maintain the C logic "as-is" and implement the problematic bits in Python, perhaps bridging between the two using cffi - in the case of cffi, we'd only need to bridge the C structures internal to the extension (which are simpler and less numerous than what libcouchbase has)
            Hide
            mnunberg Mark Nunberg added a comment -

            I've started a new project to implement much of the functionality using the 'cffi' module which is supported by PyPy:

            https://github.com/couchbaselabs/couchbase-python-cffi

            Show
            mnunberg Mark Nunberg added a comment - I've started a new project to implement much of the functionality using the 'cffi' module which is supported by PyPy: https://github.com/couchbaselabs/couchbase-python-cffi

              People

              • Assignee:
                mnunberg Mark Nunberg
                Reporter:
                mnunberg Mark Nunberg
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes