As pointed out in https://github.com/mongodb/mongo-python-driver/pull/1186, the docs page incorrectly says to use urllib.parse.quote() when it should say urllib.parse.quote_plus():
Username and password must be percent-escaped with urllib.parse.quote(), to be used in a MongoDB URI.
This was missed while fixing PYTHON-2973.
- related to
-
PYTHON-2973 Test Failure - MONGODB-AWS Auth InvalidURI: Bad database name
- Closed