[python-qpid] fixes to heartbeating and examples

Rafael Schloming rhs at fedoraproject.org
Tue Aug 10 19:54:19 UTC 2010


commit b3f92286964a980091b5bb07ce80431d0b09815a
Author: Rafael H. Schloming <rafaels at redhat.com>
Date:   Tue Aug 10 15:54:08 2010 -0400

    fixes to heartbeating and examples

 0001-BZ-597066.patch                               |    2 +-
 ...Fixed-connection.start-hangs-if-connectio.patch |    2 +-
 ...Fixed-qpid-python-high-level-API-clients-.patch |    2 +-
 ...dded-back-values-method-for-backwards-com.patch |    2 +-
 0005-BZ-567249-fix-for-python-2.3.patch            |    2 +-
 ...erformance-tweaks-for-receive-added-confi.patch |    2 +-
 ...817-don-t-always-set-the-sync-bit-on-send.patch |    2 +-
 ...eset-reconnect-delay-after-successful-con.patch |    2 +-
 ...dded-full-support-for-unreliable-at-least.patch |    2 +-
 ...dded-optional-timeouts-to-connection-sess.patch |    2 +-
 ...dded-support-for-x-amqp-0-10.-app-id-cont.patch |    2 +-
 ...ake-sure-we-initialize-properties-even-if.patch |    2 +-
 ...ix-timeout-tests-to-not-leave-queues-lyin.patch |    2 +-
 ...dd-uuid-prefix-to-addresses-beginning-wit.patch |    2 +-
 ...-fix-mangling-for-addresses-that-are-None.patch |    2 +-
 0016-BZ-608807-fixed-concurrent-close.patch        |    2 +-
 ...Z-609258-added-accessor-for-auth_username.patch |    2 +-
 0018-BZ-609258-fixed-auth-username-for-sasl.patch  |    2 +-
 ...Assertion-when-raising-a-link-established.patch |    2 +-
 ...-convert-ttl-from-seconds-to-milliseconds.patch |    2 +-
 ...ixed-payload-of-None-for-text-plain-messa.patch |    2 +-
 0022-removed-old-python-examples.patch             |    2 +-
 ...ixed-missign-import-and-added-test-case-f.patch |    2 +-
 ...liminate-spurious-error-logging-and-recon.patch |    2 +-
 ...ixed-parsing-of-failover-URLs-fixed-drive.patch |    2 +-
 ...Z-614344-default-ports-for-reconnect_urls.patch |    2 +-
 ...ixed-bug-in-flow-control-logic-added-test.patch |    2 +-
 0028-BZ-621998-fixed-heartbeating.patch            |  160 ++++++++++++++++++++
 ...ditional-assignment-to-vanilla-if-then-el.patch |   36 +++++
 ...ally-Python-before-2.5-did-not-allow-fina.patch |   39 +++++
 python-qpid.spec                                   |   12 ++-
 31 files changed, 272 insertions(+), 29 deletions(-)
---
diff --git a/0001-BZ-597066.patch b/0001-BZ-597066.patch
index 0b94e8b..cd0ecc3 100644
--- a/0001-BZ-597066.patch
+++ b/0001-BZ-597066.patch
@@ -1,7 +1,7 @@
 From 7f006841387b54cb0165cfa6d1423cd3fae06ce2 Mon Sep 17 00:00:00 2001
 From: Gordon Sim <gsim at apache.org>
 Date: Tue, 1 Jun 2010 09:25:23 +0000
-Subject: [PATCH 01/27] BZ-597066
+Subject: [PATCH 01/30] BZ-597066
 
 Don't use guest/guest default username/password, use None instead (this allows sasl implementation to infer the correct choice while retaining the ability to override it should that be desired)
 
diff --git a/0002-Bug-538188-Fixed-connection.start-hangs-if-connectio.patch b/0002-Bug-538188-Fixed-connection.start-hangs-if-connectio.patch
index aaa00d3..4fe087c 100644
--- a/0002-Bug-538188-Fixed-connection.start-hangs-if-connectio.patch
+++ b/0002-Bug-538188-Fixed-connection.start-hangs-if-connectio.patch
@@ -1,7 +1,7 @@
 From 9e7d9497b8665b51075ddcfd1d01d805f009f78b Mon Sep 17 00:00:00 2001
 From: Gordon Sim <gsim at apache.org>
 Date: Wed, 2 Jun 2010 10:24:10 +0000
