Merge lp:~leonardr/launchpadlib/bug-714043 into lp:launchpadlib
Proposed by
Leonard Richardson
Status: | Rejected |
---|---|
Rejected by: | Martin Pool |
Proposed branch: | lp:~leonardr/launchpadlib/bug-714043 |
Merge into: | lp:launchpadlib |
Diff against target: |
169 lines (+59/-39) 3 files modified
src/launchpadlib/NEWS.txt (+13/-0) src/launchpadlib/__init__.py (+1/-1) src/launchpadlib/launchpad.py (+45/-38) |
To merge this branch: | bzr merge lp:~leonardr/launchpadlib/bug-714043 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pool (community) | Disapprove | ||
Review via email: mp+48842@code.launchpad.net |
Description of the change
This branch fixes bug 71403 with two little bits of code:
1. If you call login_with() without specifying a service_root, you get 'staging', but you also get a warning. This lets you avoid mistakes in your code, but makes it obvious what you need to do if you want your changes to persist.
2. If you call login_anonymously() without specifying a service_root, you get 'production'.
Martin, let me know if you like this solution.
To post a comment you must log in.
Unmerged revisions
- 117. By Leonard Richardson
-
Added NEWS.
- 116. By Leonard Richardson
-
Initial implementation.
Hi Leonard, thanks for picking this up.
Can we think of any case in which the user would thank us for defaulting to talking to staging? I think the only case would be if they start up a client and make a lot of changes just assuming it has no effect. I don't know why someone would think that; fairly obviously the library is for talking to Launchpad and has the effect of manipulating objects in Launchpad.
If somebody is randomly poking things, they'll be doing so under their own account and they'll suffer the consequences.
If we default to staging then the first thing people are likely to do is to override it to talk to the real site. People want to write code that actually manipulates Launchpad. If they have bugs, those bugs are going to affect the real lp.
Consistent behaviour between anonymous and authenticated access is desirable, all else being equal.
So, I think it should just default to production.
We can look for precedents in other libraries. I've never encountered one that doesn't talk to the production site by default.