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
--- 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
--- 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