-Subject: [PATCH 02/27] Bug 538188 - Fixed connection.start() hangs if connection is not accepted
+Subject: [PATCH 02/30] Bug 538188 - Fixed connection.start() hangs if connection is not accepted
 
 QPID-2637: Mark connection as failed if read from socket fails
 
diff --git a/0003-Bug-597149-Fixed-qpid-python-high-level-API-clients-.patch b/0003-Bug-597149-Fixed-qpid-python-high-level-API-clients-.patch
index 5e739af..a9044d4 100644
--- a/0003-Bug-597149-Fixed-qpid-python-high-level-API-clients-.patch
+++ b/0003-Bug-597149-Fixed-qpid-python-high-level-API-clients-.patch
@@ -1,7 +1,7 @@
 From 4ee966781844a3757eaa44ebf4690105c2f18850 Mon Sep 17 00:00:00 2001
 From: Gordon Sim <gsim at apache.org>
 Date: Wed, 9 Jun 2010 15:37:02 +0000
-Subject: [PATCH 03/27] Bug 597149 - Fixed - qpid python high level API clients not runnable on RHEL4 incompatible with python 2.3.4 OptionParser
+Subject: [PATCH 03/30] Bug 597149 - Fixed - qpid python high level API clients not runnable on RHEL4 incompatible with python 2.3.4 OptionParser
 
 Minor adjustment to option definitions for Python 2.3
 
diff --git a/0004-BZ-567249-added-back-values-method-for-backwards-com.patch b/0004-BZ-567249-added-back-values-method-for-backwards-com.patch
index c1138dd..64843c6 100644
--- a/0004-BZ-567249-added-back-values-method-for-backwards-com.patch
+++ b/0004-BZ-567249-added-back-values-method-for-backwards-com.patch
@@ -1,7 +1,7 @@
 From 38ce79eee4d48e2be75c6d74ded2c383fba5810c Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 15 Jun 2010 10:11:39 +0000
-Subject: [PATCH 04/27] BZ-567249 added back values method for backwards compatibility
+Subject: [PATCH 04/30] BZ-567249 added back values method for backwards compatibility
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@954787 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0005-BZ-567249-fix-for-python-2.3.patch b/0005-BZ-567249-fix-for-python-2.3.patch
index 5d6b82b..3b5126e 100644
--- a/0005-BZ-567249-fix-for-python-2.3.patch
+++ b/0005-BZ-567249-fix-for-python-2.3.patch
@@ -1,7 +1,7 @@
 From 4e05457ddfe178ac4cfa55bb1dcd6986c272e500 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 15 Jun 2010 14:13:15 +0000
-Subject: [PATCH 05/27] BZ-567249 fix for python 2.3
+Subject: [PATCH 05/30] BZ-567249 fix for python 2.3
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@954901 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0006-BZ-596677-performance-tweaks-for-receive-added-confi.patch b/0006-BZ-596677-performance-tweaks-for-receive-added-confi.patch
index abc742d..e1b9fca 100644
--- a/0006-BZ-596677-performance-tweaks-for-receive-added-confi.patch
+++ b/0006-BZ-596677-performance-tweaks-for-receive-added-confi.patch
@@ -1,7 +1,7 @@
 From b0ae853c18fad859d5e7daabcb0598ab2d197ea6 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 16 Jun 2010 16:47:18 +0000
-Subject: [PATCH 06/27] BZ-596677 performance tweaks for receive: added configurable threshold for issuing credit; don't disable byte credit more than necessary; avoided n-squared loop for generating acks
+Subject: [PATCH 06/30] BZ-596677 performance tweaks for receive: added configurable threshold for issuing credit; don't disable byte credit more than necessary; avoided n-squared loop for generating acks
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@955296 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0007-BZ-574817-don-t-always-set-the-sync-bit-on-send.patch b/0007-BZ-574817-don-t-always-set-the-sync-bit-on-send.patch
index 43b0f6d..843d5f3 100644
--- a/0007-BZ-574817-don-t-always-set-the-sync-bit-on-send.patch
+++ b/0007-BZ-574817-don-t-always-set-the-sync-bit-on-send.patch
@@ -1,7 +1,7 @@
 From e1c3a645453c2796b67625a1e00341894777f223 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 16 Jun 2010 22:15:14 +0000
