Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removes sql alchemy dependency and port parts of URL class #1028

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Any, ClassVar, Dict, List, Optional
from sqlalchemy.engine import URL, make_url
from dlt.common.libs.sql_alchemy import URL, make_url
from dlt.common.configuration.specs.exceptions import InvalidConnectionString

from dlt.common.typing import TSecretValue
Expand All @@ -26,6 +26,7 @@ def parse_native_representation(self, native_value: Any) -> None:
# update only values that are not None
self.update({k: v for k, v in url._asdict().items() if v is not None})
if self.query is not None:
# query may be immutable so make it mutable
self.query = dict(self.query)
except Exception:
raise InvalidConnectionString(self.__class__, native_value, self.drivername)
Expand Down