[00:13] <StevenK> wgrant: Would you hate me for using lp.services.webapp.adapter for this request munging?
[00:17] <wgrant> StevenK: adapter is more to do with the DB
[00:18] <StevenK> wgrant: I can add lp.services.webapp.utils if you wish, I can't see anything close-ish
[00:19] <wgrant> StevenK: Or in publisher?
[00:21] <StevenK> publisher works
[00:45] <StevenK> wgrant: http://pastebin.ubuntu.com/1614625/
[00:46] <wgrant> StevenK: You'll probably only want to refetch when you're called from the API
[00:46] <wgrant> (by using eg. @callwith(from_api=True))
[00:46] <wgrant> Otherwise adding an attachment or release file from the UI will find a request that lacks what it needs, or the field might have a different meaning
[00:46] <StevenK> No, the field name is different
[00:46] <wgrant> Right now, yes
[00:46] <StevenK> It's field.<foo> from the UI
[00:47] <wgrant> Then someone changes it and the world breaks
[00:47] <wgrant> Far better to be explicit here
[00:47] <wgrant> When committing evil, you want to be *really* sure that it's not going to have unintended consequences
[00:47] <wgrant> Also, get_raw_form_value_from_current_request or something
[00:48] <wgrant> refetch_file_content does not well convey the magnitude of the evil
[00:48] <StevenK> wgrant: omg_it_burns_and_refetch ?
[00:48] <wgrant> StevenK: Might even be an idea to assert in the function that it's an API request
[00:48] <wgrant> Just in case
[00:49] <wgrant> It might eventually be needed outside API requests, but the added paranoia would feel nice right now
[00:50] <StevenK> wgrant: And what do you suggest as a name?
[00:51] <wgrant> get_raw_form_value_from_current_request?
[00:51] <wgrant> Maybe throw a 'horrid', 'evil', 'vile' or 'unsafe' in there somewhere
[00:54] <StevenK> Which is horribly long
[00:56] <wgrant> Good
[00:56] <wgrant> Lucky it only has two callsites :)
[00:56] <StevenK> The import is 80 characters
[01:14] <StevenK> And now buildmailman fails?
[01:28] <StevenK> wgrant: buildmailman dies due to:
[01:28] <StevenK> no lists == nothing to do, exiting
[01:28] <StevenK> make[1]: Leaving directory `/home/steven/launchpad/lp-sourcedeps/sourcecode/mailman'
[01:33] <wgrant> StevenK: Is that a problem?
[01:33] <StevenK> Yes, since make run fails
[01:33] <wgrant> Fails how?
[01:34] <StevenK> make: *** [compile] Error 1
[01:34] <wgrant> Have you tried deleting lib/mailman and rerunning?
[01:34] <StevenK> That's the next line
[01:34] <StevenK> Compiling /home/steven/launchpad/lp-branches/handle-invalid-unicode-in-query-string-redux/lib/mailman/Mailman/versions.py ...
[01:35] <StevenK> No updates are necessary.
[01:35] <StevenK> make[1]: Leaving directory `/home/steven/launchpad/lp-sourcedeps/sourcecode/mailman'
[01:35] <StevenK> make: *** [compile] Error 1
[01:43] <StevenK> wgrant: ^ That's after deleting lib/mailman
[01:44] <wgrant> StevenK: Perhaps make clean
[01:46] <StevenK> wgrant: make clean && make lead to the no lists == nothing to do error
[02:01] <StevenK> Handy. Something in my diff causes it
[02:03] <wgrant> StevenK: Hm, but lp.services.webapp.publisher is fairly widely imported
[02:03] <wgrant> So there should be minimal circular issues
[02:04] <StevenK> I'll binary search through the diff after lunch
[03:06] <StevenK> WAT
[03:07] <StevenK> % bzr di lib/lp/services/webapp/publisher.py | head -n 37 | tail -n 1
[03:07] <StevenK> +from lp.services.webapp.servers import WebServiceClientRequest
[03:07] <StevenK> That is what causes buildmailman to lose its mind
[03:08] <StevenK> So I guess it's circular, but eh ....
[03:25] <StevenK> And now the FieldStorage is empty :-(
[03:56]  * StevenK mutters at IProductRelease._getFileObjectAndSize
[03:57] <StevenK> wgrant: It asserts it is passed a file or StringIO
[04:34] <wgrant> StevenK: You're not giving it a StringIO?
[04:35] <StevenK> FieldStorage returns an object that identifies itself as cStringIO.StringO
[04:37] <StevenK> Ah, the critical bug didn't get re-opened when you reverted the fix?
[04:37] <wgrant> No, I forgot to
[04:37] <StevenK> Eh
[04:37] <StevenK> I'll just link the High bug then
[04:38] <wgrant> No
[04:38] <wgrant> Reopen
[04:38] <wgrant> I think
[04:38] <StevenK> And then close the two of them?
[04:38] <wgrant> It fixes both
[04:38] <wgrant> So why not :)
[04:45] <StevenK> wgrant: https://code.launchpad.net/~stevenk/launchpad/handle-invalid-unicode-in-query-string-redux/+merge/146773
[04:45] <StevenK> But I've just realized I don't have an XXX
[04:46] <wgrant> StevenK: Reviewing cjwatson's branch atm (finally!), will do that after
[04:46] <StevenK> Let me file a bug and add an XXX to both callsites.
[04:47] <StevenK> Since you asked me to on the call this morning
[04:47] <wgrant> Yeah
[04:47] <wgrant> It's clearly a terrible hack, so deserves an XXX or three
[04:48] <StevenK> wgrant: Against lazr.restfulclient ?
[04:50] <wgrant> StevenK: LP
[04:50] <wgrant> The hack is in LP
[06:13] <lifeless> flacoste: o/
[07:01] <StevenK> wgrant: Do I get a review now?
[07:04] <wgrant> StevenK: You run it through StringIO in one case but not the other?
[07:05] <StevenK> wgrant: Yes. IBug.addAttachment just wants to read() from it, whereas IProductRelease.add_file actually cares if it's a StringIO or file.
[07:05] <wgrant> StevenK: Ah
[07:05] <wgrant> StevenK: If there's a launchpadlib-based test for add_file, can you extend it to verify correct behaviour?
[07:06] <wgrant> XXX and bug reference in the Function of Doom™ too, pls
[07:08]  * StevenK peers at this horrible doctest
[07:08] <wgrant> Even if there isn't one already, they're pretty short to write (but long to run), so it's probably worth adding one
[07:09] <StevenK> wgrant: There are two sections that add a PRF to firefox, just need to work out how to get the content of the file easily
[07:10] <StevenK> Changing the content of one of the strings would be easy
[07:11] <StevenK> '\x1f\x0cf\xff' seems good enough
[08:50] <adeuring> good morning
[08:58] <jtv> Guten Morgen adeuring
[08:59] <adeuring> hi jtv!
[09:31] <czajkowski> ello
[10:08] <jtv> Hi there czajkowski
[10:11] <czajkowski> jtv: hey hows things?
[10:13] <jtv> czajkowski: nice and busy.
[10:13] <jtv> Also, more expensive than last year.  :)
[10:14] <czajkowski> why's that?
[10:15] <jtv> Just a general observation.  Things are more expensive  than last year.  Apply to any given year.
[10:22] <jml> jtv: deflation has been known to happen.
[10:22] <czajkowski> jtv: I just moved out of london, it brought it down a meer fraction of cost
[10:22] <jtv> jml: Mostly local though.  For the true pessimist there is always a lead lining _somewhere_ in the world.
[10:23] <jml> jtv: :)
[10:23] <jtv> Pessimism: because if failure is your goal, you really can't lose.