Skip to content

Commit de61749

Browse files
hovaescoebyhr
authored andcommitted
Fix a compatibility issue with SQLAlchemy v1.4.42
1 parent 68f3d9d commit de61749

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

trino/sqlalchemy/util.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import json
2+
import re
23
from urllib.parse import quote_plus
34

45
from typing import Optional, Dict, List, Union, Tuple
56
from sqlalchemy import exc
6-
from sqlalchemy.engine.url import _rfc_1738_quote # noqa
7+
8+
9+
def _rfc_1738_quote(text):
10+
return re.sub(r"[:@/]", lambda m: "%%%X" % ord(m.group(0)), text)
711

812

913
def _url(

0 commit comments

Comments
 (0)