Skip to content

Commit

Permalink
Merge pull request #203 from octoenergy/fix-sqlachemy-set-url-query-s…
Browse files Browse the repository at this point in the history
…tring

Fix update_query_string() returns new URL instance
  • Loading branch information
alexmalins authored Apr 20, 2023
2 parents 0b93676 + 3983de9 commit 893d9d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.1] - 2023-04-20
### Fix
- Issue where URL query parameters were not passed correctly to sqlalchemy for db connections.

## [1.2.0] - 2023-04-06
### Added
- Add support for SQLAlchemy 2.0 by correctly handling `sqlalchemy.engine.url.URL`s, which are now immutable.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from setuptools.command.install import install


VERSION = "1.2.0"
VERSION = "1.2.1"

REPO_ROOT = pathlib.Path(__file__).parent

Expand Down
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 893d9d8

Please sign in to comment.