libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [1/6] libcloud git commit: make ET/LXML a toggle instead of trying to import. Effectively makes LXML non-default
Date Mon, 24 Apr 2017 02:20:30 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 611035a33 -> 45101531e


make ET/LXML a toggle instead of trying to import. Effectively makes LXML non-default


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/9abe5ca9
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/9abe5ca9
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/9abe5ca9

Branch: refs/heads/trunk
Commit: 9abe5ca9bbc3323bb14ca9c45f8ac9dc51e34f27
Parents: 611035a
Author: Anthony Shaw <anthonyshaw@apache.org>
Authored: Mon Apr 24 11:02:31 2017 +1000
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Mon Apr 24 11:02:31 2017 +1000

----------------------------------------------------------------------
 libcloud/backup/drivers/dimensiondata.py         | 6 +-----
 libcloud/common/aliyun.py                        | 6 +-----
 libcloud/common/aws.py                           | 6 +-----
 libcloud/common/azure.py                         | 6 +-----
 libcloud/common/base.py                          | 6 +-----
 libcloud/common/openstack.py                     | 6 +-----
 libcloud/compute/drivers/abiquo.py               | 5 +----
 libcloud/compute/drivers/azure.py                | 6 +-----
 libcloud/compute/drivers/dimensiondata.py        | 6 +-----
 libcloud/compute/drivers/ec2.py                  | 6 +-----
 libcloud/compute/drivers/libvirt_driver.py       | 6 +-----
 libcloud/compute/drivers/opennebula.py           | 6 +-----
 libcloud/compute/drivers/openstack.py            | 6 +-----
 libcloud/dns/drivers/route53.py                  | 6 +-----
 libcloud/dns/drivers/zerigo.py                   | 6 +-----
 libcloud/loadbalancer/drivers/dimensiondata.py   | 6 +-----
 libcloud/storage/drivers/azure_blobs.py          | 6 +-----
 libcloud/storage/drivers/oss.py                  | 5 +----
 libcloud/storage/drivers/s3.py                   | 5 +++--
 libcloud/test/backup/test_dimensiondata_v2_3.py  | 7 +------
 libcloud/test/backup/test_dimensiondata_v2_4.py  | 7 +------
 libcloud/test/compute/test_abiquo.py             | 6 +-----
 libcloud/test/compute/test_dimensiondata_v2_3.py | 6 +-----
 libcloud/test/compute/test_dimensiondata_v2_4.py | 7 +------
 libcloud/test/compute/test_vcloud.py             | 7 +------
 libcloud/test/storage/test_oss.py                | 6 +-----
 libcloud/test/storage/test_s3.py                 | 6 +-----
 27 files changed, 29 insertions(+), 134 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/backup/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/backup/drivers/dimensiondata.py b/libcloud/backup/drivers/dimensiondata.py
