Skip to content

Conversation

juliusgeo
Copy link
Contributor

No description provided.

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

Please also update the MongoClient docs to remove the parts about accepting multiple URIs.

@@ -187,6 +187,12 @@ MongoClient cannot execute operations after ``close()``
after being closed. The previous behavior would simply reconnect. However,
now you must create a new instance.

MongoClient raises exception when given more than 1 URI
Copy link
Member

Choose a reason for hiding this comment

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

1 -> one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

# Raise an error when we have more than one URI
if len([i for i in host if "/" in i]) > 1:
raise ConfigurationError("MongoClient() only accepts 1 URI at a "
"time")
Copy link
Member

Choose a reason for hiding this comment

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

I'd say: "host must not contain multiple MongoDB URIs"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -645,6 +645,10 @@ def __init__(
dbase = None
opts = common._CaseInsensitiveDictionary()
fqdn = None
# Raise an error when we have more than one URI
Copy link
Member

Choose a reason for hiding this comment

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

This comment is redundant because the error message says the same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -645,6 +645,10 @@ def __init__(
dbase = None
opts = common._CaseInsensitiveDictionary()
fqdn = None
# Raise an error when we have more than one URI
if len([i for i in host if "/" in i]) > 1:
Copy link
Member

Choose a reason for hiding this comment

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

i->h

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

username, and password present will be used. For username and
a simple hostname. It can also be a list of hostnames but no more
than one URI. Any port specified in the host string(s) will override
the `port` parameter. For username and
Copy link
Member

Choose a reason for hiding this comment

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

We need to make a similar change to the description in the :Parameters: list below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

LGTM

@juliusgeo juliusgeo merged commit 6e7b652 into mongodb:master Oct 5, 2021
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Apr 5, 2022
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Apr 6, 2022
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Apr 7, 2022
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.

2 participants