title: Pymongo's update_one() returns UpdateResult with AttributeError
body: <p>I just upgraded my MongoDB and Pymongo to the latest version 3.2.1 to be able to use the <a href="https://api.mongodb.org/python/current/api/pymongo/results.html?_ga=1.66820142.1654018748.1454241415#pymongo.results.UpdateResult" rel="nofollow noreferrer"><em>UpdateResult</em></a> object after calling <em>update_one()</em>.
  But for some reason the returned object has one field that contains an <strong>AttributeError</strong>.</p>
  <p>Take a look at my <a href="https://i.stack.imgur.com/C0DgX.png" rel="nofollow noreferrer">Pycharm screen</a>. You can see that <em>_UpdateResult__acknowledged</em></p>
  <pre><code>'Traceback (most recent call last):
    File &quot;/opt/pycharm-community-5.0.4/helpers/pydev/pydevd_resolver.py&quot;, line 191, in _getPyDictionary
      attr = getattr(var, n)
  AttributeError: _UpdateResult__acknowledged'
  </code></pre>
  <p>It causes me a problem since I am trying to catch all exceptions and every time I need to use update_one() in my code I get this exception.</p>
  <p>This is a snippet of my code:</p>
  <pre><code>QUERY = {id: '1234'}
  try:
      record = mongoCollection.find_one(QUERY)
      if record is None:
          print 'Add new Record'
      else:
          updateResult = mongoCollection.update_one(
              QUERY,
              {'$addToSet': {'info': getInfo()}}
          )
  
          if updateResult['modified_count'] == 1:
              mongoCollection.update_one(
                  QUERY,
                  {'$inc': {'infoCount': 1}}
              )
          print 'Record exists, updating if needed'
  except:
      print 'Failed to add/update'
  </code></pre>
  <p>Luckily I was able to find a workaround that doesn't cause this exception to be raised.
  Instead of using <em>update_one()</em>, I can use the deprecated function <em>update()</em> which returns only the RAW result from MongoDB and then instead of comparing <em>updateResult['modified_count']</em>, I can just compare updateResult['nModified'].</p>
  <p>But this is definitely not a best practice to use deprecated functions... :(</p>
  <p>Any thoughts?</p>