index 9204957..81d2264 100644
--- a/libcloud/backup/drivers/dimensiondata.py
+++ b/libcloud/backup/drivers/dimensiondata.py
@@ -13,11 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.backup.base import BackupDriver, BackupTarget, BackupTargetJob
 from libcloud.backup.types import BackupTargetType
 from libcloud.backup.types import Provider

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/common/aliyun.py
----------------------------------------------------------------------
diff --git a/libcloud/common/aliyun.py b/libcloud/common/aliyun.py
index d500416..634ec44 100644
--- a/libcloud/common/aliyun.py
+++ b/libcloud/common/aliyun.py
@@ -20,11 +20,7 @@ import sys
 import time
 import uuid
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.common.base import ConnectionUserAndKey, XmlResponse
 from libcloud.common.types import MalformedResponseError
 from libcloud.utils.py3 import b, u, urlquote, PY3

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/common/aws.py
----------------------------------------------------------------------
diff --git a/libcloud/common/aws.py b/libcloud/common/aws.py
index 02dbf13..f9b80e8 100644
--- a/libcloud/common/aws.py
+++ b/libcloud/common/aws.py
@@ -25,11 +25,7 @@ try:
 except ImportError:
     import json
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.common.base import ConnectionUserAndKey, XmlResponse, BaseDriver
 from libcloud.common.base import JsonResponse
 from libcloud.common.types import InvalidCredsError, MalformedResponseError

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/common/azure.py
----------------------------------------------------------------------
diff --git a/libcloud/common/azure.py b/libcloud/common/azure.py
index cbba052..3db4df2 100644
--- a/libcloud/common/azure.py
+++ b/libcloud/common/azure.py
@@ -24,11 +24,7 @@ from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import b
 from libcloud.utils.xml import fixxpath
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.common.types import InvalidCredsError
 from libcloud.common.types import LibcloudError, MalformedResponseError
 from libcloud.common.base import ConnectionUserAndKey, RawResponse

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index 9c5731e..6a9361b 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -21,11 +21,7 @@ import copy
 import binascii
 import time
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 
 try:
     import simplejson as json

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/common/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/common/openstack.py b/libcloud/common/openstack.py
index 1350205..ac8e9c5 100644
--- a/libcloud/common/openstack.py
+++ b/libcloud/common/openstack.py
@@ -17,11 +17,7 @@
 Common utilities for OpenStack
 """
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.utils.py3 import httplib
 
 from libcloud.common.base import ConnectionUserAndKey, Response

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/compute/drivers/abiquo.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/abiquo.py b/libcloud/compute/drivers/abiquo.py
index c3b6311..ff9a352 100644
--- a/libcloud/compute/drivers/abiquo.py
+++ b/libcloud/compute/drivers/abiquo.py
@@ -20,11 +20,8 @@ This version is compatible with the following versions of Abiquo:
 
     * Abiquo 3.4 (http://wiki.abiquo.com/display/ABI34/The+Abiquo+API)
 """
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
 
