Skip to content
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

MOTOR-735 Versioned API connection examples for ecosystem docs #126

Merged

Conversation

prashantmital
Copy link
Contributor

No description provided.

@@ -30,7 +30,7 @@
with open("README.rst") as readme:
long_description = readme.read()

pymongo_ver = ">=3.11,<4"
pymongo_ver = ">=3.12,<4"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to bump this here since 3.11 doesn't have pymongo.server_api. One less ticket!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Can you link MOTOR-699 in the commit message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do! Thanks for pulling up the ticket.

def test_versioned_api(self):
# Versioned API examples
AsyncIOMotorClient = lambda _, server_api: self.asyncio_client(
server_api=server_api, connect=False)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote this to mimic the PyMongo PR - mongodb/mongo-python-driver@048f54d
But I have no idea why we set connect=False? Can we remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's to reduce the overhead of the test. Since the test doesn't need to actually use the MongoClient there's no point in starting all the monitor threads. Let's keep it and add a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@prashantmital prashantmital merged commit b0a79e1 into mongodb:master Jul 22, 2021
@prashantmital prashantmital deleted the MOTOR-735/versioned-api-example branch July 22, 2021 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants