Skip to content

Commit

Permalink
Fix update_query_string() returns new URL instance
Browse files Browse the repository at this point in the history
This sqlalchemy.engine.url.URL method returns a new URL instance, and
doesn't update in place:
https://github.com/sqlalchemy/sqlalchemy/blob/fc2bcead435a9bf0a2de8e9b15a1bd835f9d7fe4/lib/sqlalchemy/engine/url.py#L360
  • Loading branch information
alexmalins committed Apr 20, 2023
1 parent 0b93676 commit 6f5fd33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tentaclio/clients/sqla_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _connect(self) -> Connection:
database=self.database,
)
if self.url.query_string:
parsed_url.update_query_string(self.url.query_string)
parsed_url = parsed_url.update_query_string(self.url.query_string)
if self.engine is None:
self.engine = create_engine(
parsed_url,
Expand Down

0 comments on commit 6f5fd33

Please sign in to comment.