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

TypeError raised when max_pool_size is None in python 3.x

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.6.2
    • Affects Version/s: 2.6
    • Component/s: None
    • None
    • Environment:
      Linux Centos

      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.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            pfrantz Phillip Frantz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: