[patch] sqlite3 needs "Conection.text_factory = str"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Hg Plugin |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This is on ArchLinux i386 with Python 2.6.4, bzr 2.0.1-1, mercurial 1.4-2 and the bzr-hg plugin's trunk as of now (revno 267).
With the attached patch applied I am now able to use "bzr upgrade" to turn a Mercurial repo into a Bazaar branch.
Here is what sqlite3 was complaining about when the text_factory was left at its default (the unicode function/
$ bzr upgrade
starting upgrade of file://
bzr: ERROR: sqlite3.
Traceback (most recent call last):
File "/usr/lib/
return the_callable(*args, **kwargs)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
upgrade(url, format)
File "/usr/lib/
Convert(url, format)
File "/usr/lib/
self.convert()
File "/usr/lib/
self.bzrdir = converter.
File "/home/
target_
File "/usr/lib/
find_
File "/usr/lib/
result = unbound(self, *args, **kwargs)
File "/home/
self.
File "/home/
self.
File "/home/
rev.
File "/home/
self.
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
bzr 2.0.1 on python 2.6.4 (Linux-
arguments: ['/usr/bin/bzr', 'upgrade']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
bzrtools /usr/lib/
hg /home/jozef/
launchpad /usr/lib/
netrc_
svn /home/jozef/
*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https:/
including this traceback and a description of the problem.
Related branches
- Launchpad code reviewers from Canonical: Pending requested
-
Diff: 729 lines (+257/-65)17 files modifiedMakefile (+3/-11)
NEWS (+21/-1)
README (+12/-0)
__init__.py (+48/-7)
branch.py (+19/-10)
commands.py (+55/-0)
fetch.py (+6/-4)
idmap.py (+2/-2)
info.py (+2/-2)
mapping.py (+8/-4)
parsers.py (+8/-5)
repository.py (+6/-1)
setup.py (+1/-1)
tests/__init__.py (+9/-2)
tests/test_dir.py (+42/-0)
tests/test_mapping.py (+1/-1)
tests/test_parsers.py (+14/-14)
status fixreleased