Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-566

TypeError raised when max_pool_size is None in python 3.x

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux Centos

      Description

      if max_pool_size is set to None, then if _return_socket is ever called an exception is thrown. The offending code is in pool.py in the _return_socket method.

      The line:-

      if (len(self.sockets) < self.max_size and sock_info.pool_id == self.pool_id):

      throws:-

      TypeError: unorderable types: int() < NoneType()

      This is easy to work around as just need to set the pool size although the problem is occurring in a third party library I am using because its using the depreciated Connection class which defaults to max_pool_size of None.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: