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

Fix urlsplit python3.7.6 #5222

Merged
merged 4 commits into from
Feb 12, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions rasa/core/tracker_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,17 +639,17 @@ def get_db_url(
URL ready to be used with an SQLAlchemy `Engine` object.

"""
from urllib.parse import urlsplit
from urllib import parse
from sqlalchemy.engine.url import URL

# Users might specify a url in the host
parsed = urlsplit(host or "")
if parsed.scheme:
parsed = parse.urlsplit(host or "")
if parsed.scheme and parsed.hostname:
return host

if host:
# add fake scheme to properly parse components
parsed = urlsplit("schema://" + host)
parsed = parse.urlsplit("schema://" + host)

# users might include the port in the url
port = parsed.port or port
Expand Down