Test python-snappy with Python 3.8+

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Tests
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      We currently do not test Python 3.8 with snappy:

        # Some tests fail with CPython 3.8 and python-snappy
         - platform: ubuntu-16.04
           python-version: ["3.8"]
           c-extensions: "*"
           compression: ["snappy"]
      

      Attempting to add python-snappy compression tests for python 3.8 and 3.9 fail with this error:

      [2020/09/10 21:48:29.864] ERROR [0.002s]: test_ensure_index_deprecation (test_legacy_api.TestDeprecations)
      [2020/09/10 21:48:29.864] ----------------------------------------------------------------------
      [2020/09/10 21:48:29.864] DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
      [2020/09/10 21:48:29.864] The above exception was the direct cause of the following exception:
      [2020/09/10 21:48:29.864] Traceback (most recent call last):
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/test/test_legacy_api.py", line 107, in test_ensure_index_deprecation
      [2020/09/10 21:48:29.864]     self.db.test.drop()
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/collection.py", line 1127, in drop
      [2020/09/10 21:48:29.864]     dbo.drop_collection(self.__name, session=session)
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/database.py", line 922, in drop_collection
      [2020/09/10 21:48:29.864]     return self._command(
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/database.py", line 626, in _command
      [2020/09/10 21:48:29.864]     return sock_info.command(
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/pool.py", line 699, in command
      [2020/09/10 21:48:29.864]     self._raise_connection_failure(error)
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/pool.py", line 683, in command
      [2020/09/10 21:48:29.864]     return command(self, dbname, spec, slave_ok,
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/network.py", line 120, in command
      [2020/09/10 21:48:29.864]     request_id, msg, size, max_doc_size = message._op_msg(
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/message.py", line 712, in _op_msg
      [2020/09/10 21:48:29.864]     return _op_msg_compressed(
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/message.py", line 678, in _op_msg_compressed
      [2020/09/10 21:48:29.864]     rid, msg = _compress(2013, msg, ctx)
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/message.py", line 500, in _compress
      [2020/09/10 21:48:29.864]     compressed = ctx.compress(data)
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/compression_support.py", line 112, in compress
      [2020/09/10 21:48:29.864]     return snappy.compress(data)
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/snappytest/lib/python3.9/site-packages/snappy.py", line 84, in compress
      [2020/09/10 21:48:29.864]     return _compress(data)
      [2020/09/10 21:48:29.864] SystemError: <built-in function compress> returned a result with an error set
      [2020/09/10 21:48:29.864] ======================================================================
      [2020/09/10 21:48:29.864] ERROR [0.002s]: test_geoHaystack_deprecation (test_legacy_api.TestDeprecations)
      [2020/09/10 21:48:29.864] ----------------------------------------------------------------------
      [2020/09/10 21:48:29.864] DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
      [2020/09/10 21:48:29.864] The above exception was the direct cause of the following exception:
      [2020/09/10 21:48:29.864] Traceback (most recent call last):
      [2020/09/10 21:48:29.864]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/collection.py", line 1127, in drop
      [2020/09/10 21:48:29.865]     dbo.drop_collection(self.__name, session=session)
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/database.py", line 922, in drop_collection
      [2020/09/10 21:48:29.865]     return self._command(
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/database.py", line 626, in _command
      [2020/09/10 21:48:29.865]     return sock_info.command(
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/pool.py", line 699, in command
      [2020/09/10 21:48:29.865]     self._raise_connection_failure(error)
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/pool.py", line 683, in command
      [2020/09/10 21:48:29.865]     return command(self, dbname, spec, slave_ok,
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/network.py", line 120, in command
      [2020/09/10 21:48:29.865]     request_id, msg, size, max_doc_size = message._op_msg(
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/message.py", line 712, in _op_msg
      [2020/09/10 21:48:29.865]     return _op_msg_compressed(
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/message.py", line 678, in _op_msg_compressed
      [2020/09/10 21:48:29.865]     rid, msg = _compress(2013, msg, ctx)
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/message.py", line 500, in _compress
      [2020/09/10 21:48:29.865]     compressed = ctx.compress(data)
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/pymongo/compression_support.py", line 112, in compress
      [2020/09/10 21:48:29.865]     return snappy.compress(data)
      [2020/09/10 21:48:29.865]   File "/data/mci/ec48d7405b8e3978055809c82cac7b37/src/snappytest/lib/python3.9/site-packages/snappy.py", line 84, in compress
      [2020/09/10 21:48:29.865]     return _compress(data)
      [2020/09/10 21:48:29.865] SystemError: <built-in function compress> returned a result with an error set
      

      I've filed this issue upstream here: https://github.com/andrix/python-snappy/issues/97

      For now we could skip these two failing tests when snappy is enabled. Alternatively we could wait until python-snappy officially supports Python 3.8/3.9.

              Assignee:
              Unassigned
              Reporter:
              Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: