Author: aconway
Date: Tue Jul  8 20:30:48 2014
New Revision: 1608944

URL: http://svn.apache.org/r1608944
Log:
NO-JIRA: Introduced python compat module for backward compatibility hacks.

Added:
    qpid/dispatch/trunk/python/qpid_dispatch_internal/compat/__init__.py
    qpid/dispatch/trunk/python/qpid_dispatch_internal/compat/ordereddict.py
      - copied, changed from r1608943, 
qpid/dispatch/trunk/python/qpid_dispatch_internal/ordereddict.py
Removed:
    qpid/dispatch/trunk/python/qpid_dispatch_internal/ordereddict.py
Modified:
    qpid/dispatch/trunk/python/qpid_dispatch_internal/management/entity.py

Added: qpid/dispatch/trunk/python/qpid_dispatch_internal/compat/__init__.py
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/compat/__init__.py?rev=1608944&view=auto
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/compat/__init__.py (added)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/compat/__init__.py Tue 
Jul  8 20:30:48 2014
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License
+#
+
+"""Compatibility hacks for older versions of python"""
+
+try: from collections import OrderedDict
+except: from ordereddict import OrderedDict

Copied: qpid/dispatch/trunk/python/qpid_dispatch_internal/compat/ordereddict.py 
(from r1608943, 
qpid/dispatch/trunk/python/qpid_dispatch_internal/ordereddict.py)
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/compat/ordereddict.py?p2=qpid/dispatch/trunk/python/qpid_dispatch_internal/compat/ordereddict.py&p1=qpid/dispatch/trunk/python/qpid_dispatch_internal/ordereddict.py&r1=1608943&r2=1608944&rev=1608944&view=diff
==============================================================================
    (empty)

Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/management/entity.py
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/management/entity.py?rev=1608944&r1=1608943&r2=1608944&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/management/entity.py 
(original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/management/entity.py Tue 
Jul  8 20:30:48 2014
@@ -21,10 +21,7 @@
 Representation of management entities. An entity is a set of named attributes.
 """
 
-try:
-    from collections import OrderedDict
-except:
-    from qpid_dispatch_internal.ordereddict import OrderedDict # For python <= 
2.6
+from qpid_dispatch_internal.compat import OrderedDict
 
 
 class Entity(OrderedDict):



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to