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

Fix warnings emitted by Python 3.8

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.10
    • Affects Version/s: None
    • Component/s: None
    • None

      When running the test suite with 3.8.0a1 there are quite a few new warnings:

      /Users/shane/git/mongo-python-driver/bson/json_util.py:711: SyntaxWarning: "is not" with a literal. Did you mean "!="?
      if doc['$maxKey'] is not 1:
      
      /Users/shane/git/mongo-python-driver/test/test_custom_types.py:516: SyntaxWarning: invalid escape sequence \(
        "are encoded \(encoder .* transforms type .*\)")
      /Users/shane/git/mongo-python-driver/test/test_database.py:1057: SyntaxWarning: invalid escape sequence \(
        err_msg = "Database.aggregate\(\) is only supported on MongoDB 3.6\+."
      /Users/shane/git/mongo-python-driver/test/test_encryption.py:677: SyntaxWarning: invalid escape sequence \[
        'requires that type is one of: \[ string \]')
      
      /Users/shane/git/mongo-python-driver/test/utils.py:582: DeprecationWarning: isAlive() is deprecated, use is_alive() instead
        assert not t.isAlive(), "Thread %s hung" % t
      
      /Users/shane/git/mongo-python-driver/pymongo/database.py:822: SyntaxWarning: invalid escape sequence \.
        """Get a list of all the collection names in this database.
      

      Another warning:

      /Users/shane/git/mongo-python-driver/pymongo/message.py:705: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
        return _op_msg_uncompressed(
      

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: