stamixthereal commented on code in PR #28675: URL: https://github.com/apache/airflow/pull/28675#discussion_r1063211122
########## airflow/providers/mongo/hooks/mongo.py: ########## @@ -90,15 +85,25 @@ def get_conn(self) -> MongoClient: options.update({"ssl_cert_reqs": CERT_NONE}) self.client = MongoClient(self.uri, **options) - return self.client - def close_conn(self) -> None: - """Closes connection""" - client = self.client - if client is not None: - client.close() - self.client = None + def _create_uri(self) -> str: + """ + Create URI string from the given credentials. + :return: URI string. + """ + srv = self.extras.pop("srv", False) + scheme = "mongodb+srv" if srv else "mongodb" + login = self.connection.login + password = self.connection.password + if login is not None and password is not None: + login = login.encode() + password = password.encode() Review Comment: Sorry for confusing, It works fine with `quote_plus`. I forgot, that I had the encoding errors only with `quote` function. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org