Launchpad constructor parameters changed incompatibly in natty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Hydrazine |
Fix Released
|
Critical
|
Martin Pool | ||
launchpadlib |
Won't Fix
|
High
|
Unassigned |
Bug Description
Hydrazine was calling launchpadlib with
return Launchpad(
which syntax was previously, and still is, recommended by <https:/
It turns out a new parameter was inserted near the start in the version in natty, effectively means this succeeds but the service_root parameter is ignored, so your program actually talks to staging.
revno: 102 [merge]
committer: Leonard Richardson <email address hidden>
branch nick: launchpadlib
timestamp: Mon 2010-12-20 15:01:53 -0500
message:
[r=benji,
diff:
...
- def __init__(self, credentials, service_
+ def __init__(self, credentials, authorization_
+ service_
"""Root access to the Launchpad API.
:param credentials: The credentials used to access Launchpad.
:type credentials: `Credentials`
+ :param authorization_
+ for authorizing OAuth request tokens. Used when an OAuth
+ access token expires or becomes invalid during a
+ session, or is discovered to be invalid once launchpadlib
+ starts up.
+ :type authorization_
:param service_root: The URL to the root of the web service.
If you want a stable Python API, don't change the parameter order.
Related branches
description: | updated |
Changed in hydrazine: | |
status: | New → Fix Committed |
assignee: | nobody → Martin Pool (mbp) |
importance: | Undecided → Critical |
Changed in launchpadlib: | |
importance: | Undecided → High |
Changed in launchpadlib: | |
status: | New → Triaged |
So, on consideration, I don't know if this is going to be worth actually reverting in lplib. Code is already out there; it's getting late to change this in Natty; and hydrazine has a workaround for it. Perhaps it's better to just document it as a break and update the user guide page. And please be more careful in future.