Skip to content

PYTHON-1301/PYTHON-1302/PYTHON-1588 Remove deprecated cursor manager APIs #550

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 3 commits into from
Jan 16, 2021

Conversation

ShaneHarvey
Copy link
Member

This change implements:

@ShaneHarvey
Copy link
Member Author

The following test is failing on MongoDB 4.0+:

 [2021/01/15 23:50:13.857] ERROR [2.146s]: test_break_resume_token (test_custom_types.TestClusterChangeStreamsWCustomTypes)
 [2021/01/15 23:50:13.857] ----------------------------------------------------------------------
 [2021/01/15 23:50:13.857] Traceback (most recent call last):
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/test/test_custom_types.py", line 826, in test_break_resume_token
 [2021/01/15 23:50:13.857]     self.insert_and_check(change_stream, docs[0], docs[0])
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/test/test_custom_types.py", line 751, in insert_and_check
 [2021/01/15 23:50:13.857]     self.input_target.insert_one(insert_doc)
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/pymongo/collection.py", line 701, in insert_one
 [2021/01/15 23:50:13.857]     self._insert(document,
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/pymongo/collection.py", line 616, in _insert
 [2021/01/15 23:50:13.857]     return self._insert_one(
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/pymongo/collection.py", line 605, in _insert_one
 [2021/01/15 23:50:13.857]     self.__database.client._retryable_write(
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/pymongo/mongo_client.py", line 1478, in _retryable_write
 [2021/01/15 23:50:13.857]     return self._retry_with_session(retryable, func, s, None)
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/pymongo/mongo_client.py", line 1364, in _retry_with_session
 [2021/01/15 23:50:13.857]     return self._retry_internal(retryable, func, session, bulk)
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/pymongo/mongo_client.py", line 1396, in _retry_internal
 [2021/01/15 23:50:13.857]     return func(session, sock_info, retryable)
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/pymongo/collection.py", line 603, in _insert_command
 [2021/01/15 23:50:13.857]     _check_write_command_response(result)
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/pymongo/helpers.py", line 226, in _check_write_command_response
 [2021/01/15 23:50:13.857]     _raise_last_write_error(write_errors)
 [2021/01/15 23:50:13.857]   File "/data/mci/07146fdd00f40c8dc2f3160548b8d5c8/src/pymongo/helpers.py", line 207, in _raise_last_write_error
 [2021/01/15 23:50:13.857]     raise DuplicateKeyError(error.get("errmsg"), 11000, error)
 [2021/01/15 23:50:13.857] pymongo.errors.DuplicateKeyError: E11000 duplicate key error collection: pymongo_test.test index: _id_ dup key: { _id: 1 }, full error: {'index': 0, 'code': 11000, 'codeName': 'DuplicateKey', 'errmsg': 'E11000 duplicate key error collection: pymongo_test.test index: _id_ dup key: { _id: 1 }'}

Not really sure why yet. Perhaps some tests are mistakenly not dropping the collection/database?

@ShaneHarvey ShaneHarvey force-pushed the PYTHON-1588-give-credit branch from ad538d1 to 11ae3c0 Compare January 16, 2021 01:50
@ShaneHarvey
Copy link
Member Author

Rebased to fix merge conflict in the docs.

@ShaneHarvey ShaneHarvey merged commit 0e250be into mongodb:master Jan 16, 2021
@ShaneHarvey ShaneHarvey deleted the PYTHON-1588-give-credit branch January 19, 2021 19:31
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