You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/04/24 02:20:30 UTC

[1/6] libcloud git commit: make ET/LXML a toggle instead of trying to import. Effectively makes LXML non-default

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 <an...@apache.org>
Authored: Mon Apr 24 11:02:31 2017 +1000
Committer: Anthony Shaw <an...@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


[6/6] libcloud git commit: Changes for #1039

Posted by an...@apache.org.
Changes for #1039

Closes #1039


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

Branch: refs/heads/trunk
Commit: 45101531e327bae25bd29bf7e2fa2c9796e71d27
Parents: b352e50
Author: Anthony Shaw <an...@apache.org>
Authored: Mon Apr 24 12:20:03 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Apr 24 12:20:03 2017 +1000

----------------------------------------------------------------------
 CHANGES.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/45101531/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 661ed6d..cd77302 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,17 @@
 \ufeffChangelog
 =========
 
+Changes in current version of Apache Libcloud
+---------------------------------------------
+
+Common
+~~~~~~
+
+- Use of LXML is now disabled by defalt, use libcloud.utils.py3.DEFAULT_LXML = True to reenable. LXML has compatibility 
+  issues with a number of drivers and etree is a standard package
+  [GITHUB-1038]
+  (Anthony Shaw)
+
 Changes in Apache Libcloud 2.0.0
 --------------------------------
 


[5/6] libcloud git commit: fix etree import

Posted by an...@apache.org.
fix etree import


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

Branch: refs/heads/trunk
Commit: b352e504cce0bec552598c666a7791fa96561d1e
Parents: 0e61f16
Author: Anthony Shaw <an...@apache.org>
Authored: Mon Apr 24 12:01:48 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Apr 24 12:01:48 2017 +1000

----------------------------------------------------------------------
 libcloud/storage/drivers/s3.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b352e504/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index b73a628..826ed77 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -24,9 +24,9 @@ try:
     if libcloud.utils.py3.DEFAULT_LXML:
         from lxml.etree import Element, SubElement
     else:
-        from xml.etree import Element, SubElement
+        from xml.etree.ElementTree import Element, SubElement
 except ImportError:
-    from xml.etree import Element, SubElement
+    from xml.etree.ElementTree import Element, SubElement
 
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import urlquote


[2/6] libcloud git commit: fix linting issue in secrets template

Posted by an...@apache.org.
fix linting issue in secrets template


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

Branch: refs/heads/trunk
Commit: 4229ddf5478c8b6da6603f1f2486ddb000cbee81
Parents: 9abe5ca
Author: Anthony Shaw <an...@apache.org>
Authored: Mon Apr 24 11:04:56 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Apr 24 11:04:56 2017 +1000

----------------------------------------------------------------------
 libcloud/test/secrets.py-dist | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4229ddf5/libcloud/test/secrets.py-dist
----------------------------------------------------------------------
diff --git a/libcloud/test/secrets.py-dist b/libcloud/test/secrets.py-dist
index 0df69f4..b44be36 100644
--- a/libcloud/test/secrets.py-dist
+++ b/libcloud/test/secrets.py-dist
@@ -28,7 +28,7 @@ HOSTINGCOM_PARAMS = ('user', 'secret')
 IBM_PARAMS = ('user', 'secret')
 ONAPP_PARAMS = ('key')
 # OPENSTACK_PARAMS = ('user_name', 'api_key', secure_bool, 'host', port_int)
-ONEANDONE_PARAMS =('token')
+ONEANDONE_PARAMS = ('token')
 OPENSTACK_PARAMS = ('user_name', 'api_key', False, 'host', 8774)
 OPENNEBULA_PARAMS = ('user', 'key')
 DIMENSIONDATA_PARAMS = ('user', 'password')


[3/6] libcloud git commit: better fault handling for s3 import

Posted by an...@apache.org.
better fault handling for s3 import


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

Branch: refs/heads/trunk
Commit: 13df973f2c92f60d0295b0a15437fef891034473
Parents: 4229ddf
Author: Anthony Shaw <an...@apache.org>
Authored: Mon Apr 24 11:13:56 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Apr 24 11:13:56 2017 +1000

----------------------------------------------------------------------
 libcloud/storage/drivers/s3.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


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


[4/6] libcloud git commit: s3 toggle

Posted by an...@apache.org.
s3 toggle


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

Branch: refs/heads/trunk
Commit: 0e61f16cea8266970c542a79ca847e781abefc48
Parents: 13df973
Author: Anthony Shaw <an...@apache.org>
Authored: Mon Apr 24 11:18:46 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Mon Apr 24 11:18:46 2017 +1000

----------------------------------------------------------------------
 libcloud/storage/drivers/s3.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0e61f16c/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index 0af858a..b73a628 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -21,7 +21,7 @@ from hashlib import sha1
 
 import libcloud.utils.py3
 try:
-    if DEFAULT_LXML:
+    if libcloud.utils.py3.DEFAULT_LXML:
         from lxml.etree import Element, SubElement
     else:
         from xml.etree import Element, SubElement