[Bug 1714960] Re: getArchiveSubscriptionURL() crashes on python3
Łukasz Zemczak
1714960 at bugs.launchpad.net
Mon Jul 8 14:11:39 UTC 2019
Hello Łukasz, or anyone else affected,
Accepted lazr.restfulclient into xenial-proposed. The package will build
now and be available at
https://launchpad.net/ubuntu/+source/lazr.restfulclient/0.13.4-5ubuntu2
in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-xenial to verification-done-xenial. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-xenial. In either case, without details of
your testing we will not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Description changed:
+ [Impact]
+
When trying to use the me.getArchiveSubscriptionURL() call on Python 3,
an exception is generated:
Traceback (most recent call last):
- File "./test.py", line 9, in <module>
- print(me.getArchiveSubscriptionURL(archive=ppa))
- File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 622, in __call__
- self.resource.lp_refresh()
- File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 759, in lp_refresh
- super(Entry, self).lp_refresh(new_url, etag)
- File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 346, in lp_refresh
- representation, self.JSON_MEDIA_TYPE)
- File "/usr/lib/python3/dist-packages/wadllib/application.py", line 363, in bind
- representation_definition)
- File "/usr/lib/python3/dist-packages/wadllib/application.py", line 300, in __init__
- _make_unicode(representation))
- File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 516, in loads
- return _default_decoder.decode(s)
- File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
- obj, end = self.raw_decode(s)
- File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
- return self.scan_once(s, idx=_w(s, idx).end())
+ File "./test.py", line 9, in <module>
+ print(me.getArchiveSubscriptionURL(archive=ppa))
+ File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 622, in __call__
+ self.resource.lp_refresh()
+ File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 759, in lp_refresh
+ super(Entry, self).lp_refresh(new_url, etag)
+ File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 346, in lp_refresh
+ representation, self.JSON_MEDIA_TYPE)
+ File "/usr/lib/python3/dist-packages/wadllib/application.py", line 363, in bind
+ representation_definition)
+ File "/usr/lib/python3/dist-packages/wadllib/application.py", line 300, in __init__
+ _make_unicode(representation))
+ File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 516, in loads
+ return _default_decoder.decode(s)
+ File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
+ obj, end = self.raw_decode(s)
+ File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
+ return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- The same code works fine on python2 (e.g. lp-shell). Because of this being broken, I'm unable to add some modification for ESM precise handling in our kernel review scripts as those are Python 3 based.
- Test-case:
+ The same code works fine on python2 (e.g. lp-shell). Because of this
+ being broken, I'm unable to add some modification for ESM precise
+ handling in our kernel review scripts as those are Python 3 based.
+
+ [Test Case]
# Make sure you have a private PPA to which a subscription for the user is made
from launchpadlib.launchpad import Launchpad
PPA_LINK = '' # API link to the PPA here
lp = Launchpad.login_with('test-broken-url', 'production', version='devel')
ppa = lp.load(PPA_LINK)
me = lp.load(lp.me.self_link)
print(me.getArchiveSubscriptionURL(archive=ppa))
+
+ [Regression Potential]
+
+ Seriously none.
** Changed in: lazr.restfulclient (Ubuntu Xenial)
Status: In Progress => Fix Committed
** Tags added: verification-needed verification-needed-xenial
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lazr.restfulclient in Ubuntu.
https://bugs.launchpad.net/bugs/1714960
Title:
getArchiveSubscriptionURL() crashes on python3
Status in lazr.restfulclient:
Fix Released
Status in lazr.restfulclient package in Ubuntu:
Fix Released
Status in lazr.restfulclient source package in Xenial:
Fix Committed
Bug description:
[Impact]
When trying to use the me.getArchiveSubscriptionURL() call on Python
3, an exception is generated:
Traceback (most recent call last):
File "./test.py", line 9, in <module>
print(me.getArchiveSubscriptionURL(archive=ppa))
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 622, in __call__
self.resource.lp_refresh()
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 759, in lp_refresh
super(Entry, self).lp_refresh(new_url, etag)
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 346, in lp_refresh
representation, self.JSON_MEDIA_TYPE)
File "/usr/lib/python3/dist-packages/wadllib/application.py", line 363, in bind
representation_definition)
File "/usr/lib/python3/dist-packages/wadllib/application.py", line 300, in __init__
_make_unicode(representation))
File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 516, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The same code works fine on python2 (e.g. lp-shell). Because of this
being broken, I'm unable to add some modification for ESM precise
handling in our kernel review scripts as those are Python 3 based.
[Test Case]
# Make sure you have a private PPA to which a subscription for the user is made
from launchpadlib.launchpad import Launchpad
PPA_LINK = '' # API link to the PPA here
lp = Launchpad.login_with('test-broken-url', 'production', version='devel')
ppa = lp.load(PPA_LINK)
me = lp.load(lp.me.self_link)
print(me.getArchiveSubscriptionURL(archive=ppa))
[Regression Potential]
Seriously none.
To manage notifications about this bug go to:
https://bugs.launchpad.net/lazr.restfulclient/+bug/1714960/+subscriptions
More information about the foundations-bugs
mailing list