async def update_object(obj, only=None):
<EOL>warnings.warn("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>DeprecationWarning)<EOL>field_dict = dict(obj.__data__)<EOL>pk_field = obj._meta.primary_key<EOL>if only:<EOL><INDENT>field_dict = obj._prune_fields(field_dict, only)<EOL><DEDENT>if not isinstance(pk_field, peewee.CompositeKey):<EOL><INDENT>field_dict.pop(pk_field.name, None)<EOL><DEDENT>else:<EOL><INDENT>field_dict = obj._prune_fields(field_dict, obj.dirty_fields)<EOL><DEDENT>rows = await update(obj.update(**field_dict).where(obj._pk_expr()))<EOL>obj._dirty.clear()<EOL>return rows<EOL>
Update object asynchronously.

    :param obj: object to update
    :param only: list or tuple of fields to updata, is `None` then all fields
        updated

    This function does the same as `Model.save()`_ for already saved object,
        but it doesn't invoke ``save()`` method on model class. That is
        important to know if you overrided save method for your model.

    .. _Model.save(): http://peewee.readthedocs.io/en/latest/peewee/
        api.html#Model.save