-Subject: [PATCH 07/27] BZ-574817 don't always set the sync bit on send
+Subject: [PATCH 07/30] BZ-574817 don't always set the sync bit on send
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@955414 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0008-BZ-604836-reset-reconnect-delay-after-successful-con.patch b/0008-BZ-604836-reset-reconnect-delay-after-successful-con.patch
index 6136d47..712d96e 100644
--- a/0008-BZ-604836-reset-reconnect-delay-after-successful-con.patch
+++ b/0008-BZ-604836-reset-reconnect-delay-after-successful-con.patch
@@ -1,7 +1,7 @@
 From df73fc4c6a53f8b266fb88af60ea68df03057668 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Thu, 17 Jun 2010 02:18:24 +0000
-Subject: [PATCH 08/27] BZ-604836 reset reconnect delay after successful connect
+Subject: [PATCH 08/30] BZ-604836 reset reconnect delay after successful connect
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@955462 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0009-BZ-560707-added-full-support-for-unreliable-at-least.patch b/0009-BZ-560707-added-full-support-for-unreliable-at-least.patch
index e2270d7..764698e 100644
--- a/0009-BZ-560707-added-full-support-for-unreliable-at-least.patch
+++ b/0009-BZ-560707-added-full-support-for-unreliable-at-least.patch
@@ -1,7 +1,7 @@
 From 3f3e6086766770c3d7e1a7cf9afdfaedce82dd18 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Thu, 24 Jun 2010 17:34:34 +0000
-Subject: [PATCH 09/27] BZ-560707 added full support for unreliable, at-least-once, and at-most-once reliability options
+Subject: [PATCH 09/30] BZ-560707 added full support for unreliable, at-least-once, and at-most-once reliability options
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@957644 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0010-BZ-569515-added-optional-timeouts-to-connection-sess.patch b/0010-BZ-569515-added-optional-timeouts-to-connection-sess.patch
index 228d9dd..0360dad 100644
--- a/0010-BZ-569515-added-optional-timeouts-to-connection-sess.patch
+++ b/0010-BZ-569515-added-optional-timeouts-to-connection-sess.patch
@@ -1,7 +1,7 @@
 From 495213b8cc66dc00c15662c559a48dcf04516fd7 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 17:09:05 +0000
-Subject: [PATCH 10/27] BZ-569515 added optional timeouts to {connection,session,sender,receiver}.close() as well as connection.detach() and {session,sender}.sync()
+Subject: [PATCH 10/30] BZ-569515 added optional timeouts to {connection,session,sender,receiver}.close() as well as connection.detach() and {session,sender}.sync()
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958037 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0011-BZ-608118-added-support-for-x-amqp-0-10.-app-id-cont.patch b/0011-BZ-608118-added-support-for-x-amqp-0-10.-app-id-cont.patch
index 9e51781..558f730 100644
--- a/0011-BZ-608118-added-support-for-x-amqp-0-10.-app-id-cont.patch
+++ b/0011-BZ-608118-added-support-for-x-amqp-0-10.-app-id-cont.patch
@@ -1,7 +1,7 @@
 From 9201b99100d8d47b3ed92573eea0e71969996418 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 18:12:28 +0000
-Subject: [PATCH 11/27] BZ-608118 added support for x-amqp-0-10.{app-id,content-encoding,routing-key}
+Subject: [PATCH 11/30] BZ-608118 added support for x-amqp-0-10.{app-id,content-encoding,routing-key}
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958055 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0012-BZ-608118-make-sure-we-initialize-properties-even-if.patch b/0012-BZ-608118-make-sure-we-initialize-properties-even-if.patch
index 3086847..5a0366f 100644
--- a/0012-BZ-608118-make-sure-we-initialize-properties-even-if.patch
+++ b/0012-BZ-608118-make-sure-we-initialize-properties-even-if.patch
@@ -1,7 +1,7 @@
 From d5086ed9cd510ce9f1dc80da90315518d5c3ebd2 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 18:26:14 +0000
-Subject: [PATCH 12/27] BZ-608118 make sure we initialize properties even if application_headers is None
+Subject: [PATCH 12/30] BZ-608118 make sure we initialize properties even if application_headers is None
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958060 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0013-BZ-569515-fix-timeout-tests-to-not-leave-queues-lyin.patch b/0013-BZ-569515-fix-timeout-tests-to-not-leave-queues-lyin.patch
index 1c1ee22..8c461f2 100644
--- a/0013-BZ-569515-fix-timeout-tests-to-not-leave-queues-lyin.patch
+++ b/0013-BZ-569515-fix-timeout-tests-to-not-leave-queues-lyin.patch
@@ -1,7 +1,7 @@
 From ee19a4688911a9fc55dea5f3176e99d6b77acafe Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 18:57:59 +0000
