/srv/irclogs.ubuntu.com/2010/06/21/#launchpad-reviews.txt

jtvDo we still require the backquotes for """See IThisClass.""" docstrings?12:02
noodles775It's still listed here: https://dev.launchpad.net/PythonStyleGuide#Docstrings12:13
jtvnoodles775: Thanks!  Then that settles it for me, and I'll continue to be a prick about it.  :-)12:22
noodles775heh... I meant that if there's no reason to use it, update the wiki (and bring it up for the review meeting?). I assume it's used for pydoctor, but have never run our code through pydoctor myself.12:28
=== matsubara-afk is now known as matsubara
=== mrevell is now known as mrevell-lunch
=== mrevell-lunch is now known as mrevell
=== abentley changed the topic of #launchpad-reviews to: on-call: abentley || reviewing: - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.edge.launchpad.net/launchpad/+activereviews
leonardrabentley, can i trouble you to review https://code.edge.launchpad.net/~leonardr/lazr.restfulclient/server-takes-precedence/+merge/28059 ?15:32
abentleyleonardr, sure.15:32
abentleyleonardr, why are 'team' and 'person' different types?15:33
=== matsubara is now known as matsubara-afk
leonardrabentley: 'team' has some features like membership_policy that 'person' doesn't have15:35
leonardrsame reason ITeam and IPerson are different interfaces15:35
abentleyleonardr, it seems like this behaviour should require that the returned type is derived from the expected type, don't you think?15:43
leonardrabentley: i don't think so--i think if the client and the server disagree for any reason, the client is just wrong. in real life, the only reason they'll disagree is because of an inheritance situation15:55
leonardrbut there's no way to represent inheritance in wadl, so we can't be much more sophisticated15:56
abentleyleonardr, I don't think it matters who's wrong.  If the returned object's interface isn't a superset of the expected interface, chaos will result.15:57
abentleyleonardr, I am having trouble finding out where the 'people' collection is defined, but PersonSet always returns IPerson, not ITeam, which seems to contradict your documentation.16:00
abentleyleonardr, even findTeam returns IPerson.16:00
leonardrabentley: let's say we had a magic way of knowing. if we detected a non-inheritance scenario, we'd throw an exception. that's exactly what'll happen now: an exception saying 'a bar-type object doesn't have a property "onlypresentinfoo"'16:00
leonardrthe 'people' collection i refer to is the client-side collection in launchpadlib16:01
leonardron the server side, we declare the most general interface (though findTeam really should return ITeam). on the client side, we expect the most specific interface16:01
leonardrthat is, it's guaranteed that everything coming out of PersonSet implements at least IPerson16:02
leonardrbut if you grab an object from PersonSet, and you know *nothing* about it, the most convenient thing to do for your end-user is to let them treat it as ITeam if they think it's an ITeam, and raise an exception if that assumption turns out to be invalid16:03
leonardrthat decision could go the other way, and this branch would still be needed, but launchpadlib wouldn't be as useful16:04
leonardryou couldn't do launchpad.people['team'].membership_policy16:05
=== salgado is now known as salgado-lunch
abentleyleonardr, don't you need to load the object to evaluate launchpad.people['team'].membership_policy ?16:22
leonardronly if 'membership_policy' is something that could conceivably be a property of launchpad.people['team']16:23
leonardrif you do launchpad.people['team'].nosuchproperty it won't load the object, you'll just get an error16:23
leonardrthe question is whether or not membership_policy (or anything held by teams but not persons) should look like nosuchproperty16:24
abentleyleonardr, it seems like it would be a programming error to try to access launchpad.people['team'].nosuchproperty and therefore making avoid retrieving the object is not a great advantage.16:26
leonardri agree it's not a great advantage, but that's how it works now. a request will only go over the wire if it conforms with what the client knows about the application based on the wadl16:27
leonardrby contrast, launchpad.people['person'].membership_policy will go over the wire and _then_ raise an exception16:28
leonardrthe important thing is that both cases raise exceptions16:28
abentleyCan you give me an example of a case where there wouldn't be an exception?16:29
leonardrlaunchpad.people['person'].name or launchpad.people['team'].membership_policy16:30
leonardrin the first case, the property is present in both team and person16:30
leonardrin the second case, the property is only present for team, but fortunately the object happens to be a team (according to the server)16:30
abentleyleonardr, can you give me an example where the object is a person, but appears to be a team?  The first one I can think of is dir(person)16:34
leonardrabentley, i'm about to push a launchpadlib branch that will hopefully make it clearer16:35
leonardrbut, to answer your question, launchpad.people['person'] will appear to be a team until the request is made. so, yes, dir(person) and .lp_attributes will show team attributes16:36
leonardronce the request is made, dir(person) will change to be more accurate16:36
leonardrabentley: https://code.edge.launchpad.net/~leonardr/launchpadlib/shim-users/+merge/2806716:37
krkhangmb: thanks for the review. i'll post on the list tonight for suggestions and see how it goes16:55
gmbkrkhan, Cool.16:55
abentleyleonardr, why doesn't setting "httplib2.debuglevel = 0" make the test always pass?17:02
leonardrabentley: going to go out on a limb here and suppose that you have the wrong idea about what httplib2.debuglevel does?17:03
abentleyleonardr, could be.17:04
leonardrall it does is show the requests as they're being made, so that i can demonstrate that requests are made later rather than sooner17:04
leonardrit doesn't affect the test environment itself17:04
abentleyleonardr, I think that's what I expected.17:07
abentleyleonardr, so why does line 56 show a GET?17:07
leonardrah17:07
leonardrwhen you create a client object, it inherits the current value of httplib2.debuglevel17:07
leonardrit would be better to set httplib2.debuglevel later, for readability, but technically it doesn't matter--you can unset it anytime after you create the client17:08
leonardri'll make the change17:08
abentleyleonardr, okay, cool.17:08
abentleyleonardr, it would be nice if you could create it with "debug_service = CookbookWebServiceClient(_http_debuglevel=1)" to reflect this.17:09
leonardrthat's a good idea but i'd rather do that in a separate branch, since that would affect a bunch of tests17:12
abentleyleonardr, that's fine.  I don't require it, just an idea.17:13
leonardrok17:13
abentleyCould you update the documentation to mention that WADL doesn't provide a way to find out inheritance relationships?17:15
abentleyleonardr, also, did you consider allowing collections claim that they provide multiple types?17:16
abentleyleonardr, that would allow a shim to be an IPersonOrITeam shim, and presumably it could find out which it is when it needs to.17:17
leonardrabentley: yes, that was my original (much more complicated plan), until flacoste said that team is and can only be a superset of person17:17
leonardrand the way this works in practice is very similar to that17:17
leonardrsince team is a superset of person, IPersonOrTeam looks just like ITeam17:17
leonardrand any attempt to explicitly find out what kind of object a specific object is will collapse the wavefunction by making an http request17:18
abentleyleonardr, I thought IPersonOrTeam would make http requests when dir(IPersonOrTeam) was invoked, etc.17:19
leonardri see17:19
james_wsalgado-lunch: https://code.edge.launchpad.net/~james-w/launchpad/copy-archive-test-refactor/+merge/28073 is the branch I was talking about if you could review please.17:20
leonardri don't think that's worth the work, and if it is, we can do that work just as easily with this branch as a base17:20
abentleyleonardr, approved, but I'd like to see an explanation of why you didn't consider inheritance (WADL doesn't provide that) in the docs.17:24
leonardrok17:24
leonardrabentley, want to look at the launchpadlib branch too? (if not, gary has expressed an interest)17:25
gary_poster(a willingness :-) )17:25
abentleygary_poster, if you don't mind, there are some issues I'd like to chase up.17:26
gary_posterabentley, leonardr, will do17:26
=== salgado-lunch is now known as salgado
salgadojames_w, I'll get to it in a minute17:41
james_wthanks17:41
=== deryck is now known as deryck[lunch]
gary_posterleonardr: launchpadlib branch approved, no comments17:48
leonardrgary: cool. lazr.restfulclient release is out, launchpadlib release will follow, then i'm going to go to bed17:49
gary_posterok, leonardr17:49
leonardrgary: done, see you tomorrow17:52
=== deryck[lunch] is now known as deryck
=== sinzui changed the topic of #launchpad-reviews to: on-call: abentley || reviewing: - || queue: [sinzui] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.edge.launchpad.net/launchpad/+activereviews
sinzuiis anyone available for a 47 line fix: https://code.edge.launchpad.net/~sinzui/launchpad/unique-openid-identifiers-0/+merge/2808118:59
sinzuiabentley, are you available for a 47 line fix: https://code.edge.launchpad.net/~sinzui/launchpad/unique-openid-identifiers-0/+merge/2808120:08
abentleysinzui, sure.20:08
=== abentley changed the topic of #launchpad-reviews to: on-call: abentley || reviewing: sinzui || queue: [sinzui] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.edge.launchpad.net/launchpad/+activereviews
abentleysinzui, openid identifiers are derived from account names?20:13
sinzuino random stringd20:13
sinzuisample data sucks and uses20:13
abentleysinzui, so the random strings aren't random enough?20:13
sinzuithe randoms get reused apparently20:14
sinzuiI saw something like merge-Z3dgy45  and Z3dgy45 in staging. the latter cannot be merged20:15
abentleysinzui, that doesn't sound like a good idea...20:15
sinzuiWe do not control openid identifiers20:15
abentleysinzui, Ah, that's canonical-foundations?20:15
EdwinGrubbsabentley: will you have time to review this branch? https://code.edge.launchpad.net/~edwin-grubbs/launchpad/bug-35728-bugtracker-overlay/+merge/2810020:16
abentleyEdwinGrubbs, I expect so.20:16
=== EdwinGrubbs changed the topic of #launchpad-reviews to: on-call: abentley || reviewing: sinzui || queue: [sinzui, Edwin] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.edge.launchpad.net/launchpad/+activereviews
abentleysinzui, "dash which does not occur in SSO identifier." should probably be "dash, which does not occur in SSO identifiers."20:18
sinzuiabentley,  ISD, canonical-identity-provider reuses identifier tokens. I was surprised. In my original fix I wrote that since we know the identifier is unique and cannot contain a dash, we could prepend 'merge-' and there was no chance of future conflict...20:18
sinzuiI was proven wrong in 10 days20:19
abentleysinzui, if you are replying to my last statement, I was just nitpicking grammar.20:20
sinzuiabentley, no, I was trying to provide backgroind to  "that's canonical-foundations?"20:21
* sinzui is being pedantic, sorry20:21
abentleysinzui, ah, I missed that you mentioned ISD in there.20:22
abentleysinzui, I think it would be good to add a unit test to ensure that merging accounts works when you have duplicate identifiers.20:23
sinzuiyes, I should do that20:23
abentleysinzui, the change itself looks fine.20:23
abentleysinzui, ping me when you have that test.20:24
sinzuiokay20:24
abentleysinzui, also, this sinzui in the queue: is that the same thing?20:24
sinzuiyep20:24
=== abentley changed the topic of #launchpad-reviews to: abentley || reviewing: Edwin || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.edge.launchpad.net/launchpad/+activereviews
abentleyEdwinGrubbs, could you explain 395-397, please?20:38
=== abentley changed the topic of #launchpad-reviews to: abentley || reviewing: - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.edge.launchpad.net/launchpad/+activereviews
EdwinGrubbsabentley: it's not really important now that we normally run windmill tests through the test runner so we always have a clean database. I copied it from test_add_milestone. I can remove it if you want.20:57
abentleyEdwinGrubbs, please do, then.20:58
=== abentley changed the topic of #launchpad-reviews to: is On call: - || reviewing: - || queue: [] || This channel is logged: http://irclogs.ubuntu.com/ || https://code.edge.launchpad.net/launchpad/+activereviews
sinzuiabentley, check your email for my reply and incremental diff22:05
abentleysinzui, I am EOD.22:06
=== salgado is now known as salgado-afk

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