ec2api-tempest-plugin: Fix python3 Compatibility for urllib2

Bug #1809801 reported by yatin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ec2-api
Fix Released
Undecided
yatin

Bug Description

ec2api-tempest-plugin fails when ran with python3 as it relies on urllib2(it's split into urllib imports with python3[1]) Detected while testing python3 with Fedora in [2].

It fails with below Error:-
b'--- import errors ---\nFailed to import test module: ec2api_tempest_plugin.scenario.test_vpn\nTraceback (most recent call last):\n File "/usr/lib/python3.6/site-packages/unittest2/loader.py", line 456, in _find_test_path\n module = self._get_module_from_name(name)\n File "/usr/lib/python3.6/site-packages/unittest2/loader.py", line 395, in _get_module_from_name\n __import__(name)\n File "/usr/lib/python3.6/site-packages/ec2api_tempest_plugin/scenario/test_vpn.py", line 20, in <module>\n import urllib2\nModuleNotFoundError: No module named \'urllib2\'\n'

ec2api-tempest-plugin needs to be fixed to support python3.

[1] https://docs.python.org/2/library/urllib2.html
[2] https://review.openstack.org/#/c/625613/

yatin (yatinkarel)
summary: - ec2api-tempest-plugin: Fix python3 Compatibility for urllib
+ ec2api-tempest-plugin: Fix python3 Compatibility for urllib2
yatin (yatinkarel)
Changed in ec2-api:
assignee: nobody → yatin (yatinkarel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ec2api-tempest-plugin (master)

Fix proposed to branch: master
Review: https://review.openstack.org/627403

Changed in ec2-api:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ec2api-tempest-plugin (master)

Reviewed: https://review.openstack.org/627403
Committed: https://git.openstack.org/cgit/openstack/ec2api-tempest-plugin/commit/?id=42bce570cac2a9ff12352701f8e32d5d49112be4
Submitter: Zuul
Branch: master

commit 42bce570cac2a9ff12352701f8e32d5d49112be4
Author: yatin <email address hidden>
Date: Wed Dec 26 17:58:00 2018 +0530

    Fix python3 Compatibility for urllib2

    The urllib2 module has been split across several modules
    in Python 3 named urllib.request and urllib.error [1].

    This patch makes code compatible for both python2 and
    python3 by using six.moves.urllib [2].

    [1] https://docs.python.org/2/library/urllib2.html
    [2] https://pythonhosted.org/six/

    Change-Id: Ie9ebe0d1e39ddb4704df067d42915204e49821cf
    Closes-Bug: #1809801

Changed in ec2-api:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ec2api-tempest-plugin 0.2.0

This issue was fixed in the openstack/ec2api-tempest-plugin 0.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.