PyMongo Bulkwrite UpdateMany deprecated?

Hi there,

I am looking to fulfil the following:

operations = []
for i in data:
    operations.append(updateMany({'location.zip':i['_id']}, {"$set":{'calculations.distance':i['distance']}}, upsert=True))
print(collection.bulk_write(operations, ordered=False))

But it seems to be deprecated. How can I go about doing this insert, without using UpdateOne, as I have approximately 3000K results, and only 4000 postals and distances that are spread over those?

Hi @EA_K, nothing about your code snippert should be deprecated, is there a warning or documentation somewhere that says otherwise?