summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2021-10-01 21:05:35 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2021-10-01 21:05:35 +0000
commit8dbd6736423ac444bcd30d0bc13d989fb3d6c738 (patch)
tree87c5cf0bd71d538e2788f85b018c4de1449de9f6 /lib/sqlalchemy
parent2e6285d8d1d293c841f18313c94e493b2804055c (diff)
parent7f7c0f4ee1c4218fb72dccb7c5176042902c803a (diff)
downloadsqlalchemy-8dbd6736423ac444bcd30d0bc13d989fb3d6c738.tar.gz
Merge "indicate private use of URL.__new__ privately only"
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/engine/url.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py
index d91f06011..488f73952 100644
--- a/lib/sqlalchemy/engine/url.py
+++ b/lib/sqlalchemy/engine/url.py
@@ -85,7 +85,7 @@ class URL(
"""
def __new__(self, *arg, **kw):
- if not kw and len(arg) == 7:
+ if kw.pop("_new_ok", False):
return super(URL, self).__new__(self, *arg, **kw)
else:
util.warn_deprecated(
@@ -151,6 +151,7 @@ class URL(
cls._assert_port(port),
cls._assert_none_str(database, "database"),
cls._str_dict(query),
+ _new_ok=True,
)
@classmethod
@@ -466,6 +467,7 @@ class URL(
for key in set(self.query).difference(names)
}
),
+ _new_ok=True,
)
@util.memoized_property