-Subject: [PATCH 13/27] BZ-569515 fix timeout tests to not leave queues lying around
+Subject: [PATCH 13/30] BZ-569515 fix timeout tests to not leave queues lying around
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958077 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0014-BZ-607798-add-uuid-prefix-to-addresses-beginning-wit.patch b/0014-BZ-607798-add-uuid-prefix-to-addresses-beginning-wit.patch
index 92d54dc..2d78bc9 100644
--- a/0014-BZ-607798-add-uuid-prefix-to-addresses-beginning-wit.patch
+++ b/0014-BZ-607798-add-uuid-prefix-to-addresses-beginning-wit.patch
@@ -1,7 +1,7 @@
 From 1834e02e7dd0abd92d4bee09818f86f4fb6af89b Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 19:06:05 +0000
-Subject: [PATCH 14/27] BZ-607798 add uuid prefix to addresses beginning with hash(#)
+Subject: [PATCH 14/30] BZ-607798 add uuid prefix to addresses beginning with hash(#)
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958083 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0015-BZ-607798-fix-mangling-for-addresses-that-are-None.patch b/0015-BZ-607798-fix-mangling-for-addresses-that-are-None.patch
index 2062233..c8af553 100644
--- a/0015-BZ-607798-fix-mangling-for-addresses-that-are-None.patch
+++ b/0015-BZ-607798-fix-mangling-for-addresses-that-are-None.patch
@@ -1,7 +1,7 @@
 From dcc6c20a11f1dffac6708a128517757e7b1e0324 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Mon, 28 Jun 2010 11:35:59 +0000
-Subject: [PATCH 15/27] BZ-607798 fix mangling for addresses that are None
+Subject: [PATCH 15/30] BZ-607798 fix mangling for addresses that are None
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958547 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0016-BZ-608807-fixed-concurrent-close.patch b/0016-BZ-608807-fixed-concurrent-close.patch
index 8bc755b..d2bdd3f 100644
--- a/0016-BZ-608807-fixed-concurrent-close.patch
+++ b/0016-BZ-608807-fixed-concurrent-close.patch
@@ -1,7 +1,7 @@
 From 62d79016f13c729abccba7a84d1dbb33ec94d9d5 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 30 Jun 2010 12:44:58 +0000
-Subject: [PATCH 16/27] BZ-608807 fixed concurrent close
+Subject: [PATCH 16/30] BZ-608807 fixed concurrent close
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@959289 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0017-BZ-609258-added-accessor-for-auth_username.patch b/0017-BZ-609258-added-accessor-for-auth_username.patch
index 7302654..681626c 100644
--- a/0017-BZ-609258-added-accessor-for-auth_username.patch
+++ b/0017-BZ-609258-added-accessor-for-auth_username.patch
@@ -1,7 +1,7 @@
 From d31918432748c8e6f3596548796fb45bf778b20e Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 30 Jun 2010 14:25:03 +0000
-Subject: [PATCH 17/27] BZ-609258 added accessor for auth_username
+Subject: [PATCH 17/30] BZ-609258 added accessor for auth_username
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@959326 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0018-BZ-609258-fixed-auth-username-for-sasl.patch b/0018-BZ-609258-fixed-auth-username-for-sasl.patch
index 0f342be..67cd9d5 100644
--- a/0018-BZ-609258-fixed-auth-username-for-sasl.patch
+++ b/0018-BZ-609258-fixed-auth-username-for-sasl.patch
@@ -1,7 +1,7 @@
 From 5c3a50f97f327161fd5bd991c8ef4a8b6aece62a Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 30 Jun 2010 14:36:43 +0000
-Subject: [PATCH 18/27] BZ-609258 fixed auth username for sasl
+Subject: [PATCH 18/30] BZ-609258 fixed auth username for sasl
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@959333 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0019-Bug-611543-Assertion-when-raising-a-link-established.patch b/0019-Bug-611543-Assertion-when-raising-a-link-established.patch
index 059e06f..5c7c3b9 100644
--- a/0019-Bug-611543-Assertion-when-raising-a-link-established.patch
+++ b/0019-Bug-611543-Assertion-when-raising-a-link-established.patch
@@ -1,7 +1,7 @@
 From ba83c5fd4c4cccae42240c70473d8d37fd8d3fcb Mon Sep 17 00:00:00 2001
 From: Alan Conway <aconway at apache.org>
 Date: Mon, 5 Jul 2010 20:12:08 +0000
-Subject: [PATCH 19/27] Bug 611543  - Assertion when raising a link established event on clustered broker
+Subject: [PATCH 19/30] Bug 611543  - Assertion when raising a link established event on clustered broker
 
 Defer delivery of messages in cluster-unsafe context.
 
diff --git a/0020-BZ-612615-convert-ttl-from-seconds-to-milliseconds.patch b/0020-BZ-612615-convert-ttl-from-seconds-to-milliseconds.patch
index 19eb3ba..449e88f 100644
--- a/0020-BZ-612615-convert-ttl-from-seconds-to-milliseconds.patch
+++ b/0020-BZ-612615-convert-ttl-from-seconds-to-milliseconds.patch
@@ -1,7 +1,7 @@
 From a0e4c21893973aea53b773381ee6ca2c7e6dbcb2 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Thu, 8 Jul 2010 15:53:49 +0000
-Subject: [PATCH 20/27] BZ-612615 convert ttl from seconds to milliseconds
+Subject: [PATCH 20/30] BZ-612615 convert ttl from seconds to milliseconds
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@961824 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0021-BZ-613216-fixed-payload-of-None-for-text-plain-messa.patch b/0021-BZ-613216-fixed-payload-of-None-for-text-plain-messa.patch
index fc26882..b5c25a6 100644
--- a/0021-BZ-613216-fixed-payload-of-None-for-text-plain-messa.patch
+++ b/0021-BZ-613216-fixed-payload-of-None-for-text-plain-messa.patch
@@ -1,7 +1,7 @@
 From ee2dcac6734efed72b2379cf22437799e8f39efc Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Mon, 12 Jul 2010 13:43:27 +0000
-Subject: [PATCH 21/27] BZ-613216 fixed payload of None for text/plain messages
+Subject: [PATCH 21/30] BZ-613216 fixed payload of None for text/plain messages
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@963280 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0022-removed-old-python-examples.patch b/0022-removed-old-python-examples.patch
index fc93210..8283692 100644
--- a/0022-removed-old-python-examples.patch
+++ b/0022-removed-old-python-examples.patch
@@ -1,7 +1,7 @@
 From 3d0eebd14b24321d5c91662c873c1b689c360150 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 13 Jul 2010 16:33:24 +0000
-Subject: [PATCH 22/27] removed old python examples
+Subject: [PATCH 22/30] removed old python examples
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@963786 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0023-BZ-613912-fixed-missign-import-and-added-test-case-f.patch b/0023-BZ-613912-fixed-missign-import-and-added-test-case-f.patch
index 8d147c2..551af1a 100644
--- a/0023-BZ-613912-fixed-missign-import-and-added-test-case-f.patch
+++ b/0023-BZ-613912-fixed-missign-import-and-added-test-case-f.patch
@@ -1,7 +1,7 @@
 From dee1c0cebff68b694ed6e80be79b8943ebb40574 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 13 Jul 2010 17:58:44 +0000
-Subject: [PATCH 23/27] BZ-613912 fixed missign import and added test case for reconnect_urls
+Subject: [PATCH 23/30] BZ-613912 fixed missign import and added test case for reconnect_urls
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@963803 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch b/0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch
index 6ec560d..fc93c52 100644
--- a/0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch
+++ b/0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch
@@ -1,7 +1,7 @@
 From 69472698c9455b198d70e7b61ae2f1f06a8ff783 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 13 Jul 2010 19:07:22 +0000
-Subject: [PATCH 24/27] BZ-614054 eliminate spurious error logging and reconnect attempts
+Subject: [PATCH 24/30] BZ-614054 eliminate spurious error logging and reconnect attempts
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@963825 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch b/0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch
index c826b31..ec85913 100644
--- a/0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch
+++ b/0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch
@@ -1,7 +1,7 @@
 From 5387d39d66787509b3d687be7247dcf8a2d4b207 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 14 Jul 2010 13:36:03 +0000
-Subject: [PATCH 25/27] BZ-614054 fixed parsing of failover URLs; fixed driver to notice when reconnect_urls is dynamically changed
+Subject: [PATCH 25/30] BZ-614054 fixed parsing of failover URLs; fixed driver to notice when reconnect_urls is dynamically changed
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@964044 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0026-BZ-614344-default-ports-for-reconnect_urls.patch b/0026-BZ-614344-default-ports-for-reconnect_urls.patch
index b81737f..0ea34cc 100644
--- a/0026-BZ-614344-default-ports-for-reconnect_urls.patch
+++ b/0026-BZ-614344-default-ports-for-reconnect_urls.patch
@@ -1,7 +1,7 @@
 From 0e2870b1d18706721055ddf73fc4e7a6b84cf674 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 14 Jul 2010 19:47:37 +0000
-Subject: [PATCH 26/27] BZ-614344 default ports for reconnect_urls
+Subject: [PATCH 26/30] BZ-614344 default ports for reconnect_urls
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@964151 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0027-BZ-620402-fixed-bug-in-flow-control-logic-added-test.patch b/0027-BZ-620402-fixed-bug-in-flow-control-logic-added-test.patch
index cea7449..e387110 100644
--- a/0027-BZ-620402-fixed-bug-in-flow-control-logic-added-test.patch
+++ b/0027-BZ-620402-fixed-bug-in-flow-control-logic-added-test.patch
@@ -1,7 +1,7 @@
 From 98d60f067c05a308f82b23fcdfa87494d783daa1 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Mon, 2 Aug 2010 12:10:52 +0000
-Subject: [PATCH 27/27] BZ-620402 fixed bug in flow control logic; added tests
+Subject: [PATCH 27/30] BZ-620402 fixed bug in flow control logic; added tests
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@981474 13f79535-47bb-0310-9956-ffa450edef68
 ---
diff --git a/0028-BZ-621998-fixed-heartbeating.patch b/0028-BZ-621998-fixed-heartbeating.patch
new file mode 100644
index 0000000..105b90d
--- /dev/null
+++ b/0028-BZ-621998-fixed-heartbeating.patch
@@ -0,0 +1,160 @@
+From e81d614bcfe0227d41f57e6f0ea2156bf057ca11 Mon Sep 17 00:00:00 2001
+From: Rafael H. Schloming <rhs at apache.org>
+Date: Mon, 9 Aug 2010 11:53:25 +0000
+Subject: [PATCH 28/30] BZ-621998 fixed heartbeating
+
+git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@983597 13f79535-47bb-0310-9956-ffa450edef68
+---
+ qpid/python/qpid/messaging/driver.py     |   41 +++++++++++++++++++++++++++---
+ qpid/python/qpid/messaging/exceptions.py |    3 ++
+ 2 files changed, 40 insertions(+), 4 deletions(-)
+
+diff --git a/qpid/python/qpid/messaging/driver.py b/qpid/python/qpid/messaging/driver.py
+index 9b34a46..567871b 100644
+--- a/qpid/python/qpid/messaging/driver.py
++++ b/qpid/python/qpid/messaging/driver.py
+@@ -339,6 +339,7 @@ class Driver:
+     self._reconnect_log = self.connection.reconnect_log
+     self._host = 0
+     self._retrying = False
++    self._next_retry = None
+     self._transport = None
+ 
+     self._timeout = None
+@@ -427,7 +428,7 @@ class Driver:
+         delay = self._delay
+         self._delay = min(2*self._delay,
+                           self.connection.reconnect_interval_max)
+-      self._timeout = time.time() + delay
++      self._next_retry = time.time() + delay
+       if self._reconnect_log:
+         log.warn("recoverable error[attempt %s]: %s" % (self._attempts, e))
+         if delay > 0:
+@@ -437,6 +438,8 @@ class Driver:
+     else:
+       self.engine.close(e)
+ 
++    self.schedule()
++
+   def update_status(self):
+     status = self.engine.status()
+     return getattr(self, "st_%s" % status.lower())()
+@@ -471,6 +474,18 @@ class Driver:
+   def timeout(self):
+     self.dispatch()
+     self._notify()
++    self.schedule()
++
++  def schedule(self):
++    times = []
++    if self.connection.heartbeat:
++      times.append(time.time() + self.connection.heartbeat)
++    if self._next_retry:
++      times.append(self._next_retry)
++    if times:
++      self._timeout = min(times)
++    else:
++      self._timeout = None
+ 
+   def dispatch(self):
+     try:
+@@ -479,12 +494,17 @@ class Driver:
+           self.connect()
+       else:
+         self.engine.dispatch()
++    except HeartbeatTimeout, e:
++      self.close_engine(e)
+     except:
+       # XXX: Does socket get leaked if this occurs?
+       msg = compat.format_exc()
+       self.connection.error = InternalError(text=msg)
+ 
+   def connect(self):
++    if self._retrying and time.time() < self._next_retry:
++      return
++
+     try:
+       # XXX: should make this non blocking
+       host, port = self._next_host()
+@@ -500,11 +520,12 @@ class Driver:
+         raise ConnectError("no such transport: %s" % self.connection.transport)
+       if self._retrying and self._reconnect_log:
+         log.warn("reconnect succeeded: %s:%s", host, port)
+-      self._timeout = None
++      self._next_retry = None
+       self._attempts = 0
+       self._host = 0
+       self._delay = self.connection.reconnect_interval_min
+       self._retrying = False
++      self.schedule()
+     except socket.error, e:
+       self.close_engine(ConnectError(text=str(e)))
+ 
+@@ -556,6 +577,8 @@ class Engine:
+     self._status = CLOSED
+     self._buf = ""
+     self._hdr = ""
++    self._last_in = None
++    self._last_out = None
+     self._op_enc = OpEncoder()
+     self._seg_enc = SegmentEncoder()
+     self._frame_enc = FrameEncoder()
+@@ -595,6 +618,7 @@ class Engine:
+     return self._status
+ 
+   def write(self, data):
++    self._last_in = time.time()
+     try:
+       if self._sasl_decode:
+         data = self._sasl.decode(data)
+@@ -652,6 +676,7 @@ class Engine:
+     if self._sasl_encode:
+       bytes = self._sasl.encode(bytes)
+     self._buf += bytes
++    self._last_out = time.time()
+ 
+   def do_header(self, hdr):
+     cli_major = 0; cli_minor = 10
+@@ -689,8 +714,8 @@ class Engine:
+     self._sasl_decode = True
+     self.connection._transport_connected = True
+ 
+-  def connection_heartbeat(self, hrt):
+-    self.write_op(ConnectionHeartbeat())
++  def do_connection_heartbeat(self, hrt):
++    pass
+ 
+   def do_connection_close(self, close):
+     self.write_op(ConnectionCloseOk())
+@@ -766,6 +791,14 @@ class Engine:
+         self.attach(ssn)
+         self.process(ssn)
+ 
++      if self.connection.heartbeat and self._status != CLOSED:
++        now = time.time()
++        if self._last_in is not None and \
++              now - self._last_in > 2*self.connection.heartbeat:
++          raise HeartbeatTimeout(text="heartbeat timeout")
++        if self._last_out is None or now - self._last_out >= self.connection.heartbeat/2.0:
++          self.write_op(ConnectionHeartbeat())
++
+   def open(self):
+     self._reset()
+     self._status = OPEN
+diff --git a/qpid/python/qpid/messaging/exceptions.py b/qpid/python/qpid/messaging/exceptions.py
+index 27bc5af..0296d61 100644
+--- a/qpid/python/qpid/messaging/exceptions.py
++++ b/qpid/python/qpid/messaging/exceptions.py
+@@ -63,6 +63,9 @@ class AuthenticationFailure(ConnectError):
+ class ConnectionClosed(ConnectionError):
+   pass
+ 
++class HeartbeatTimeout(ConnectionError):
++  pass
++
+ ## Session Errors
+ 
+ class SessionError(MessagingError):
+-- 
+1.7.2
+
diff --git a/0029-Changed-conditional-assignment-to-vanilla-if-then-el.patch b/0029-Changed-conditional-assignment-to-vanilla-if-then-el.patch
new file mode 100644
index 0000000..1e614ed
--- /dev/null
+++ b/0029-Changed-conditional-assignment-to-vanilla-if-then-el.patch
@@ -0,0 +1,36 @@
+From 688688c265d541a47aade8f4290af064a47ef286 Mon Sep 17 00:00:00 2001
+From: Jonathan Robie <jonathan at apache.org>
+Date: Mon, 9 Aug 2010 16:34:04 +0000
+Subject: [PATCH 29/30] Changed conditional assignment to vanilla if/then/else, for compatibility with older Python.
+
+git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@983718 13f79535-47bb-0310-9956-ffa450edef68
+(cherry picked from commit 4b67ae91be27048aca8ded77b1089dd0487eff03)
+---
+ qpid/python/examples/api/hello |   11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/qpid/python/examples/api/hello b/qpid/python/examples/api/hello
+index 4644189..a220fe7 100755
+--- a/qpid/python/examples/api/hello
++++ b/qpid/python/examples/api/hello
+@@ -21,8 +21,15 @@
+ import sys
+ from qpid.messaging import *
+ 
+-broker =  "localhost:5672" if len(sys.argv)<2 else sys.argv[1]
+-address = "amq.topic" if len(sys.argv)<3 else sys.argv[2]
++if len(sys.argv)<2:
++  broker =  "localhost:5672" 
++else:
++  broker = sys.argv[1]
++
++if len(sys.argv)<3: 
++  address = "amq.topic" 
++else:
++  address = sys.argv[2]
+ 
+ connection = Connection(broker)
+ 
+-- 
+1.7.2
+
diff --git a/0030-Removed-finally-Python-before-2.5-did-not-allow-fina.patch b/0030-Removed-finally-Python-before-2.5-did-not-allow-fina.patch
new file mode 100644
index 0000000..94b2bc2
--- /dev/null
+++ b/0030-Removed-finally-Python-before-2.5-did-not-allow-fina.patch
@@ -0,0 +1,39 @@
+From 1ca7496b9db44598aabf63c729e8dde926805a81 Mon Sep 17 00:00:00 2001
+From: Jonathan Robie <jonathan at apache.org>
+Date: Mon, 9 Aug 2010 17:31:40 +0000
+Subject: [PATCH 30/30] Removed finally - Python before 2.5 did not allow finally together with specific exceptions.
+
+git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@983743 13f79535-47bb-0310-9956-ffa450edef68
+(cherry picked from commit e3bc2893e6a3fae16079ba7bdcb034f3026fee76)
+---
+ qpid/python/examples/api/hello     |    4 ++--
+ qpid/python/examples/api/hello_xml |    4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/qpid/python/examples/api/hello b/qpid/python/examples/api/hello
+index a220fe7..ad314da 100755
+--- a/qpid/python/examples/api/hello
++++ b/qpid/python/examples/api/hello
+@@ -48,5 +48,5 @@ try:
+ 
+ except MessagingError,m:
+   print m
+-finally:
+-  connection.close()
++
++connection.close()
+diff --git a/qpid/python/examples/api/hello_xml b/qpid/python/examples/api/hello_xml
+index 07c2b13..ab567ec 100755
+--- a/qpid/python/examples/api/hello_xml
++++ b/qpid/python/examples/api/hello_xml
+@@ -73,5 +73,5 @@ try:
+ 
+ except MessagingError,m:
+   print m
+-finally:
+-  connection.close()
++
++connection.close()
+-- 
+1.7.2
+
diff --git a/python-qpid.spec b/python-qpid.spec
index d98c48b..b5c0cf8 100644
--- a/python-qpid.spec
+++ b/python-qpid.spec
@@ -3,7 +3,7 @@
 
 Name:           python-qpid
 Version:        0.7.946106
-Release:        11%{?dist}
+Release:        12%{?dist}
 Summary:        Python client library for AMQP
 
 Group:          Development/Python
@@ -40,6 +40,9 @@ Patch23:        0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch
 Patch24:        0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch
 Patch25:        0026-BZ-614344-default-ports-for-reconnect_urls.patch
 Patch26:        0027-BZ-620402-fixed-bug-in-flow-control-logic-added-test.patch
+Patch27:        0028-BZ-621998-fixed-heartbeating.patch
+Patch28:        0029-Changed-conditional-assignment-to-vanilla-if-then-el.patch
+Patch29:        0030-Removed-finally-Python-before-2.5-did-not-allow-fina.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
@@ -78,6 +81,9 @@ The Apache Qpid Python client library for AMQP.
 %patch24 -p3
 %patch25 -p3
 %patch26 -p3
+%patch27 -p3
+%patch28 -p3
+%patch29 -p3
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
@@ -101,7 +107,9 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
-* Mon Aug  2 2010 Rafael Schloming <rafaels at redhat.com> - 0.7.946106-11
+* Mon Aug  2 2010 Rafael Schloming <rafaels at redhat.com> - 0.7.946106-12
+- Fixes to examples for compatibility with older python versions
+- Fix for bz621998
 - Fix for bz620402
 
 * Wed Jul 14 2010 Rafael Schloming <rafaels at redhat.com> - 0.7.946106-9


More information about the scm-commits mailing list