Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-458

Clang and Python warnings during installation of Python SDK 2.3.2

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.2
    • 2.3.4
    • library
    • None
    • Python 2.7

    Description

      At installation time pip shows the following warnings:

      src/callbacks.c: In function ‘ping_callback’:
      src/callbacks.c:736:9: warning: variable ‘do_return’ set but not used [-Wunused-but-set-variable]
           int do_return = 0;
               ^
      src/oputil.c: In function ‘pycbc_sd_handle_speclist’:
      src/oputil.c:657:8: warning: ‘rv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
           if (rv == 0) {
              ^
      src/ixmgmt.c: In function ‘mgmt_callback’:
      src/ixmgmt.c:15:26: warning: variable ‘hdrs’ set but not used [-Wunused-but-set-variable]
           const char * const * hdrs = NULL;
                                ^
        File "build/bdist.linux-x86_64/egg/acouchbase/iterator.py", line 17
          yield from self._future
                   ^
      SyntaxError: invalid syntax
      

      At least a warning about yield statement is quite critical as it makes acouchbase sub-package completely unusable in Python 2.7 (it uses Python 3.0 features).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          Ellis.Breen Ellis Breen added a comment - - edited

          Apologies, I will attempt to fix this in an upcoming release by unrolling the 'yield from' statement and addressing the C++ warnings.

          Ellis.Breen Ellis Breen added a comment - - edited Apologies, I will attempt to fix this in an upcoming release by unrolling the 'yield from' statement and addressing the C++ warnings.
          Ellis.Breen Ellis Breen added a comment -

          Hi Volodymyr Khoroz - many apologies for the long delay due to illness. I will address the C compilation warnings ASAP (there is a release tomorrow which may get the changes), although the acouchbase sub-package is unusable in Python 2.7 anyway, as it relies on asyncio, which is a Python 3 only feature with no backport. I'll see if I can at least get rid of the warning about yield from. It turns out that changing the 'yield from ...' statement into a 'for x in ... \ yield' statement is subtly different, so I will see if I can somehow exclude these packages from the 2.7 distribution instead.

           

           

          Ellis.Breen Ellis Breen added a comment - Hi Volodymyr Khoroz - many apologies for the long delay due to illness. I will address the C compilation warnings ASAP (there is a release tomorrow which may get the changes), although the acouchbase sub-package is unusable in Python 2.7 anyway, as it relies on asyncio, which is a Python 3 only feature with no backport. I'll see if I can at least get rid of the warning about yield from. It turns out that changing the 'yield from ...' statement into a 'for x in ... \ yield' statement is subtly different, so I will see if I can somehow exclude these packages from the 2.7 distribution instead.    
          Ellis.Breen Ellis Breen added a comment -

          My apologies, Python <=3.4 uses Trollius instead of asyncio. Will try to wrap the yield from statement instead, to allow warning-free usage on older Pythons.

          Ellis.Breen Ellis Breen added a comment - My apologies, Python <=3.4 uses Trollius instead of asyncio. Will try to wrap the yield from statement instead, to allow warning-free usage on older Pythons.

          People

            Ellis.Breen Ellis Breen
            volodymyr.khoroz Volodymyr Khoroz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty