/srv/irclogs.ubuntu.com/2011/04/24/#bzr.txt

lifeless:( search selftest is failing00:10
lifelessjelmer: AttributeError: '_LeafNode' object has no attribute 'items'00:10
jelmerlifeless: :-( IIRC it was passing a couple of weeks ago, I did a Debian upload early March00:11
jelmerlifeless: what version of bzr are you using? It passes here with bzr.dev00:12
lifeless2.2.4-0ubuntu100:15
jelmerhmm00:18
jelmerthe error looks vaguely familiar; it's likely somebody fix it in bzr.dev but I don't see any relevant NEWS items00:18
jelmerGiven your comment about commitfromnews I guess you might have been doing the same thing..00:19
lifelessI looked up whether you use oo or รถ for your name in bzr's NEWS00:20
lifelessand noticed it was in multiple files now00:21
lifelesswhich is wh I mentioned commitfromnews00:21
jelmerah00:23
jelmerlifeless: thanks for the review and merge00:23
lifelessmy copy of bzr.dev does this:00:27
lifeless ~/source/baz/bzr.dev/bzr selftest plugins.search00:27
lifeless'module' object has no attribute '_parse_into_chk'00:27
lifelessI'll pull in a sec00:27
lifelesshttps://bugs.launchpad.net/bzr/+bug/707075/comments/2700:29
ubot5Ubuntu bug 707075 in bzr (Ubuntu Lucid) "[sru] lp-propose fails with a 404 error" [Undecided,New]00:29
=== tomaw_ is now known as tomaw
glyphSo, the very first time I try to integrate bzr into an official process for Twisted: https://bugs.launchpad.net/bzr/+bug/76997319:09
ubot5Ubuntu bug 769973 in Bazaar "bzrlib.errors.BzrCheckError: Internal check failed: Cannot add revision(s) to repository: missing chk node(s) for id_to_entry maps" [Undecided,New]19:09
glyphgetting the branch works normally, just not in my shared repository.19:10
mgzbug 485601?19:33
ubot5Launchpad bug 485601 in Bazaar Subversion Plugin "missing chk node(s) for id_to_entry maps" [High,In progress] https://launchpad.net/bugs/48560119:33
mgzpoke jelmer for more info.19:34
mgzcomment #25 there may be useful to you.19:36
mgz...and comment #26 is from you.19:36
glyphDoes 'in progress' mean that he figured out the cause?19:43
mgzit sort of implies it, but I don't know more.19:43
jelmerhi glyph, mgz19:45
jelmerYes, I have figured out the cause. It's basically the thing I'll be working on next week.19:45
jelmerit's the blocker for bzr-svn 1.1.019:46
* jelmer hops on a train19:49
glyphexcellent! thanks, jelmer19:51
glyphOkay, now https://bugs.launchpad.net/ubuntu/+source/bzr-svn/+bug/769992 is gumming up the same process.20:08
ubot5Ubuntu bug 769992 in bzr-svn (Ubuntu) "bzr: ERROR: exceptions.KeyError: 'No such TDB entry' " [Undecided,New]20:08
lifelessjelmer:  bzr st21:51
lifeless'module' object has no attribute '_parse_into_chk'21:51
lifeless'module' object has no attribute '_parse_into_chk'21:51
lifeless/home/robertc/.bazaar/plugins/loom/formats.py:57: DeprecationWarning: __builtin__.type.register_format was deprecated in version 2.4.0.21:51
lifeless  map(_mod_branch.BranchFormat.register_format, branch_formats)21:51
lifelesstype object 'BzrDirFormat' has no attribute 'register_control_format'21:51
lifeless'module' object has no attribute '_parse_into_chk'21:51
lifelessbzr: ERROR: exceptions.AttributeError: 'module' object has no attribute '_parse_into_chk'21:51
lifelessjelmer: tip bzr.dev21:51
jelmerlifeless: that should be fixed with newer revisions of bzr-loom21:53
jelmerlifeless, the deprecation warning / 'register_control_format' thing I mean21:54
jelmerI'm not sure about _parse_into_chk21:54
jelmerlifeless: Can you reproduce this with --no-plugins as well?21:55
lifelessyes21:57
lifelessand after doing a make clean21:57
lifeless  File "/home/robertc/source/baz/bzr-test-fixes/bzrlib/btree_index.py", line 1596, in <module>21:57
lifeless    _gcchk_factory = _btree_serializer._parse_into_chk21:57
lifelessAttributeError: 'module' object has no attribute '_parse_into_chk'21:57
lifelessbzr 2.4.0dev2 on python 2.6.6 (Linux-2.6.35-28-generic-x86_64-with-21:57
lifeless    Ubuntu-10.10-maverick)21:57
lifelessarguments: ['/home/robertc/bin/bzr', 'st', '--no-plugins']21:58
lifelessah22:01
lifelesswrong dir22:01
jelmerI can't reproduce it, neither with nor without compiled extensions and current tip22:01
jelmerah22:01
lifelessI was rebuilding bzr.dev, but running from bzr-test-fixes22:02
lifelessdoh ;)22:02
lifelessjelmer: robertc@lifeless-64:~/source/baz/plugins/loom/trunk$ bzr st22:03
lifelesstype object 'BzrDirFormat' has no attribute 'register_control_format'22:03
lifelessremaining fallout22:03
lifelessah22:04
lifelesscvs22:04
lifelessdone22:04
jelmergreat22:04
lifelessjelmer: did my review of your fixup branch make sense ?22:07
lifelessjelmer: also I meant to suggest, but forgot, that perhaps some folk would want to add in ids via a regex22:07
jelmerlifeless, yes, thanks22:07
jelmerI'll make a few improvements22:08
lifelessjelmer: though thats clearly a future enhancement22:08
jelmeryeah, I had that in mind too. That's what Samba does at the moment.22:08
jelmertrain arriving.. back later22:08
=== JasonO_ is now known as JasonO
mgzjelmer: the twisted guys also filed bug 769992 if you were off for that bit of the chat.22:50
ubot5Launchpad bug 769992 in bzr-svn (Ubuntu) "bzr: ERROR: exceptions.KeyError: 'No such TDB entry' (dup-of: 664085)" [Undecided,New] https://launchpad.net/bugs/76999222:50
ubot5Launchpad bug 664085 in bzr-svn (Ubuntu) "bzr crashed with KeyError in get_revision_paths() on running update from subversion repo" [Undecided,New] https://launchpad.net/bugs/66408522:50
lifelessmgz: whats the story for py3 and you ?22:52
mgzI have a build of their trunk around, but don't use it for day to day programming.22:53
lifelessmgz: I'd like to talk about subunit, unicode and bytes.22:53
mgzsurething.22:53
lifelessthis branch22:53
lifelessbzr+ssh://bazaar.launchpad.net/~lifeless/subunit/py322:53
lifelesshas tres initial work fixed up and additional work from me22:54
lifelesswe have code like this22:54
lifeless:22:54
lifeless-        protocol.readFrom(StringIO(output))22:54
lifelesswhich I'm proposing to change to22:54
lifeless-        protocol.readFrom(BytesIO(output))22:54
lifelessbecause subunit defines a byte protocol not a string protocol; it shouldn't crash if someone shoves crap into it22:55
lifelesswhich any decode-before-processing approach would do22:56
lifelessdo you see any interactions with windows code pages etc if I do this?22:56
mgzyeah, the meaning of StringIO has shifted a bit22:56
lifelesson 2.6 BytesIO will be StringIO22:56
lifelesson 3 io.BytesIO22:56
mgzI've always used it more as a file-like bytestream more than a text stream, in fact I don't think cStringIO does unicode at all22:56
lifelesshttps://code.launchpad.net/~lifeless/testtools/misc/ adds that to testtools22:57
lifelesscStringIO does unicode, but has a wonderful bug if you do cStringIO.StringIO(u"foooo")22:57
lifelessyou then get to read the octets back out22:57
mgzthe only real pain on windows is when the pipe happens to be pointing at a console22:57
mgzwhich generally it won't be for subunit22:57
lifelessin or out? or either ?22:58
lifelessalso I'm again feeling motivated to bitch about the lack of startswith etc on bytes.22:58
lifelessWTF were they thinking/.22:58
mgzpotentially both. there's a wide api that can be used, but generic code uses a bytes-only approach that does mbcs transcoding22:59
lifelessmgz: so, GIGO applies; if we get some pastiche of uncide + a jpeg or whatever in22:59
lifelesswe should preserve it in subunit-filter22:59
lifelessmgz: I'm planning on saying 'we serialise by utf8 for backtraces'23:00
mgzI can't imagine many people will expect typing in a subunit stream to work at all, and printing junk to the console is just an annoyance.23:01
lifelessmgz: and for passing old-style backtraces (the [...] encoding) do a decode(error=replace) for things that need to be passed to python code23:01
mgzwell, did subunit previously do anything special for non-ascii in tracebacks?23:03
lifelessit didn't matter23:03
lifelesspy223:03
lifelessyou could pass ascii around and yawn23:04
mgzah, so you just got whatever bytes you had anyway, and if it was junk it was junk.23:04
lifelessbut remember all the headaches you had on testtools ?23:04
mgzyeah, I just wondered if you encoded anything23:04
lifelessI'm trying to fit in nicely with that :)23:04
lifelesstheres some primitive stuff23:04
mgzso, just using utf-8 consistently will be like a bugfix, no?23:04
lifelessI think I can make that case23:05
mgzbefore you might get non-ascii in a traceback and not know what it is.23:05
mgznow with py3 it'll be utf-8 all the time.23:05
lifelessonce I get over this rage about having to workaround useful functions being removed.23:05
mgzI wouldn't mind a pretty serious cut down of string methods if python had a good alternative for bytes-wrangling23:06
mgzbut when I have to deal with microlanguages is one of the few times I find myself pining for perl23:07
mgzit's annoying how much python needs to be written to do something as basic as interpret a particular http header field correctly.23:09
lifelessyeah23:10
mgzthe diff of the last few revs in that subunit branch looks fine to me.23:11
lifelessyeah, thats the easy mechanical23:12
lifelessnow I'm into23:12
lifeless  File "/home/robertc/source/unittest/subunit/working/python/subunit/__init__.py", line 215, in lineReceived23:12
lifeless    cmd = cmd.rstrip(':')23:12
lifelessTypeError: Type str doesn't support the buffer API23:12
mgzyou got split still?23:13
mgzthat's a workable alternative idiom23:13
* mgz checks23:13
mgzhm, that's just a confusing error message.23:14
mgzcmd = cmd.rstrip(_b(':')) would work, but maybe rearranging is preferable.23:15
lifelessyeah23:18
lifelessI've just tweeted all that ;)23:18
lifelessI really think the balance is wrong.23:18
mgzI think the py3k approach to strings is a bit last-decade.23:23
mgz...or even two decades.23:23
mgzunicode-by-default was the motivating factor for the windows switch to 'wide' apis23:24
LeoNerdExcept they did it in UCS-223:25
mgzusing typing to avoid injection attacks and limit transcoding seems more trendy these days.23:25
mgz^so does Python, LeoNerd. or (in some ways) worse, UTF3223:27
LeoNerdUTF-32 / UCS-4 is fine23:28
mgzwhich is part of the complaint about extra overhead from some applications looking at porting currently.23:28
LeoNerdIt gives constant-width lookup to any codepoint in the string.23:29
LeoNerdIt's UTF-16 that's the killer.. all the bad points about UCS-4 (uses null bytes, inefficient for ASCII) combined with all the bad points about UTF-8 (variable-width encoding)23:29
mgzlots of things are just about moving bytes around, not doing much parsing on them, and the extra allocation hurts.23:29
mgzutf-16 most people don't handle astral characters properly anyway, so there's no extra parsing overhead23:30
mgzit's just sometimes, in ways nearly no one will notice, incorrect.23:30
* maxb lols at "astral characters"23:31
maxbvery apt. I like it23:31
lifelesspython's build on ubuntu is 4-byte chars23:31
lifelessits -terrible-=23:31
lifelesswant to know why bzr uses so much memory? dingdingdingding23:31
mgzyeah, and there aren't handy ways of using more compact data structures in python when that's what you want.23:32
LeoNerdmaxb: You've never heard them called the Astral planes, before?23:32
lifelessthe common case for /some/ apps will be a bunch of kanji or whatever; but the common case for bzr is ascii strings - so we pay 300% overhead for the common case23:32
LeoNerdI was talking about Planes of Unicode on #perl a while ago.. someone made a joke wondering if there's any snakes on them23:33
maxbFirst time I've heard that particular pun23:33
LeoNerdTurns out, yes.. there's two: CJK RADICAL SNAKE and COMBINING SNAKE. :)23:33
lifelessawesome23:33
LeoNerdU+2E9223:34
lifeless\o/ test engine completes now23:34
lifelesstime to fix the tests23:34
lifelessmgz:   File "/home/robertc/source/unittest/subunit/working/python/subunit/__init__.py", line 1141, in _make_stream_binary23:34
lifeless    _make_binary_on_windows(stream.fileno())23:34
lifelessio.UnsupportedOperation: fileno23:34
mgzheh.23:35
mgzif we're lucky... they do that be default now.23:35
lifelessmgz: I've pushed rev 14523:36
mgzif we're unlucky, the rewriters decided people shouldn't be allowed to look at the underlying handles any more.23:36
lifelesswhich triggers that error for me on Ubuntu23:37
lifelessif you want to look at the windows path23:37
mgzmost likely, it'll just need a different spelling.23:37
mgz`sys.stdout.buffer.raw.fileno()` looks like it'll do23:42
mgzwhich is a bit daft just to get `1`23:42
lifeless  File "/home/robertc/source/unittest/testtools/working/testtools/content.py", line 64, in __eq__23:42
lifeless    _join_b(self.iter_bytes()) == _join_b(other.iter_bytes()))23:42
lifelessTypeError: sequence item 0: expected bytes, str found23:42
lifelessrecursion, see under recursion23:43
mgzhm, I remember frowning at that method before.23:43
lifelessone of the content objects has a string the other a bytes23:44
lifelessor possibly both23:44
mgzyeah, and the way it's spelt doesn't tell you which or where.23:45
mgzbut I guess otherwise you're trying to compare lists with different length byte chunks in, which is also a pain23:45
mgzokay, so the previous error was just their heirachy stuff means lots of things have fileno method that will just raise23:50
mgzperhaps switching to `try:_make_binary_on_windows(stream.fileno());except (AttributeError, io.UnsupportedOperation):return;` would work but finding a compatible way to spell that may be hard23:52
mgz`no_fileno = _is_py3k and io.UnsupportedOperation or AttributeError` in long form maybe.23:53
lifelessI'm just chasing lower level things atm23:54
lifelessI can try that in a bit23:54
lifelessunless you have a ubuntu vm or something?23:54
mgzsec, I'll try setting up here then can maybe give you a branch for some specific things.23:55
lifelesshhhha23:57
lifelessand after all the fuss about type safet23:57
lifelessy23:57
lifeless            if cmd in ('test', 'testing'):23:57
lifelessguess what that doesn't do23:57
lifelessif cmd is b'test'23:57
mgzheh.23:59
lifeless  File "/usr/lib/python3.1/unittest.py", line 1395, in startTest23:59
lifeless    self.stream.write(self.getDescription(test))23:59
lifelessTypeError: must be str, not bytes23:59
lifeless>< >< ><23:59

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!