2011-04-06 01:07:44 |
Martin Pool |
description |
Hydrazine's was calling launchpadlib with
return Launchpad(credentials, service_root, lplib_cachedir)
which I'm fairly sure was recommended by previous documentation.
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 <leonard.richardson@canonical.com>
branch nick: launchpadlib
timestamp: Mon 2010-12-20 15:01:53 -0500
message:
[r=benji,EdwinGrubbs] If the OAuth token expires in the middle of a launchpadlib session, retrieve another token rather than crashing.
diff:
...
- def __init__(self, credentials, service_root=uris.STAGING_SERVICE_ROOT,
+ def __init__(self, credentials, authorization_engine,
+ service_root=uris.STAGING_SERVICE_ROOT,
cache=None, timeout=None, proxy_info=None,
version=DEFAULT_VERSION):
"""Root access to the Launchpad API.
:param credentials: The credentials used to access Launchpad.
:type credentials: `Credentials`
+ :param authorization_engine: The object used to get end-user input
+ 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_engine: `RequestTokenAuthorizationEngine`
: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. |
Hydrazine's was calling launchpadlib with
return Launchpad(credentials, service_root, lplib_cachedir)
which syntax was previously, and still is, recommended by <https://help.launchpad.net/API/launchpadlib>.
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 <leonard.richardson@canonical.com>
branch nick: launchpadlib
timestamp: Mon 2010-12-20 15:01:53 -0500
message:
[r=benji,EdwinGrubbs] If the OAuth token expires in the middle of a launchpadlib session, retrieve another token rather than crashing.
diff:
...
- def __init__(self, credentials, service_root=uris.STAGING_SERVICE_ROOT,
+ def __init__(self, credentials, authorization_engine,
+ service_root=uris.STAGING_SERVICE_ROOT,
cache=None, timeout=None, proxy_info=None,
version=DEFAULT_VERSION):
"""Root access to the Launchpad API.
:param credentials: The credentials used to access Launchpad.
:type credentials: `Credentials`
+ :param authorization_engine: The object used to get end-user input
+ 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_engine: `RequestTokenAuthorizationEngine`
: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. |
|
2011-04-08 08:45:58 |
Martin Pool |
description |
Hydrazine's was calling launchpadlib with
return Launchpad(credentials, service_root, lplib_cachedir)
which syntax was previously, and still is, recommended by <https://help.launchpad.net/API/launchpadlib>.
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 <leonard.richardson@canonical.com>
branch nick: launchpadlib
timestamp: Mon 2010-12-20 15:01:53 -0500
message:
[r=benji,EdwinGrubbs] If the OAuth token expires in the middle of a launchpadlib session, retrieve another token rather than crashing.
diff:
...
- def __init__(self, credentials, service_root=uris.STAGING_SERVICE_ROOT,
+ def __init__(self, credentials, authorization_engine,
+ service_root=uris.STAGING_SERVICE_ROOT,
cache=None, timeout=None, proxy_info=None,
version=DEFAULT_VERSION):
"""Root access to the Launchpad API.
:param credentials: The credentials used to access Launchpad.
:type credentials: `Credentials`
+ :param authorization_engine: The object used to get end-user input
+ 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_engine: `RequestTokenAuthorizationEngine`
: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. |
Hydrazine was calling launchpadlib with
return Launchpad(credentials, service_root, lplib_cachedir)
which syntax was previously, and still is, recommended by <https://help.launchpad.net/API/launchpadlib>.
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 <leonard.richardson@canonical.com>
branch nick: launchpadlib
timestamp: Mon 2010-12-20 15:01:53 -0500
message:
[r=benji,EdwinGrubbs] If the OAuth token expires in the middle of a launchpadlib session, retrieve another token rather than crashing.
diff:
...
- def __init__(self, credentials, service_root=uris.STAGING_SERVICE_ROOT,
+ def __init__(self, credentials, authorization_engine,
+ service_root=uris.STAGING_SERVICE_ROOT,
cache=None, timeout=None, proxy_info=None,
version=DEFAULT_VERSION):
"""Root access to the Launchpad API.
:param credentials: The credentials used to access Launchpad.
:type credentials: `Credentials`
+ :param authorization_engine: The object used to get end-user input
+ 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_engine: `RequestTokenAuthorizationEngine`
: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. |
|