Skip to content

PYTHON-2415 Support pickle in BulkWriteError #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 12, 2020

Conversation

ShaneHarvey
Copy link
Member

@ShaneHarvey ShaneHarvey merged commit 30523d2 into mongodb:master Nov 12, 2020
@pcorpet
Copy link
Contributor

pcorpet commented Nov 21, 2020

This PR broke the string representation of BulklWriteError.

str(exception)

is now

{'writeErrors': [{'index': 1, 'code': 11000, 'op': {'_id': 1}, 'errmsg': 'E11000 Duplicate Key Error'}], 'nInserted': 1}

Whereas it should be (at least I think so):

batch op errors occurred, full error: {'writeErrors': [{'index': 1, 'code': 11000, 'op': {'_id': 1}, 'errmsg': 'E11000 Duplicate Key Error'}], 'nInserted': 1}

@pcorpet
Copy link
Contributor

pcorpet commented Nov 22, 2020

I've created #522 to forward fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants