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

TypeError raised when max_pool_size is None in python 3.x

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 2.6
    • 2.6.2
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: