# HG changeset patch # User Martin von Zweigbergk # Date 1562872789 25200 # Node ID 9e0d35d2f7d438cadc97fafdee407ea77dd359a2 # Parent 168c270e8347f6d290f825c31e88bec384d9ed70 py3: read sqlite3 data as bytes The py2 and py3 docs ([1] and [2]) disagree how to get bytes output, but it seems obvious that this should be "bytes" to be compatible with both. [1] https://docs.python.org/2/library/sqlite3.html#sqlite3.Connection.text_factory [2] https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.text_factory diff -r 168c270e8347 -r 9e0d35d2f7d4 hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Thu Jul 11 12:11:43 2019 -0700 +++ b/hgext3rd/evolve/obsdiscovery.py Thu Jul 11 12:19:49 2019 -0700 @@ -495,7 +495,7 @@ return None con = sqlite3.connect(encoding.strfromlocal(self._path), timeout=30, isolation_level="IMMEDIATE") - con.text_factory = str + con.text_factory = bytes return con @util.propertycache diff -r 168c270e8347 -r 9e0d35d2f7d4 hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Thu Jul 11 12:11:43 2019 -0700 +++ b/hgext3rd/evolve/stablerangecache.py Thu Jul 11 12:19:49 2019 -0700 @@ -237,7 +237,7 @@ return None con = sqlite3.connect(encoding.strfromlocal(self._path), timeout=30, isolation_level="IMMEDIATE") - con.text_factory = str + con.text_factory = bytes return con @util.propertycache