/srv/irclogs.ubuntu.com/2011/05/31/#ubuntuone.txt

=== Tm_K is now known as Tm_T
mandelgood morning!08:11
duanedesignmorning mr mandel08:34
mandelduanedesign: mornng08:36
mandelmorning!08:36
ryemornings08:43
duanedesigno/08:45
=== ehw_ is now known as ehw
faganmorning09:28
=== pedronis_ is now known as pedronis
ralsinamandel: approved provide_credentials_management10:47
ralsinamorning fagan10:47
mandelralsina: superb :)10:47
mandelI'll ask nessita to take a second look.. as soonas I'm done upgrade I'll fix the lint issue with the reactor10:47
ralsinamandel: cool10:47
faganmorning ralsina10:47
mandelralsina: although on linux we do not need the reactor10:47
ralsinamandel: there's also a missing docstring10:48
faganvoidspace was looking for you yesterday to suggest a person for the team10:48
mandelralsina: I dont know why we should even use it.. we do not need twisted at all on linux, it is a Windows detail...10:48
faganralsina: he said he would send a mail10:48
ralsinafagan: yes, will talk to him today10:48
faganralsina: nice im blocked by the keyring bug thats fixed in trunk10:49
faganralsina: thats the bug that was stopping me from logging in10:49
ralsinafagan: hmmmm ok? ;-)10:50
faganralsina: hah well im just going to install trunk and get back to it10:50
ralsinafagan: ok. BTW, sent feedback to your college today. I really want to make you do more developer-ish stuff, but I am swamped. Will try harder on sprint10:51
faganralsina: its cool, did you cc me on the email or would you prefer to keep it between you and them10:52
ralsinafagan: I am not sure what the etiquette here is, but it was nothing substantial ("our codebase is difficult, he has been doing this and that")10:52
faganralsina: ah ok then10:53
faganralsina: thats fine then :)10:53
faganWell on the bright side I think I know how all the puzzle pieces fit now10:53
fagansince the twisted stuff10:54
faganoh no the u1 client isnt detecting my internet connection since the update on the network manager in 11.10 last night10:58
faganbrb11:02
faganback and nope restarting doesnt help looks like someone will have to debug it with me11:06
mandelralsina: which version of ubuntuone-dev-tools do you have?11:08
faganmandel: im on 0.1.3+r32-10~natty1 which is the nightly if that helps11:11
ralsinamandel: give me 1'...11:12
ralsinamandel: 0.1.3+r32-10~natty111:12
fagansame as me then11:12
mandelralsina: can you do a u1trial -h for me and tell me if you have a reactor option11:12
ralsina  --reactor=REACTOR     Run the tests using the specified reactor.11:13
mandelralsina: ok, thx11:14
* fagan break 11:15
mandelralsina: do you know which branch from alecu was giving hi issues with the QNetwork thing11:34
ralsinamandel: I would have to look. In 2'?11:34
mandelralsina: sure, I just wanna see if merging with my branch fixes it11:36
ralsinamandel: I don t think alecu ever told me the name11:36
mandel:(11:36
ralsinalet's check his branches!11:38
ralsinamandel: I would bet https://code.launchpad.net/~alecu/ubuntuone-control-panel/tx-web-client11:39
mandelralsina: do you remember what was the issue? it was something related to threads, right?11:50
ralsinamandel: unresponsive UI, IIRC11:50
mandelok11:51
mandelralsina: I'll wait for alecu to be back, atm it seems to work but I might be missing something11:53
ralsinamandel: good11:53
ralsinamandel: so, is anything missing to hook backend to frontend now?11:53
ralsinaassuming all these branches land, I mean11:55
mandelralsina: I have to get the creds approve, and write the sd tool, right?11:55
ralsinamandel: yes11:56
ralsinawe still have a couple of hours before the .ar people arrive. So maybe I can help you with something11:58
mandelralsina: I'm going to take a look at sd tool first, lets see how far I get, then look at alecus problem and hope is fixed11:58
ralsinaok11:59
mandeltoday seems to be a happy day so far :)11:59
ralsinamandel: let's keep it that way then :-)12:00
mandelhehehe12:00
ralsinamandel: I am going to take a look at making py2exe work with the control panel. Any suggestions?12:04
mandelralsina: do a normal setup.py and we can work from there… there are going to be issues with the plugins, that means that the icons should be png and not jpg12:05
mandelralsina: but that should not be a problem12:05
ralsinamandel: ok, no problem there12:05
ralsinamandel: you were using distutils-extra?12:06
mandelralsina: yes, that works ok12:06
ralsinamandel: but I need to do it on windows, does it exist there?12:07
mandelralsina: yes, and I patched it to make sure that ctypes works :)12:07
ralsinamandel: ok12:07
ralsinamandel: use_correct_reactor tries to use dbus on windows?12:08
ralsinaor should I just go with trunk?12:08
mandelralsina: atm it does I need to change that in a diff branch, but first we need sdtool ready12:08
ralsinamandel: ok, so no exe packaging until after that branch. I will start it on linux12:09
* mandel walks dog12:17
Mahoru`Tsunemihello12:27
Mahoru`Tsunemii need some help12:27
Mahoru`Tsunemii'm new to u1 and i start the sync12:28
Mahoru`Tsunemion a distant computer the sync is now over, and i need to connect the sync with the PC i have here12:28
Mahoru`Tsunemibut i cant because le folder is already "full" of data12:28
Mahoru`Tsunemi(there is disk space, i just don't have other word :) )12:29
duanedesignhello Mahoru`Tsunemi12:29
Mahoru`Tsunemihello duanedesign :)12:29
nessitaHello everyone!12:31
duanedesignMahoru`Tsunemi: is this data that you put in your Ubuntu One folder on the 'distant' computer? Or is this data you uploaded via one.ubuntu.com?12:31
Mahoru`Tsunemiduanedesign: sorry for the wait12:49
Mahoru`Tsunemiso12:49
Mahoru`Tsunemiit's in a folder that was marked as sync12:49
Mahoru`Tsunemiand the sync is finished12:49
duanedesignMahoru`Tsunemi: ok so the files are showing up in the cloud (one.ubuntu.com) but not on your other computer?12:56
Mahoru`Tsuneminot that's not the problem12:56
Mahoru`Tsunemii have the data on the distant computer and on this one12:56
duanedesignok12:57
Mahoru`Tsunemiand i want to have this computer synced12:57
Mahoru`Tsunemibut i can't check the "sync this folder"12:57
Mahoru`Tsunemi(it's greyed)12:57
Mahoru`Tsunemi(because there is data in this dir :) )12:57
faganme13:00
duanedesignMahoru`Tsunemi: is this a  folder in your Home directory?13:01
Mahoru`Tsunemiyup13:01
Mahoru`Tsunemi~/Documents13:01
Mahoru`Tsunemi:)13:01
duanedesignMahoru`Tsunemi: can you run this command in a Terminal to see if the folder is listed:  u1sdtool --list-folders13:02
Mahoru`TsunemiFolder list:13:02
Mahoru`Tsunemi  id=8ede6cbe-78c7-4a9d-bf09-de479162f254 subscribed=False path=/home/mahoru/Documents13:02
duanedesignok that is the folder... but subscribed is False and we want true.13:03
Mahoru`Tsunemiyup13:03
Mahoru`Tsunemi--subscribe-folder ?13:04
duanedesignMahoru`Tsunemi: yes that might provide a workaround13:04
nessitafagan: still one hour to go13:04
faganralsina: im going to be off for standup (I thought it was at 1 whoops) I have a eye test appointment  and some errands to do13:04
ralsinafagan: ok13:05
fagannessita: yeah realised that forgot13:05
fagan:D13:05
nessita:-)13:05
duanedesignMahoru`Tsunemi: u1sdtool --subscribed-folder=8ede6cbe-78c7-4a9d-bf09-de479162f25413:05
Mahoru`Tsunemithat's i done :)13:05
duanedesignerr --subscribe-folder13:05
duanedesign:)13:05
Mahoru`Tsunemierk13:05
Mahoru`Tsunemilot lot lot of upload to do :/13:06
Mahoru`Tsunemihum13:10
Mahoru`Tsunemiupload are fast13:10
Mahoru`Tsunemimaybe there is only a hash check :)13:10
ralsinaMahoru`Tsunemi: if someone else has uploaded the same file, it's not "really" uploaded again13:12
Mahoru`Tsunemi:)13:14
Mahoru`Tsunemiand, u1 has problem with accentued file name ?13:15
Mahoru`Tsunemi(LCA - Linux sécuriser un réseau.pdf)13:16
ralsinaMahoru`Tsunemi: shouldn't!13:18
Mahoru`Tsunemibecause i think i have uploaded this file a couple times :)13:18
nessitaralsina: 2 more question re QT13:28
ralsinanessita: shoot13:28
nessitaralsina: waitM RING BELL13:29
nessitaoops13:29
ralsina:-)13:29
nessitaI'm back!13:42
nessitaralsina: so, I was saying. Do you know of a pre-defined method to "humanize" bytes?13:42
nessitaie 1024 bytes to be 1Mb13:42
ralsinanessita: let me check13:42
nessitaetc13:42
nessitaralsina: Glib has now that even handles internationalization :-) (That's why I ask instead of home-implementing it)13:43
ralsinaapparently not13:43
ralsinathere are some tiny implementations but of course may be too naive13:44
nessitaralsina: second question. In a treewidget, how can I make a column to be wider by default? even better, to be as wide as possible in order to try to make the text in it to be all visible13:46
ralsinayou can set one column to use all available width, let me find the API13:47
ralsinanessita: first, get the widget's header, using header()13:48
ralsinathen set stretchlastsection to false13:48
* nessita does13:49
ralsinathen (let me find it ;-)13:49
ralsinathen, for the column you want to be biggest, set it's resizeMode to QtGui.QHeaderView.Stretch13:50
ralsinathat is using header().setResizeMode()13:50
ralsinathe header is a QHeaderView, documented here: http://doc.qt.nokia.com/latest/qheaderview.html#setResizeMode13:50
nessitaralsina: perfect, I'll go from here. Thanks a lot!13:51
ralsinahappy to help!13:51
=== m_conley_away is now known as m_conley
dobeyhmm13:56
nessitadobey: good morning to you too :-)13:57
ralsinadobey: hmm to you too!13:57
dobeybuenas dias13:57
nessitabuenos días!13:57
nessita(the days are masculine)13:58
nessita:-)13:58
ralsinahowever, mornings, evenings and nights are femenine. Wonder how that works.13:58
alecuhello!13:59
nessitahello alecu!13:59
mandelalecu: ping14:00
alecumandel, pong14:00
alecume14:00
mandelme14:00
mandelalecu: which was the branch you were having issues with the reactor?14:00
dobeyme14:00
mandelalecu: I'd like to test my branch with your issues and see what happens14:01
nessitame14:01
dobeymandel: any that use qt reactor and dbus14:01
nessitaralsina, thisfred?14:01
ralsiname14:01
thisfredme14:01
alecumandel, let me find it14:01
ralsinaI have fagan's to14:01
ralsinatoo^14:01
alecuDONE: a few reviews, did some debugging to understand qtreactor+dbus issue, started working on "devices" tab, did pre-sprint laundry14:02
alecuTODO: finish "devices" branch14:02
alecuBLOCKED: no14:02
alecuNEXT: mandel14:02
mandelDONE: Reactor on Windows and Linux for control panel. Started with sd on windows.14:02
mandelTODO: finish sd on windows.14:02
mandeltest reactor with alecus branch14:03
mandelBLOCKED: no14:03
mandelnessita: please14:03
nessitaI think dobey is next14:03
nessitadobey: go!14:03
mandeldobey: no, I wanna try one that uses a threaded select reactor and dbus14:03
dobeyλ DONE: holiday14:03
dobeyλ TODO: bug #789299, bug #789300, bug #771488, more magic14:03
dobeyλ BLCK: None.14:03
ubot4`Launchpad bug 789299 in ubuntuone-dev-tools "DBusTestCase sometimes connects to real session bus (affects: 1) (heat: 6)" [Critical,In progress] https://launchpad.net/bugs/78929914:03
ubot4`Launchpad bug 789300 in ubuntuone-dev-tools "DBusTestCase needs to work with Qt main loop as well (affects: 1) (heat: 6)" [Critical,In progress] https://launchpad.net/bugs/78930014:03
ubot4`Launchpad bug 771488 in ubuntuone-dev-tools "u1trial should unset GTK_MODULES (affects: 1) (heat: 4)" [Medium,In progress] https://launchpad.net/bugs/77148814:03
dobeynessita: you14:04
nessitaDONE: swap day. Last Fri: tons of QT work on modelling the Cloud Folders tab. Mumble meeting with ralsina, mandel and alecu to re-estimate windows control panel remaining work.14:04
nessitaTODO: finish Cloud folders tab, add tests to that, catch up with the rest of the team.14:04
nessitaBLOCKED: nopes14:04
nessitaNEXT: ralsina14:04
ralsinaDONE: reviews, meetings, helped bits with Qt, lost internet half a day yesterday, so working longer today. TODO: try to figure out how we are going to make everything work, BLOCKED: no, I think .14:04
ralsinanow fagan's: DONE14:04
ralsina* Tried to figure out why I couldnt login to u1 on 11.10 and figured out it was the keyring bug that dobey fixed in trunk.14:04
ralsina* installed trunk14:04
ralsina* found I think a bug where the client doesnt detect that I have an internet connection (I guess it might be the nm update that happened or something but I dont know)14:04
ralsinaTODO14:04
ralsina* debug the bug or find out whats causing the issue (?)14:04
ralsina* payroll14:04
ralsinaBlocked14:04
ralsina* nope14:04
dobeyit's not fixed in trunk14:04
ralsinathisfred?14:05
thisfredDONE: memorial day TODO: file bugs for u1-unity integration improvements and fix them, some assorted other bugs to look at/triage/fix BLOCKED: no14:05
ralsinaBTW: network manager in O broke our "are we connected" detection.14:05
mandeldobey: my irrc client crashed, did you get my last message?14:05
dobeyyes i know NM broke us too14:05
dobeymandel: about select reactor + dbus?14:06
nessitaralsina: ack, we can fix after windows, right?14:06
ralsinanessita: indeed14:06
alecuralsina, we should let fagan know that the keyring access is also broken, so he'll have no luck either on O.14:06
mandeldobey: yes, about trying to use a threaded select reactor instead with integration in the Qt main loop14:06
alecuor perhaps not ;-)14:06
ralsinaalecu: yeah14:06
nessitaalso, NOTE: I'm going today to university instead of tomorrow (I'm leaving in 15 minutes, so speak now! :-))14:06
dobeymandel: well, there are a couple bugs in devtools14:06
mandeldobey: hmmm what kind of bug?14:06
dobeymandel: i expect in that case you'll still have similar issues :)14:07
mandeldobey: heheh common share them ;)14:07
alecunessita, if resizing icons and getting html labels right is too much trouble on the tree widget, I suggest doing something similar to the "devices" tab.14:07
dobeymandel: 789299 and 78930014:07
nessitaalecu: what did you do there?14:07
alecunessita, I'm still working on it, but it's a "device" widget that gets included many times inside a scroll-widget.14:08
alecunessita, (a scroll-something-whatever-its-name-widget)14:08
ChipacaFWIW, I'm in 11.10 and the only issue i have is with NM14:08
Chipacaand that's workaroundable with dbus-send14:08
Chipacaas in http://askubuntu.com/questions/45814/network-manager-0-8-999-and-ubuntu-one14:09
alecunessita, that way you'll have the icon size you want plus the html labels plus disabling the way you want.14:09
nessitaalecu: I already implemented all that using stuff from the qtreewidget, but I'll take a look to what you're doing :-)14:09
mandeldobey: ok, looking14:09
mandelnessita: can you re-review the branch wth the creds management tool?14:10
ralsinayes, for up to a few dozen rows, that solution is workable14:10
dobeyChipaca: lies :)14:10
nessitamandel: yes! but as soon as I get back from Uni, I'm leaving in 10. Or do you need it sooner?14:11
Chipacadobey: i swear!14:11
alecuralsina, is there any hard limit to it?14:11
ralsinaalecu: no, just that when you start having hundreds of widgets, things get slow14:11
alecuralsina, like X's 32768 pixel height limit on widgets?14:11
alecuralsina, ok.14:12
ralsinaalecu: I don't think scrollviews are limited like that for the content, so just apply common sense ;-)14:12
alecuralsina: apply(commonsense, widgetlist) ?14:13
ralsinaalecu: ha!14:13
mandelnessita: I can wait, I'll move to something else14:13
dobeyhuh14:13
alecuralsina, mandel, all: can I have some reviews on this branch? https://code.launchpad.net/~alecu/ubuntuone-control-panel/tx-web-client/+merge/6288914:14
mandelalecu: is that the one that gave you problems with the reactor?14:15
ralsinaalecu: on it14:16
alecumandel, the problems with the reactor I had were related to the bug 789300 that dobey is working on.14:16
ubot4`Launchpad bug 789300 in ubuntuone-dev-tools "DBusTestCase needs to work with Qt main loop as well (affects: 1) (heat: 6)" [Critical,In progress] https://launchpad.net/bugs/78930014:16
alecumandel, what I found is that the QApplication has to be created before the qt reactor is installed14:17
alecumandel, that way the threading warnings do not show up14:18
nessitaok, I'm leaving for teaching duties. See ya'll in about 3~ hours!14:18
alecu(and everything ends up fine, with no segfaults)14:18
dobeyalecu: --gui does that14:22
mandelalecu: yes, that is in the documentation of qt14:23
mandelyou always have to create the QApplication first otherwise the reactor will create a new QCoreQpplication that does not take care of the UI events14:24
mandelis in the few first ines of the README of the qtreactor14:24
mandelalecu: was that the only reason?14:24
mandelI mean the only problem you had?14:24
ralsinaalecu: seems to work for me14:25
dobeywhat my problem is, is that i can't seem to get the tests to disconnect from the dbus-daemon fast enough :(14:25
dobeyand i am not sure how to fix that14:25
alecudobey, that's weird. That never happened on the glib dbus tests14:26
alecudobey, are you returning a deferred from the tearDown function?14:26
dobeyalecu: yes it is. it's just not so much visible with glib, since the DBusTestCase client connection is using the glib main loop14:27
alecudobey, but the dbus "disconnect" calls are blocking... so it should not be a problem.14:29
alecudobey, is this happening because the tests are not connecting to the test daemon, and connecting to the session daemon instead?14:29
alecudobey, perhaps the "not disconnected" is not your process but another process on the real session bus.14:30
mandeldobey: but the qtreactor is using the Qt main loop, right? so if you use the Qt dbus implementation it should work, or am I missing something?14:31
dobeyalecu: no, it doesn't matter which one they connect to14:31
mandelalecu: we actualy do not need to use the reactor on linux, right?14:31
dobeyalecu: and it's definitely the tests not disconnecting fully, because the amount of connections goes up with each following test14:32
mandelalecu: since the IPC is dbus, we can tell the code to just use the twisted reactor on windows and not on linux14:32
alecumandel, yeah, we can do that for now.14:32
dobeymandel: that's another problem. we need to split up the DBusTest case, so that we have a DBusGTestCase and DBusQtTestCase or something like that, both inheriting from a DBusTestCase14:32
alecudobey, mandel is right: we don't need dbus-qt for the windows port, so if it keeps giving trouble we can safely get rid of it.14:34
mandelalecu: it would not just be for now, since we do not use twisted for any type of communication we will never need it on linux, just windows.14:34
dobeyalecu: it doesn't matter because we're still doing qt stuff on linux also14:34
alecudobey, right, but we won't be doing qt+twisted+dbus in the same process.14:35
dobeyalecu: yes we will.14:35
mandelwe should not use twisted at all on linux14:35
alecudobey, and we can solve the dbus+qt issues later.14:35
alecudobey, if it keeps giving trouble: no.14:35
dobeyalecu: not in live install perhaps, but the tests are run with a reactor; they have to be.14:35
dobeyalecu: unless we just stop running the tests and you write a different test runner that only uses unittest+qt+dbus or something, instead of the twisted test runner14:36
alecudobey, we can have the qt tests running in a different way... exactly.14:36
dobeyi don't even want to begin thinking about that mess though :(14:36
mandelyes, I would not do that...14:37
dobeyalecu: and either way, we still need to fix several of these issues anyway14:37
alecudobey, right, but we don't need it *now*.14:37
dobeywell, we do, but whatever14:37
gordhi all, me again, ubuntu one has gone crazy :) it just dies after you try and start it, ie: using u1sdtool -s or -c or anything, it starts, then dies. grepped http://paste.ubuntu.com/615344/ from syncdaemon-error.log which seems to be the cause14:38
dobeygord: are you on O?14:38
gorddobey, still on natty14:38
dobeygord: and not using the gnome3 ppa?14:38
alecudobey, we currently have to run the tests twice, because we can't have the qt and the glib reactors installed. So I say we do the dbus part of the tests using the glib reactor, and the qt part of the test on their own.14:39
gorddobey, nope14:39
dobeygord: ok, good; then hopefully someone can help you. might be due to today being a server rollout day though.14:40
mandelalecu: getting back to your issues with the reactor, what was the problem, just hte treads and the fact that you had to create the QAppliation first?14:40
alecumandel, the issue had to do with the initialization order.14:41
mandelalecu: well, is a feature from the qtreactor, rather than a bug…14:42
dobeyalecu: well, i don't understand what that has to do with fixing the obvious bugs in devtools.14:42
alecumandel, no, wait, there's more: you could not even define any class that derives from dbus.service.Object14:43
mandelalecu: do you have some code that shows that error?14:43
alecuyou have to make sure that the DBusQtMainLoop and the QtApplication are created before even doing any class xxx(dbus.service.Object).14:44
alecumandel, I have a bit of code, yes.14:44
mandelalecu: may I see it to try to understand the error?14:45
alecumandel, sure... I'll push in a minute.14:45
mandelcool14:45
dobeyalecu: well, the main() should be creating a QApplication and setting up DBusQtMainLoop(), no?14:47
* fagan back 14:48
dobeyalecu: gtk+/glib isn't really any different in that respect14:48
fagani have to go again to pick up glasses in an hour though14:48
alecufagan, reading glasses or drinking glasses?14:50
faganalecu: well seeing far away glasses14:51
fagannot really reading glasses14:51
mandeldobey: indeed, that seems perfectly logical14:51
alecudobey, right. Main() should be creating QApplication and DBusQtMainLoop. But you can't import any module that defines a class derived from dbus.service.Object till the QApplication has been created.14:53
faganok so who is going to help me figure out why u1cp doeesnt think im connected to the internet14:54
alecumandel, dobey: https://code.launchpad.net/~alecu/%2Bjunk/qt-dbus-fails/14:54
dobeyalecu: well importing  should be fine, no? It's instantiation that should fail14:54
alecudobey, no.14:54
alecudobey, import is fine for glib, but fails for qt.14:55
alecudobey, if you run "fails.py" in the branch I pasted above it shows the error.14:55
alecuuh.,14:56
alecuI guess you are right :P14:56
ralsinafagan: it's a change in network manager14:56
faganralsina: ah ok then14:57
faganralsina: then that takes away 1 work item for me :D14:57
alecudobey, anyway, instantiation does not fail, it just prints a warning.14:57
faganIll sort payroll then14:57
mandelalecu: looking14:57
dobeyalecu: also, why did you use qtreactor for that test instead of regular qt loop? :)14:58
dobeywell, anyway, i was right :)14:59
alecu:P14:59
dobeyso fix your code. and weird that it doesn't raise something, yeah14:59
alecuIt prints a warning, but it fails, because nothing gets exported on the bus... let's see.15:01
dobeywell, trying to do something with those dbus interfaces later will fail, but it should give you some way to handle the problem right there, instead of being a latent error15:02
* alecu needs to go to read the dbus decorators' source15:04
alecuI'll do it some other day.15:04
dobeyit is complicated; but i don't think that warning is coming from the dbus decorators15:05
dobeyor well, not directly. i think it's coming from the dbus.mainloop.qt code, also indrectly15:06
mandelalecu: why do you import gobject?15:07
faganok payroll done ralsina have anything for me to do15:08
alecumandel, because that snippet was converted from a glib dbus sample.15:08
fagani have a little less than an hour before I have to run again15:08
ralsinafagan: find out when network manager changed online detection for me, please ;-)15:08
faganralsina: cool15:08
dobeygrmbl grmbl15:08
dobeyoh bother, i have to buy postage stamps today15:09
faganralsina: ok so the change as now they have states and they are all listed here http://projects.gnome.org/NetworkManager/developers/migrating-to-09/spec.html#type-NM_DEVICE_STATE15:15
ralsinafagan: ooooook15:16
ralsinafagan: check if there is a bug, if not create it and add that link to it, please15:16
ralsinabug on us, not on NM15:16
faganill create it id say no one is on 11.10 yet15:16
dobeylots of people are on 11.10 yet15:18
dobeyand i think it's also an issuse in the gnome3 ppa on 11.0415:18
fagando they have network-manager updates in that ppa?15:18
mandelalecu: so if I understand correctly the issue is that if you don't create the QApplication at the very beggining  you get the warnings and  the dbus code does not work right?15:19
dobeyfagan: i think so now15:19
dobeymandel: it's if you don't create the QApplication before instantiating the dbus objects15:19
dobeymandel: when using DBusQtMainLoop15:20
mandeldobey: yes, but that makes complete sense, the DBusQMainLoop requires QThreads and a QThreads needs to know the instance of the application to be able to work15:21
dobeymandel: right15:21
mandeldobey: then I see no problem, sorry, is just that the code is wrong15:22
dobeymandel: problem is that it's just a stupid warning on stdout or stderr it seems, when it should probably raise an exception15:22
dobeymandel: if only to tell the programmer "hey, you're doing it wrong numbskull!"15:22
mandeldobey: hahaha true, that is a shitty way to tel someone he is doing it wrong15:23
faganBug #79071715:23
ubot4`Launchpad bug 790717 in ubuntuone-client "Changes to the network manager break network detection (affects: 1) (heat: 6)" [Undecided,Confirmed] https://launchpad.net/bugs/79071715:23
* fagan grabs some food 15:23
dobeymandel: que ella eso! :)15:23
mandelhahaha15:26
mandelalecu: then I'm goingto change the code that adds the correct reactor for you to use, and we will see what is going on15:26
mandelalecu: I though you had a more complicated issue and did a qt + twisted integration using a diff reactor because there was a bigger issue15:27
alecumandel, I'm back.15:29
mandelalecu: I have a branch with the reactor installing according to the platform that I'll push and I'd like you to take a look, if that is ok I'll like to move to remove the Dbus main loop from main and move it in a platform specific part15:34
ralsinaok, I am about to take a break. Anyone need something from me right now?15:34
mandelalecu: I'd like to be able to show the UI on windows by this afternoon15:35
mandelwith no backend work at all, just Ui15:35
ralsinaalecu, mandel: yes, that would be good news15:35
alecumandel, cool15:35
* fagan goes to get glasses15:44
mandelI officialy hate that importing the reactor installs it, that i ugly ugly guly...15:58
dobeyhrmm16:02
dobeyall this defer.inlineCallbacks stuff is causing problems16:02
dobeymandel: the default select reactor, you mean?16:02
alecudobey, how is inlineCallbacks causing problems?16:03
mandeldobey: yes, is a pain, they should allow you to import the reactor and then install what ever you wanted, I cannot see the reasoning behind the current implementation16:03
dobeyalecu: in the DBusTestCase stuff16:04
dobeyalecu: i am not sure how to explain what i am seeing though16:05
dobeyalecu: because i don't know why the current code is designed the way it is16:05
dobeyi think because of ubuntuone-client, but sso and cp aren't doing stuff the same way16:07
* dobey tries u1client tests with his devtools branch16:08
* fagan back 16:09
mandelalecu: can you take a look at: https://code.launchpad.net/~mandel/ubuntuone-control-panel/use_correct_reactor/+merge/6296116:14
dobeybbiab, lunch time16:29
mandelalecu: ping16:39
alecumandel, pong16:39
mandelalecu: did you take a look at the merge proposal I sent you?16:40
alecumandel, not yet... gimme me a few minutes.16:46
faganmandel: I could look at it...16:47
mandelalecu: ok, I need to go to walk the dog and some errands, will be back later to fix any commnets and try to get the control panel running on windows16:47
* mandel walks dog + others16:47
alecumandel, ok, cool.16:47
=== beuno is now known as beuno-lunch
faganEOD17:32
dobeyback17:32
* nessita is back from U17:52
dobeyhrmm17:59
dobeyi think windows updated bricked my windows 7 install17:59
AJenbodobey, did you remember to do the happy dance while it was updating?18:01
dobeyoh, now the .. is moving on the update/boot screen, but the hdd light isn't blinking so much18:01
cwayneello18:02
dobeyhi cwayne18:02
cwaynei just have a quick question, is the hash that the rest api gives you when you GET a file/folder md5 or sha118:02
AJenbodobey, yeah i does that fore some of the big onces, not really sure what it is wating for18:03
nessitamandel: ping18:12
=== beuno-lunch is now known as beuno
dobeyi feel like my laptop is crying18:17
dobeysigh18:27
=== m_conley is now known as m_conley_away
dobeydamn, this update better be "upgrading to windows 8" or something18:47
dobeyit has been running for about an hour now, and is still on "Installing update 1 of 12 .. .. .."18:48
nessitamandel, ralsina: ping?18:54
nessitadobey: hey there. Were there any updates regarding the isssues we were having with devtools + qtreactor + dbus?18:55
nessitadobey: do you need some help?18:55
dobeynessita: i just proposed https://code.launchpad.net/~dobey/ubuntuone-dev-tools/dbus-priv/+merge/6302218:56
nessitadobey: reviewing18:57
dobeynessita: it's partial fix (only one of the issues), but helps a lot18:57
nessitadobey: right, this doesn't fix the cleanup on tearDown, no?18:57
dobeyawesome; now my laptop's screen is just black :(18:57
dobeynessita: right, there are some very weird issues with the cleanup issue; and i'm not sure i understand everything well enough, and tcole hasn't replied to my earlier ping yet18:58
dobeyand i haven't seen him on irc at all18:58
nessitadobey: testing the branch now... (code looks OK, I would add the actual value of DBUS_SESSION_BUS_ADDRESS to the execption string)18:59
nessitaexception*18:59
tcoledobey: ?19:00
dobeytcole: so i think the inlineCallbacks in the DBusTestCase that you added is causing more issues19:00
tcoledobey: it might be *exposing* more issues, but believe me it is the correct thing19:01
tcoledobey: there's a problem with the way that super() chains in trunk, b/c of testtools & testresources bugs :(19:02
dobeytcole: hrmm, when I get rid of it, and some other code in that testcase though, everything seems to work as expected in sso-client, control-panel, and u1client19:02
tcoledobey: I have a branch that sorts that out too, but I needed all of these things in the various projects before I could pull them all together19:02
tcoledobey: argh, well, those tests may have been written wrong19:02
tcoleadapted to the incorrect behavior or something19:02
tcole*believe me* that chaining deferreds to the parent class setUp is correct19:03
dobeytcole: is there a specific issue i can replicate which you were fixing, to see if my changes break it or not, so i can understand all this insanity a bit better?19:03
tcoledobey: no, it's just that you're supposed to wait for the parent class setUp to complete before setUp returns19:03
tcoledobey: and we weren't doing that there19:03
tcoledobey: it's part of the defined interface for twisted.trial.unittest.TestCase19:03
dobeytcole: but i think the yield does that, right? what does inlineCallbacks have to do with that?19:03
tcoledobey: inlineCallbacks and yield go together19:04
tcoledobey: the yield makes the function a generator, and inlineCallbacks massages that back into a function that returns a deferred19:04
dobeyhmm19:06
* dobey deletes a bunch of code, makes some changes, and hopes it works19:06
tcoleit isn't strictly necessary to use yield+inlineCallbacks to do this, but it yielded a smaller diff19:07
tcole(no pun intended)19:07
nessitaalecu: do you know about mandel or ralsina?19:10
nessitaare they gone for the day? are they coming back?19:10
alecunessita, I know they are both bearded.19:11
nessitaalecu: well, mandel mentioned he shaved a while ago, so who knows!19:11
dobeyheh19:11
alecunessita, mandel said he was coming back after walking the dog and some errands.19:11
alecuoh, right.19:12
alecunessita, and ralsina said he was taking a break.19:12
nessitaack, thanks19:12
alecuhe didn't specify how long19:12
nessitaI'll wait for them eagerly :-)19:12
nessitaalecu: how are your cp stuff going?19:12
alecunessita, weird. I'm getting a "Segmentation fault" after adding some lines of python code, so I'm not happy.19:13
nessitaalecu: is there any dbus involved?19:14
alecunot at my layer, but surely in the backend.19:14
nessitathat sucks19:14
alecunessita, perhaps I need to fake that part, like you did, right?19:14
nessitaright19:14
nessitaalecu: any odea in which layer you have some dbus?19:15
nessitaidea*19:15
dobeyhrmm, no love19:15
nessitadobey: need help? I'm skilled with yields and inlineCallbacks19:15
alecunessita, backend.devices_info is the one calling syncdaemon thru dbus.19:16
alecuthat's the issue :-(19:17
nessitaalecu: you can use my branches19:17
dobeynessita: i think i need a miracle19:17
nessitaalecu: and that will abstract you from dbus. Please merge trunk in19:17
nessitadobey: no way :-). Wanna be more specific? I may help19:17
nessita(at least I can try)19:17
alecunessita, will do, thanks!19:18
nessitaalecu: merging the last branch of mine that landed this morning, there is no more DBus for syncdaemon (except for the StatusChanged signal). Then, if you look at:19:18
nessitagui/qt/gui.py19:18
nessitayou will find that I fake the SyncDaemonTool patching the "system" one19:18
nessitaand then you can add all the fixed info you need19:18
nessitato run IRL, that is19:19
tcoledobey: if it aids understanding, these two implementations of setUp are functionally equivalent: https://pastebin.canonical.com/48004/19:20
tcoledobey: oops19:21
tcoledobey: hang on19:21
tcoledobey: okay, try this: https://pastebin.canonical.com/48005/19:21
tcoleI made a typo in the first paste19:21
dobeyso if that is correct, what is causeing the shsutdown failures then19:25
alecunessita, can I have your review on this? https://code.launchpad.net/~alecu/ubuntuone-control-panel/tx-web-client/+merge/6288919:29
nessitaalecu: sure, I'll do it in a couple of mins (finishing with dobey's)19:29
nessitadobey: approved19:32
dobeytcole: i don't understand what is keeping these dbus connectsions open then; because when i remove all the defer.inlineCallbacks magic, it seems to work :(19:36
tcoledobey: what happens when you use the non-inlineCallbacks version instead?19:37
tcole(from the pastebin)19:38
dobeytcole: http://pastebin.ubuntu.com/615467/ works, but if I add the decorator, it fails.19:38
dobeytcole: hrmm, let me try19:38
tcoledobey: if that makes things pass where the inlineCallbacks version doesn't, then I'm totally OK with replacing the inlineCallbacks version with the explicitly callbacked one, but we do need one or the other to be correct :/19:39
dobeyexceptions.AttributeError: 'NoneType' object has no attribute 'addCallback'19:40
dobeytcole: ^^^ get that with yours19:41
tcolehnnnh19:41
nessitadobey: that means that you have a function decorated with inlineCallbacks that does not return a deferred19:41
nessitadobey: where are you getting that error?19:42
dobeynessita: in trying to use tcole's suggested other implementation of setUp without inlineCallbacks19:42
nessitadobey: can you please point me to a branchable branch (:-P) to be run by myself?19:43
tcoledobey: so, apparently (in the failing test cases) there's another class in the inheritance hierarchy which is getting put before TestCase.setUp in the method resolution order, and itself fails to chain callbacks correctly via setUp19:43
tcolenessita: I strongly suspect MI/mixin shennanigans wrt chaining setUp deferreds :/19:44
nessitatcole: maybe, but is hard to guess for me without imagining what code is failing19:44
nessitaalecu: question, why the rename ubuntuone/controlpanel/web_client/linux.py => ubuntuone/controlpanel/web_client/libsoup.py?19:45
tcolenessita: it's apparently coming from the modified setUp in this case -- this means that super(DBusTestCase, self).setUp() is returning None and not a deferred19:45
nessitaalecu:  and... OH, we're both editing some ui files at the same time (smells like BOOM spirit)19:45
tcolenessita: which shouldn't normally happen since the next class up in the hierarchy which defines setUp is twisted.trial.unittest.TestCase, which *does* return a deferred19:46
alecunessita, because on linux we may use other webclient other than libsoup. Ie, twisted.web.client.19:46
dobeynessita: no, because i haven't pushed one, because i'm experimenting to try and understand this better so i can fix the problems19:46
dobeytcole: the only thing in the middle is BaseTestCase in the same file, which doesn't override setUp/tearDown at all19:46
tcolenessita: so, for the things that are failing, some other class is getting interposed in the inheritance linearization via multiple inheritance19:46
nessitadobey: wanna push so we can help debug?19:46
alecunessita, we can manually merge, it's not so complicated.19:46
tcoledobey: right, but MI downstream can end up inserting other classes in the method resolution chain between them19:46
dobeyhrmm19:47
nessitamandel: I need you to review a Needs Fixing, please!19:47
tcoledobey: DBusTestCase -> BaseTestCase -> t.t.u.TestCase19:47
tcoledobey: but let's say we have a class Foo(DBusTestCase, WheeTestCase), where WheeTestCase -> t.t.u.TestCase19:48
dobeytcole: so, i am getting that failure i pasted in the devtools tests, and there is no MI in there19:48
tcolehuh19:48
dobeytcole: the missing addCallback, that is19:48
dobeyhrmm19:48
tcoleI don't know then, the tests passed for me before I proposed that branch19:49
tcoles/before/when/19:49
tcoleand for that matter they got through tarmac if it landed19:49
dobeywell tarmac didn't do the non-inlineCallbacks method19:51
nessitadobey: inlineCallbacks + yield is 100% equivalent to chaining callbacks19:51
nessitadobey: can you please push what you're modifying so we can help you by looking at the code itself?19:52
tcolenessita: not completely, IIRC inlineCallbacks uses maybeDeferred with yield19:52
nessitatcole: you sure?19:53
tcoleI'm pretty sure yes19:53
tcoleanyway, the parent class setUp really *shouldn't* be returning None in this case; since it is, that suggests something else is wrong19:53
tcolemaybeDeferred shouldn't be needed in this case19:54
dobeytcole: ok; so i figured out that problem19:54
thisfredsomething in the class hierarchy fails to call super (correctly), is my hunch19:54
dobeysuper() is dumb.19:54
tcolenessita: seems I'm wrong, inlineCallbacks doesn't automatically use maybeDeferred19:55
tcoledobey: oh?19:55
dobeyif the parent class doesn't override the method, then it apparently isn't calling that parent's method as well19:55
dobeyso for some reason, it got None19:56
mandelnessita: pong19:56
tcoledobey: normally when that happens it's because of MI and a mixed-in class that defines setUp without calling super()19:56
dobeyif i add a setUp() to BaseTestCase that just does super() though, the AttributeError thing went away19:56
mandelnessita: is kind of late her but tell me19:56
nessitamandel: hey there! I was just looking at your branch. 2 things:19:56
tcolemm19:56
tcoledobey: so, that shouldn't be necessary19:56
tcoledobey: can you show me the __mro__ for the test class where this is actually failing?19:57
nessitamandel: could you please approve https://code.launchpad.net/~nataliabidart/ubuntuone-control-panel/update-file-sync-status/+merge/62575? your Needs Fixing is preventing me from lkand19:57
nessitaland*19:57
mandelnessita: done19:57
tcoledobey: like, if the failure(s) happen when running the tests in SomeTestCase, I'd like to see SomeTestCase.__mro__19:58
nessitamandel: the other thing, in your credentials branch, you are duplicating all the logger setup in both linux and windows code. In the review I asked you to move that to the non-platform specific code19:58
nessitamandel: maybe you forgot to push that?19:58
nessitamandel: thanks to the review!19:58
mandelnessita: oh, indeed19:58
mandelnessita: I'll do it right now19:58
nessitamandel: thanks! then I'll approve also globally, so it lands19:58
dobeyhmm19:59
dobeytcole: ok, one minute20:00
dobey(or five)20:00
nessitaalecu: can you please merge into your branch the one from https://code.launchpad.net/~nataliabidart/ubuntuone-control-panel/update-file-sync-status/+merge/62575? is about to land and I can tell it will cause conflicts with yours20:00
alecunessita, ok20:01
dobeytcole: hrmm, how do i see that?20:05
tcoledobey: eh, do a sys.stderr.write("DEBUG: mro = %r\n" % (SomeClass.__mro__,)) or something20:05
tcole(note well the tuple comma)20:05
tcoleor just import stuff in an interactive python session20:06
tcoleat which point you can just evaluate SomeClass.__mro__ interactively20:06
mandelnessita: changes pushed20:08
* mandel changing network...20:08
dobeytcole: (<class 'ubuntuone.devtools.services.tests.test_dbus.TestWithDBus'>, <class 'ubuntuone.devtools.testcase.DBusTestCase'>, <class 'ubuntuone.devtools.testcase.BaseTestCase'>, <class 'twisted.trial.unittest.TestCase'>, <class 'twisted.trial.unittest._Assertions'>, <class 'unittest.case.TestCase'>, <type 'object'>)20:09
tcolehuh.20:09
tcoleso, if BaseTestCase doesn't define its own setUp(), super(DBusTestCase, self).setUp() should totally go straight to twisted.trial.unittest.TestCase.setUp20:10
dobeyi would think so too, but it doesn't seem to be20:10
dobeytcole: although, twisted.trial.unittest.TestCase doesn't define a setUp either :(20:12
dobeynor does _Assertions20:12
tcolehmm20:13
nessitamandel: ack20:13
dobeyrather20:15
dobeytwisted's TestCase seems to call setUp inside a maybeDeferred20:15
dobeysame with tearDown (and all the tests actually)20:16
dobeylooking at the code it seems like the general case should be to just write stuff like it's normal unittest bits without deferreds?20:17
nessitadobey: any hints about why https://code.launchpad.net/~nataliabidart/ubuntuone-control-panel/update-file-sync-status/+merge/62575 failed? I think the key error is:20:17
nessitash: pyrcc4: not found20:17
dobeynessita: sounds like it's failing to build stuff?20:18
nessitadobey: tarmac needs pyqt4-dev-tools20:18
mandelalecu: ping20:18
alecumandel, pong20:18
nessitadobey: can you please install it?20:18
mandelalecu: did you have the time to look at the branch?20:18
tcoledobey: unfortunately that won't work20:18
tcole(reliably)20:19
alecumandel, yes, and it needs fixing20:19
mandelalecu: cool, I'll take a look20:19
tcoledobey: everyone has to consistently chain deferreds or it all goes wonky and race condition-y20:19
dobeytcole: unfortunately, in my experience "reliable" and "twisted" don't go together :(20:19
dobeynessita: when was that added as a dep?20:20
mandelalecu: he, stupid non compiled langs… Is funny that pylint did not catch that problem20:20
nessitadobey: with this branch. Shall I have added to any predefined list? (I forgot to tell you directly)20:20
mandelalecu: for testing we should move the dbus stuff out… I'll work on it20:20
dobeynessita: i don't see where it gets called in that branch?20:21
nessitadobey: is automatically being called by setup build, something in the qt build chain generates the proper resources files that we now need for icons20:22
dobeytcole: hrmm, i wonder what is deriving from us that is chaining deferreds on setUp?20:22
tcoledobey: everything should20:22
dobeytcole: ok, well i don't understand how to fix this then; the only apparent proper solution to me seems to be "twisted needs to gtfo" :-/20:24
tcoledobey: I think using maybeDeferred in DBusTestCase could be sufficient20:25
tcoleyield maybeDeferred(super(DBusTestCase, self).setUp)20:25
dobeyugh20:26
tcoletrying to work out in my head whether that covers the MI case20:26
tcoleI think it does20:26
dobey  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 133, in maybeDeferred20:27
dobey    result = f(*args, **kw)20:27
dobeylol. fml.20:27
dobeyexceptions.TypeError: 'NoneType' object is not callable20:27
nessitamandel: tons of lint issues! :-)20:27
nessitamandel: errors added to the merge proposal20:29
nessitadobey: would you please let me know when the new dep is installed so I can re-approve?20:29
dobeynessita: oh sorry; it is installed now20:29
nessitadobey: thanks!20:29
dobeydistracted by twisted and qt being horrible things :-/20:30
tcoletwisted gtfo is sounding pretty appealing just now20:31
nessitadobey: you still don't show me anything so I can help you with! :-)20:31
tcolenessita: we just hit a design problem in twisted -- DBusTestCase (and any class like it) needs to chain setUp with super() to be MI-safe20:32
tcolenessita: but Twisted's TestCase (nor any of its ancestors) doesn't define its own setUp20:32
dobeynessita: i don't think there's any way to fix wrapper(None) trying to call None(*args, **kwargs) from breaking20:32
nessitatcole: I will suggest asking jml directly, he built that as far as I know :-)20:32
tcolenessita: he seems to be away on an extended basis atm20:33
nessitaoh20:33
dobeyi would be too if it was 20:30 here20:34
nessitaright20:34
tcoleI meant more "idle for 4 days" extended20:34
nessitaemail him maybe?20:34
mandelnessita: really? but I did not change a think… man I hate lint, I'll fix them asap20:34
dobeymandel: see my e-mail to the list about switching to pyflakes, and tell me what you think :)20:35
nessitamandel: "I did not change a thing" <- lier! you moved stuff around like crazy :-)20:35
nessitadobey: right, I need to dive in too20:35
mandelnessita: well I moved the logger, but nothing else… it does not make sense to block due to that… anyway I'll fix them20:36
nessitadobey: at this stage I think you're right, you now. Though I may be running pylint myself as a personal measure20:36
mandeldobey: yes, I hate lint, I also hate that ython is not compiled...20:36
nessitamandel: well, you left ununsed imports20:36
thisfredI have not yet found anything I'd miss from pylint that pyflakes does not have20:37
dobeymandel: yes; we can just summarize all that as "i hate python" :)20:37
nessitamandel: I'll approve, once your lint changes kick in, approve the merge proposal yourself, yes?20:37
dobeythisfred: well there is the XXX/FIXME/etcc customization20:37
thisfredmeh20:37
dobeythisfred: and it's nice to shove those in your face during the lint run20:37
mandelnessita: sure20:37
dobeythisfred: even if all it makes you do is remove them from the code20:37
mandeldobey: hehe yes, I'm starting to do it a little :)20:38
thisfreddobey: I suppose, yeah20:38
tcoledobey: I think I may have a short-term fix20:38
nessitaalecu: my branch landed (FYI)20:38
tcoledobey: let me ponder some more20:38
alecugreat20:38
dobeytcole: ok20:38
dobeyhrmm20:39
dobeygrr20:43
nessitaalecu: let me know when I should re branch yours to review20:44
tcoledobey: so, I think basically what we have to do, until I get twisted straightened out, is this:20:45
tcole    superSetUp = super(DBusTestCase, self).setUp20:45
tcole    if superSetUp is not None:20:45
tcole        yield defer.maybeDeferred(superSetUp)20:45
tcoledobey: thankfully not everywhere, but in fact for every class which doesn't normally get a defined setUp from its ancestors20:46
alecutcole, may I suggest not using super, and manually calling the parent class setUp?20:47
alecutcole, as per http://fuhm.net/super-harmful/20:47
tcolealecu: NO20:47
dobeyhrmm20:47
tcoleI agree with that article, but our situation is one where we have no choice but to use super and use it consistently20:48
tcolein any case, the problem here is that the parent class may not have setUp20:48
dobeywell one problem20:49
alecubut "Superclasses must use super if their subclasses do". And we can't modify all of trial and twisted, so manually calling the right setUp on the parent sounds reasonable.20:49
dobeyafaict it works perfectly fine (actually, everything is working as i expect it would), without all the inlineCallbacks stuff20:49
dobeyi don't understand how doing inlineCallbacks actually makes anything work, since for me, all it does is make stuff not work :(20:50
tcoledobey: it's mainly for the MI case20:54
tcolealecu, dobey: unfortunately we have a lot of MI happening with twisted test cases; our only choice is to use super consistently everywhere20:55
dobeycan i just make the test case check for MI and fail with a GTFO message? :)20:55
tcolenot easily20:55
tcolethat wouldn't really help either20:56
dobeytcole: i don't mind calling super(); that is fine by me; my problem is that for some reason @inlineCallbacks makes what i'm doing just not work20:56
dobeyif i remove @inlineCallbacks, it works perfectly20:56
tcolewell, there is the problem of the None-setUp from above20:56
tcolethat is part of the breakage there20:56
tcoledobey: with inlineCallbacks, I mean20:57
dobeythat doesn't explain why my own tearDown doesn't seem to be getting called20:57
dobeyor at least, not called consistently20:57
tcoleyour teardown is asynchronous, isn't it?20:57
tcoletypically what is going on in those cases is that the teardown is being called, but the deferred is not chained/waited for20:58
dobeynot now; it has 3 yield foo(), the last of which is calling super() with the check for parent tearDown being there20:58
tcolethat's asynchronous yes20:58
tcoleat least from an outside perspective20:58
tcoleanyway, probably you're ending up with a race condition where someone is calling your tearDown (via super() or otherwise), but not waiting for it, so there's a race condition as far as whether it can complete before the test cleanup finishes20:59
tcoleif not, unclean reactor etc.20:59
tcolebut, let's try the superSetUp thing next21:00
tcoleand see how far that gets us21:00
dobeythen is there any good reason to not remove the inlineCallbacks wrappers until wisted is fixed?21:00
dobeythe checking for parent setUp/tearDown works fine, but inlineCallbacks still breaks the world21:01
tcolewell, is it really inlineCallbacks?21:02
dobeywell, if i remove it, it works; if i add it, it breaks21:03
tcolethat's a bit simplistic21:03
tcolehere, let me do up the equivalent explicit callbacks version21:03
dobeywell, i have no idea how else to debug why my teardown isn't working right21:04
dobeyinlineCallbacks got added to setUp, and stuff started breaking; if i remove it, things work right again21:04
dobeyhell, i'll tweak the twisted code and see if it fixes it then21:06
tcoledobey: try this: https://pastebin.canonical.com/48013/21:06
tcoleit *should* fail in the same way as with inlineCallbacks21:06
tcoleif it doesn't then that tells us some things though21:06
tcolehopefully at that point we can focus more specifically on what's going on in tearDown21:07
dobey        yield self.bus.flush()21:10
dobey        yield self.bus.close()21:10
dobeythat's basically tearDown()21:10
dobeywith a check/yield/maybeDeferred on the super() call after that21:10
* tcole nods21:12
dobeytcole: hrmm, with that way of doing things, it seems that the setup_dbus never gets called21:14
dobeyexceptions.AttributeError: 'TestWithDBus' object has no attribute 'bus'21:17
dobeythat happens when tearDown() gets called21:17
tcoleinteresting21:20
tcolewhat happens if you short-circuit it with d = defer.succeed(None) ?21:21
tcole(putting that after the if/else)21:21
thisfredwell, since superSetup apparently is None in some cases, it's unsurprising21:21
thisfredsince in that case it's not called.21:21
tcolewhy would that be unsurprising?21:21
tcolethisfred: given this: https://pastebin.canonical.com/48013/21:21
dobeyoverriding the d instantiation doesn't help21:22
thisfredwell the super method being None is the problem, but all this does is explicitly break the super chain, right? so the setting of the .bus property not happening is unsurprising21:23
tcolethisfred: have you read the code I pasted?21:27
tcoleif superSetUp is None, then it falls through to the d = defer.succeed(None) case21:27
thisfredtcole, yep.21:27
tcoleafter which point d.addCallback(setup_dbus) is called21:27
tcoleand that should call setup_dbus immediately21:27
tcoleand setup_dbus sets self.bus21:27
thisfredah right21:27
thisfredI only read the first part21:28
thisfredso then the issue is the callback does not fire at all?21:28
dobeytcole: isn't defer.succeed() supposed to take True/False as argument, not None?21:28
dobeythough I guess None evals to False21:28
tcoledobey: no, it takes a result21:29
dobeythisfred: it doesn't appear to get called21:29
tcoledobey: which gets passed to callbacks21:29
dobeyah ok21:29
tcolehttp://twistedmatrix.com/documents/8.1.0/api/twisted.internet.defer.html#succeed21:29
dobeyso definitely not getting called21:30
dobeyi added a raise to the setup_dbus, and nothing happens.21:30
tcoleis superSetUp not None, perhaps?21:31
thisfredit should only ever be None in the "superest" class right?21:32
thisfredno, the ultimate base class can't call super, that would just fail21:33
thisfredI don't see how it can ever be None, rather than an attribute error21:34
dobeyso it's not21:35
dobeythe problem is that it returns None21:35
thisfredright21:35
dobeysince it ultimately is hitting the unittest.TestCase.setUp21:36
tcoleI thought TestCase didn't have a default setUp21:38
tcolehm, so it does21:39
dobeyunittest does21:39
dobeytwisted doesn't21:39
tcolebut twisted apparently inherits from TestCase21:40
tcoleer, from unittest21:40
dobeyyes21:40
dobeybut 'pass' just gives you back a None :)21:40
tcoleI feel like we've been here before21:40
dobeywatch out for windows that don't exist any more21:40
tcoledobey: all right, so... as far as the original problem you were hitting21:42
tcolewhat's the briefest way to reproduce?21:42
thisfredwhat happens if you do this: https://pastebin.canonical.com/48018/21:43
thisfredor does that fail in case the setup *does* return a deferred?21:44
dobeydid this instead: https://pastebin.canonical.com/48019/21:48
dobeybut still fails21:48
dobeythe _setup_dbus doesn't seem to get called21:48
dobeyor twisted is just trapping the exception21:48
thisfreddoes pdb.set_trace() work?21:49
thisfredor just debug prints, to see what the values are21:50
dobeywork where?21:51
dobeyso i know that the defer.succeed() is being called there21:51
thisfredin this setUp, so you can see what d is? I suppose it is None21:52
thisfredright21:52
thisfredand the callbacks are added, they just never get called21:52
dobeyright21:53
dobeyi am guessing it is just twisted being broken21:53
tcoleI don't even know at this point21:54
thisfredt.t.u.TestCase has deferSetup and deferTearDown. Helpfully without any doc strings21:56
dobeydoc strings are for kids. twisted is hardcore.21:57
thisfredLooks like those are only used internally, to call the class' setUp and tearDown in an asynchronous fashion.22:08
dobeyright22:09
dobeywhich totally breaks everything ever22:09
nessitaalecu: how's the merge going? too much trouble? can I help?22:10
tcoledobey: I think before I waste too much more of your time with this, I should devise a test case that captures the case that the inlineCallbacks change is supposed to fix22:11
thisfreddobey: it suggests to me though, that subclasses shouldn't have to bother with deferred themselves in either setUp and tearDown22:11
alecunessita, a bit messy. yes. no, thanks.22:13
dobeytcole: i would appreaciate that22:13
nessitaalecu: :-)22:13
dobeythisfred: right, which is why i want to get rid of the inlineCallbacks usage22:13
thisfredright22:13
dobeywell, and because getting rid of it makes everything work like how i'd expect it to22:14
tcolethisfred: no, they have to22:16
tcolethisfred: subclasses are responsible for chaining deferreds with parent classes22:16
tcoledeferredSetUp only does the initial call to setUp22:16
thisfredtcole: but that would only matter if the superclasses do anything with deferreds in *their* setup, right? Which the dbus test case does, I guess22:18
dobeytcole: it seems like what you're trying to say is that parent classes are responsible for chaining deferreds with subclasses, instead; no?22:18
tcolethisfred: yeah, in practice, though it's not very good to *assume* that the superclass doesn't22:18
tcoledobey: well, they're responsible for returning a deferred that subclasses can chain to22:19
thisfredtcole: well, that seems to be twisted's expectation, foolish or no22:19
tcoledobey: and they're responsible for using super() correctly and chaining to that deferred so that MI works correctly22:19
thisfredhmm, maybe not. They just cater to the simplest use case22:20
tcoleI don't think whoever wrote this thought this through very carefully22:20
tcoleor maybe MI wasn't part of the intended use case22:21
tcolebut I guess we need to fix that since we have a lot of MI in tests22:21
dobeyi don't think MI matters here right now22:21
tcolesome of DBusTestCase's subclasses in ubuntuone-servers use MI, IIRC22:22
dobeyugh a recall on my car22:22
dobeytcole: afaict, nothing in ubuntuone-servers is using DBusTestCase22:24
tcolelemme check22:24
dobeysome of the ubuntuone-client tests do, and a couple might use MI. not sure22:24
tcoleyeah, it's the client tests apparently22:26
tcole./sourcecode/ubuntuone-client/tests/platform/linux/test_dbus.py:class DBusTwistedTestCase(DBusTestCase, BaseTwistedTestCase):22:26
dobeyright22:26
tcoleand it doesn't chain super() correctly22:26
tcoleor the deferred22:26
tcolegee, I wonder why these tests are so flaky? :P22:26
dobeybut that doesn't explain why adding the deferred junk makes the tests fail that don't use MI22:28
dobeyomfg, someone else decided to name something 'neon'22:32
alecudobey, as in "Evangelion" ?22:34
dobeywell, so there is an http library called neon22:35
dobeyand then at UDS, there was that arm graphics project thing mentioned, also called neon22:35
dobeyand now there is a kde thing called project neon22:35
dobeyanyway22:47
dobeymy brain is twisted now22:47
dobeyhave a good evening all. hopefully we can fix this tomorrow22:47
dobeyoh, can i get a second review on https://code.launchpad.net/~dobey/ubuntuone-dev-tools/dbus-priv/+merge/63022 please?22:48
dobeyanyway, good evening :)22:48
* nessita -> food hunting, brb22:54
* thisfred off too, see y'all tomorrow23:01
thisfredlet's see if the dog wants to go out in 96F23:01

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