+from libcloud.utils.py3 import ET
 from libcloud.compute.base import NodeDriver, NodeSize
 from libcloud.compute.types import Provider, LibcloudError
 from libcloud.common.abiquo import (AbiquoConnection, get_href,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/compute/drivers/azure.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/azure.py b/libcloud/compute/drivers/azure.py
index 48a0654..eff85ca 100644
--- a/libcloud/compute/drivers/azure.py
+++ b/libcloud/compute/drivers/azure.py
@@ -31,11 +31,7 @@ from datetime import datetime
 from xml.dom import minidom
 from xml.sax.saxutils import escape as xml_escape
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.common.azure import AzureServiceManagementConnection
 from libcloud.common.azure import AzureRedirectException
 from libcloud.compute.providers import Provider

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 697a072..2797f50 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -16,11 +16,7 @@
 Dimension Data Driver
 """
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.common.dimensiondata import LooseVersion
 from libcloud.common.exceptions import BaseHTTPError
 from libcloud.compute.base import NodeDriver, Node, NodeAuthPassword

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 4f6061c..a217d12 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -24,11 +24,7 @@ import copy
 import warnings
 import time
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.utils.py3 import b, basestring, ensure_string
 
 from libcloud.utils.xml import fixxpath, findtext, findattr, findall

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/compute/drivers/libvirt_driver.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/libvirt_driver.py b/libcloud/compute/drivers/libvirt_driver.py
index c6f168f..a914c5e 100644
--- a/libcloud/compute/drivers/libvirt_driver.py
+++ b/libcloud/compute/drivers/libvirt_driver.py
@@ -24,11 +24,7 @@ import mimetypes
 from os.path import join as pjoin
 from collections import defaultdict
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.compute.base import NodeDriver, Node
 from libcloud.compute.base import NodeState
 from libcloud.compute.types import Provider

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/compute/drivers/opennebula.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/opennebula.py b/libcloud/compute/drivers/opennebula.py
index c295cd4..6b94a32 100644
--- a/libcloud/compute/drivers/opennebula.py
+++ b/libcloud/compute/drivers/opennebula.py
@@ -25,11 +25,7 @@ __docformat__ = 'epytext'
 from base64 import b64encode
 import hashlib
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import next
 from libcloud.utils.py3 import b

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/compute/drivers/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/openstack.py b/libcloud/compute/drivers/openstack.py
index 2a5480d..fc39b3e 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -23,11 +23,6 @@ try:
 except ImportError:
     import json
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
 import warnings
 import base64
 
@@ -50,6 +45,7 @@ from libcloud.compute.types import NodeState, StorageVolumeState, Provider,
\
     VolumeSnapshotState
 from libcloud.pricing import get_size_price
 from libcloud.utils.xml import findall
+from libcloud.utils.py3 import ET
 
 __all__ = [
     'OpenStack_1_0_Response',

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/dns/drivers/route53.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/route53.py b/libcloud/dns/drivers/route53.py
index 0cb8707..c378f00 100644
--- a/libcloud/dns/drivers/route53.py
+++ b/libcloud/dns/drivers/route53.py
@@ -26,11 +26,7 @@ from libcloud.utils.py3 import httplib
 
 from hashlib import sha1
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.utils.py3 import b, urlencode
 
 from libcloud.utils.xml import findtext, findall, fixxpath

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/dns/drivers/zerigo.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/zerigo.py b/libcloud/dns/drivers/zerigo.py
index dacdd75..14d0700 100644
--- a/libcloud/dns/drivers/zerigo.py
+++ b/libcloud/dns/drivers/zerigo.py
@@ -24,11 +24,7 @@ import base64
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import b
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.utils.misc import merge_valid_keys, get_new_obj
 from libcloud.utils.xml import findtext, findall
 from libcloud.common.base import XmlResponse, ConnectionUserAndKey

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/loadbalancer/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/dimensiondata.py b/libcloud/loadbalancer/drivers/dimensiondata.py
index 9cc3d3a..71cc167 100644
--- a/libcloud/loadbalancer/drivers/dimensiondata.py
+++ b/libcloud/loadbalancer/drivers/dimensiondata.py
@@ -13,11 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.common.dimensiondata import DimensionDataConnection
 from libcloud.common.dimensiondata import DimensionDataPool
 from libcloud.common.dimensiondata import DimensionDataPoolMember

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/storage/drivers/azure_blobs.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/azure_blobs.py b/libcloud/storage/drivers/azure_blobs.py
index d4bf919..e1bb722 100644
--- a/libcloud/storage/drivers/azure_blobs.py
+++ b/libcloud/storage/drivers/azure_blobs.py
@@ -19,11 +19,7 @@ import base64
 import os
 import binascii
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import urlquote
 from libcloud.utils.py3 import tostring

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/storage/drivers/oss.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/oss.py b/libcloud/storage/drivers/oss.py
index 80b8f66..d374413 100644
--- a/libcloud/storage/drivers/oss.py
+++ b/libcloud/storage/drivers/oss.py
@@ -22,10 +22,7 @@ import time
 import sys
 from hashlib import sha1
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
+from libcloud.utils.py3 import ET
 
 try:
     from lxml.etree import Element, SubElement

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index b603a86..63c3046 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -19,9 +19,10 @@ import time
 
 from hashlib import sha1
 
-try:
+import libcloud.utils.py3
+if libcloud.utils.py3.DEFAULT_LXML:
     from lxml.etree import Element, SubElement
-except ImportError:
+else:
     from xml.etree.ElementTree import Element, SubElement
 
 from libcloud.utils.py3 import httplib

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/test/backup/test_dimensiondata_v2_3.py
----------------------------------------------------------------------
diff --git a/libcloud/test/backup/test_dimensiondata_v2_3.py b/libcloud/test/backup/test_dimensiondata_v2_3.py
index 9f9bb8d..13039d4 100644
--- a/libcloud/test/backup/test_dimensiondata_v2_3.py
+++ b/libcloud/test/backup/test_dimensiondata_v2_3.py
@@ -13,14 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
 import sys
 from libcloud.utils.py3 import httplib
-
+from libcloud.utils.py3 import ET
 from libcloud.common.dimensiondata import DimensionDataAPIException
 from libcloud.common.types import InvalidCredsError
 from libcloud.backup.base import BackupTargetJob

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/test/backup/test_dimensiondata_v2_4.py
----------------------------------------------------------------------
diff --git a/libcloud/test/backup/test_dimensiondata_v2_4.py b/libcloud/test/backup/test_dimensiondata_v2_4.py
index 706dfb1..64f5294 100644
--- a/libcloud/test/backup/test_dimensiondata_v2_4.py
+++ b/libcloud/test/backup/test_dimensiondata_v2_4.py
@@ -13,14 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
 import sys
 from libcloud.utils.py3 import httplib
-
+from libcloud.utils.py3 import ET
 from libcloud.common.dimensiondata import DimensionDataAPIException
 from libcloud.common.types import InvalidCredsError
 from libcloud.backup.base import BackupTargetJob

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/test/compute/test_abiquo.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_abiquo.py b/libcloud/test/compute/test_abiquo.py
index de95760..e5452ee 100644
--- a/libcloud/test/compute/test_abiquo.py
+++ b/libcloud/test/compute/test_abiquo.py
@@ -17,11 +17,7 @@ Abiquo Test Suite
 """
 import sys
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.utils.py3 import httplib
 
 from libcloud.compute.drivers.abiquo import AbiquoNodeDriver

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/test/compute/test_dimensiondata_v2_3.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata_v2_3.py b/libcloud/test/compute/test_dimensiondata_v2_3.py
index f181320..3bf7290 100644
--- a/libcloud/test/compute/test_dimensiondata_v2_3.py
+++ b/libcloud/test/compute/test_dimensiondata_v2_3.py
@@ -13,11 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
 import sys
 from types import GeneratorType
 from libcloud.utils.py3 import httplib
@@ -33,6 +28,7 @@ from libcloud.common.dimensiondata import TYPES_URN
 from libcloud.compute.drivers.dimensiondata import DimensionDataNodeDriver as DimensionData
 from libcloud.compute.drivers.dimensiondata import DimensionDataNic
 from libcloud.compute.base import Node, NodeAuthPassword, NodeLocation
+from libcloud.utils.py3 import ET
 from libcloud.test import MockHttp, unittest
 from libcloud.test.compute import TestCaseMixin
 from libcloud.test.file_fixtures import ComputeFileFixtures

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/test/compute/test_dimensiondata_v2_4.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata_v2_4.py b/libcloud/test/compute/test_dimensiondata_v2_4.py
index 73c6b43..f86a92f 100644
--- a/libcloud/test/compute/test_dimensiondata_v2_4.py
+++ b/libcloud/test/compute/test_dimensiondata_v2_4.py
@@ -13,15 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
 import sys
 from types import GeneratorType
 from libcloud.utils.py3 import httplib
-
+from libcloud.utils.py3 import ET
 from libcloud.common.types import InvalidCredsError
 from libcloud.common.dimensiondata import DimensionDataAPIException, NetworkDomainServicePlan
 from libcloud.common.dimensiondata import DimensionDataServerCpuSpecification, DimensionDataServerDisk,
DimensionDataServerVMWareTools

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/test/compute/test_vcloud.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_vcloud.py b/libcloud/test/compute/test_vcloud.py
index 28124bb..91175b2 100644
--- a/libcloud/test/compute/test_vcloud.py
+++ b/libcloud/test/compute/test_vcloud.py
@@ -16,13 +16,8 @@
 import sys
 import unittest
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
 from libcloud.utils.py3 import httplib, b
-
+from libcloud.utils.py3 import ET
 from libcloud.compute.drivers.vcloud import TerremarkDriver, VCloudNodeDriver, Subject
 from libcloud.compute.drivers.vcloud import VCloud_1_5_NodeDriver, ControlAccess
 from libcloud.compute.drivers.vcloud import VCloud_5_1_NodeDriver

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/test/storage/test_oss.py
----------------------------------------------------------------------
diff --git a/libcloud/test/storage/test_oss.py b/libcloud/test/storage/test_oss.py
index 142eda7..e796c03 100644
--- a/libcloud/test/storage/test_oss.py
+++ b/libcloud/test/storage/test_oss.py
@@ -24,11 +24,7 @@ try:
 except ImportError:
     from unittest import mock
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.utils.py3 import b
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import urlparse

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9abe5ca9/libcloud/test/storage/test_s3.py
----------------------------------------------------------------------
diff --git a/libcloud/test/storage/test_s3.py b/libcloud/test/storage/test_s3.py
index ed4f971..419885f 100644
--- a/libcloud/test/storage/test_s3.py
+++ b/libcloud/test/storage/test_s3.py
@@ -22,11 +22,7 @@ from io import BytesIO
 
 from hashlib import sha1
 
-try:
-    from lxml import etree as ET
-except ImportError:
-    from xml.etree import ElementTree as ET
-
+from libcloud.utils.py3 import ET
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import urlparse
 from libcloud.utils.py3 import parse_qs


Mime
View raw message