This repository was archived by the owner on May 17, 2024. It is now read-only.
This repository was archived by the owner on May 17, 2024. It is now read-only.
Breaks on dsnparse >= 0.2.0 #616
Closed
Description
This happens on python 3.9.7 and 3.10.10 (so basically anything > 3.8 I guess); same behaviour on github action (ubuntu-latest) and mac M1, with the same versions.
❯ data-diff --debug 'postgresql://dbuser:********@localhost:2000/mydb?sslmode=require' 'public.foo' 'snowflake://DBUSER:************@************.eu-central-1/mydb/myschema?warehouse=MY_WH' 'FOO' -k 'id' -c 'created_at' -c 'updated_at' --json --stats
[21:07:51] INFO - Parsing DSN postgresql://airbyte:****************@localhost:2000/*******?sslmode=require with ConnectionURI
[21:07:51] DEBUG - Parsed scheme postgresql
[21:07:51] DEBUG - Parsed authority with 43 characters
[21:07:51] DEBUG - Parsed username dbuser
[21:07:51] DEBUG - Parsed password with 20 characters
[21:07:51] DEBUG - Parsed host localhost with port 2000
[21:07:51] DEBUG - Parsed path /mydb
[21:07:51] DEBUG - Parsed query with 15 characters
[21:07:51] DEBUG - Parsed query_params with sslmode keys
[21:07:51] ERROR - dictionary update sequence element #0 has length 1; 2 is required
Traceback (most recent call last):
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/bin/data-diff", line 8, in <module>
sys.exit(main())
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/lib/python3.9/site-packages/data_diff/__main__.py", line 277, in main
return _data_diff(**kw)
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/lib/python3.9/site-packages/data_diff/__main__.py", line 355, in _data_diff
db1 = connect(database1, threads1 or threads)
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/lib/python3.9/site-packages/data_diff/sqeleton/databases/_connect.py", line 266, in __call__
conn = self.connect_to_uri(db_conf, thread_count)
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/lib/python3.9/site-packages/data_diff/sqeleton/databases/_connect.py", line 173, in connect_to_uri
kw = matcher.match_path(dsn)
File "/Users/dmorel/Library/Caches/pypoetry/virtualenvs/myrepo-_6EoNtbL-py3.9/lib/python3.9/site-packages/data_diff/sqeleton/databases/_connect.py", line 35, in match_path
dsn_dict = dict(dsn.query)
ValueError: dictionary update sequence element #0 has length 1; 2 is required