[Python-modules-commits] [python-amqp] 01/01: Re-add changes from experimental that were not commited.

Thomas Goirand zigo at moszumanska.debian.org
Sat Nov 4 22:51:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

zigo pushed a commit to branch master
in repository python-amqp.

commit 98e666594cd55c8b538b987201b40bcb54d73855
Author: Thomas Goirand <zigo at debian.org>
Date:   Sat Nov 4 22:44:26 2017 +0000

    Re-add changes from experimental that were not commited.
---
 Changelog                                          |  15 ++++++++++++
 PKG-INFO                                           |   5 ++--
 README.rst                                         |   2 +-
 amqp/__init__.py                                   |  16 +------------
 amqp/abstract_channel.py                           |  14 -----------
 amqp/basic_message.py                              |  14 -----------
 amqp/channel.py                                    |  14 -----------
 amqp/connection.py                                 |  14 -----------
 amqp/exceptions.py                                 |  14 -----------
 amqp/method_framing.py                             |  26 ++++++---------------
 amqp/serialization.py                              |  22 ++++-------------
 amqp/transport.py                                  |  14 -----------
 debian/changelog                                   |  18 +++++++++++---
 debian/rules                                       |   2 ++
 debian/source/include-binaries                     |   2 +-
 .../signing-key.asc}                               | Bin
 debian/watch                                       |   2 +-
 docs/includes/introduction.txt                     |   2 +-
 t/unit/test_method_framing.py                      |   6 +++++
 19 files changed, 57 insertions(+), 145 deletions(-)

diff --git a/Changelog b/Changelog
index aa7d3ea..bae531b 100644
--- a/Changelog
+++ b/Changelog
@@ -5,6 +5,21 @@ py-amqp is fork of amqplib used by Kombu containing additional features and impr
 The previous amqplib changelog is here:
 http://code.google.com/p/py-amqplib/source/browse/CHANGES
 
+.. _version-2.2.2:
+
+2.2.2
+=====
+:release-date: 2017-09-14 09:00 A.M UTC+2
+:release-by: Omer Katz
+
+- Sending empty messages no longer hangs. Instead an empty message is sent correctly.(addresses #151)
+
+  Fix contributed by **Christian Blades**
+
+- Fixed compatibility issues in UTF-8 encoding behavior between Py2/Py3 (#164)
+
+  Fix contributed by **Tyler James Harden**
+
 .. _version-2.2.1:
 
 2.2.1
diff --git a/PKG-INFO b/PKG-INFO
index 16cdb4b..83194f2 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,18 +1,19 @@
 Metadata-Version: 1.1
 Name: amqp
-Version: 2.2.1
+Version: 2.2.2
 Summary: Low-level AMQP client for Python (fork of amqplib).
 Home-page: http://github.com/celery/py-amqp
 Author: Ask Solem
 Author-email: pyamqp at celeryproject.org
 License: BSD
+Description-Content-Type: UNKNOWN
 Description: =====================================================================
          Python AMQP 0.9.1 client library
         =====================================================================
         
         |build-status| |coverage| |license| |wheel| |pyversion| |pyimp|
         
-        :Version: 2.2.1
+        :Version: 2.2.2
         :Web: https://amqp.readthedocs.io/
         :Download: http://pypi.python.org/pypi/amqp/
         :Source: http://github.com/celery/py-amqp/
diff --git a/README.rst b/README.rst
index be83c65..025cac0 100644
--- a/README.rst
+++ b/README.rst
@@ -4,7 +4,7 @@
 
 |build-status| |coverage| |license| |wheel| |pyversion| |pyimp|
 
-:Version: 2.2.1
+:Version: 2.2.2
 :Web: https://amqp.readthedocs.io/
 :Download: http://pypi.python.org/pypi/amqp/
 :Source: http://github.com/celery/py-amqp/
diff --git a/amqp/__init__.py b/amqp/__init__.py
index 70bc07c..937a4ec 100644
--- a/amqp/__init__.py
+++ b/amqp/__init__.py
@@ -1,26 +1,12 @@
 """Low-level AMQP client for Python (fork of amqplib)."""
 # Copyright (C) 2007-2008 Barry Pederson <bp at barryp.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 from __future__ import absolute_import, unicode_literals
 
 import re
 
 from collections import namedtuple
 
-__version__ = '2.2.1'
+__version__ = '2.2.2'
 __author__ = 'Barry Pederson'
 __maintainer__ = 'Ask Solem'
 __contact__ = 'pyamqp at celeryproject.org'
diff --git a/amqp/abstract_channel.py b/amqp/abstract_channel.py
index 67032d8..aaad554 100644
--- a/amqp/abstract_channel.py
+++ b/amqp/abstract_channel.py
@@ -1,19 +1,5 @@
 """Code common to Connection and Channel objects."""
 # Copyright (C) 2007-2008 Barry Pederson <bp at barryp.org>)
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 from __future__ import absolute_import, unicode_literals
 
 from vine import ensure_promise, promise
diff --git a/amqp/basic_message.py b/amqp/basic_message.py
index 7f80df2..92089f7 100644
--- a/amqp/basic_message.py
+++ b/amqp/basic_message.py
@@ -1,19 +1,5 @@
 """AMQP Messages."""
 # Copyright (C) 2007-2008 Barry Pederson <bp at barryp.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 from __future__ import absolute_import, unicode_literals
 
 # Intended to fix #85: ImportError: cannot import name spec
diff --git a/amqp/channel.py b/amqp/channel.py
index f939e45..b16c6a8 100644
--- a/amqp/channel.py
+++ b/amqp/channel.py
@@ -1,19 +1,5 @@
 """AMQP Channels."""
 # Copyright (C) 2007-2008 Barry Pederson <bp at barryp.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 from __future__ import absolute_import, unicode_literals
 
 import logging
diff --git a/amqp/connection.py b/amqp/connection.py
index 2ed89fb..4bd86b7 100644
--- a/amqp/connection.py
+++ b/amqp/connection.py
@@ -1,19 +1,5 @@
 """AMQP Connections."""
 # Copyright (C) 2007-2008 Barry Pederson <bp at barryp.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 from __future__ import absolute_import, unicode_literals
 
 import logging
diff --git a/amqp/exceptions.py b/amqp/exceptions.py
index 94a7bba..f6e0403 100644
--- a/amqp/exceptions.py
+++ b/amqp/exceptions.py
@@ -1,19 +1,5 @@
 """Exceptions used by amqp."""
 # Copyright (C) 2007-2008 Barry Pederson <bp at barryp.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 from __future__ import absolute_import, unicode_literals
 from .five import python_2_unicode_compatible
 from .platform import pack, unpack
diff --git a/amqp/method_framing.py b/amqp/method_framing.py
index 5ea46f9..28c1f4c 100644
--- a/amqp/method_framing.py
+++ b/amqp/method_framing.py
@@ -1,19 +1,5 @@
 """Convert between frames and higher-level AMQP methods."""
 # Copyright (C) 2007-2008 Barry Pederson <bp at barryp.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 from __future__ import absolute_import, unicode_literals
 
 from collections import defaultdict
@@ -159,7 +145,7 @@ def frame_writer(connection, transport,
             pack_into('>BHI%dsB' % framelen, buf, offset,
                       type_, channel, framelen, frame, 0xce)
             offset += 8 + framelen
-            if body:
+            if body is not None:
                 frame = b''.join([
                     pack('>HHQ', method_sig[0], 0, len(body)),
                     properties,
@@ -170,10 +156,12 @@ def frame_writer(connection, transport,
                           2, channel, framelen, frame, 0xce)
                 offset += 8 + framelen
 
-                framelen = len(body)
-                pack_into('>BHI%dsB' % framelen, buf, offset,
-                          3, channel, framelen, str_to_bytes(body), 0xce)
-                offset += 8 + framelen
+                bodylen = len(body)
+                if bodylen > 0:
+                    framelen = bodylen
+                    pack_into('>BHI%dsB' % framelen, buf, offset,
+                              3, channel, framelen, str_to_bytes(body), 0xce)
+                    offset += 8 + framelen
 
             write(view[:offset])
 
diff --git a/amqp/serialization.py b/amqp/serialization.py
index 5ce3fb0..5ef508a 100644
--- a/amqp/serialization.py
+++ b/amqp/serialization.py
@@ -4,20 +4,6 @@
 
 """
 # Copyright (C) 2007 Barry Pederson <bp at barryp.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 from __future__ import absolute_import, unicode_literals
 
 import calendar
@@ -304,14 +290,14 @@ def dumps(format, values):
             val = val or ''
             bitcount = _flushbits(bits, write)
             if isinstance(val, string):
-                val = val.encode('utf-8')
+                val = val.encode('utf-8', 'surrogatepass')
             write(pack('B', len(val)))
             write(val)
         elif p == 'S':
             val = val or ''
             bitcount = _flushbits(bits, write)
             if isinstance(val, string):
-                val = val.encode('utf-8')
+                val = val.encode('utf-8', 'surrogatepass')
             write(pack('>I', len(val)))
             write(val)
         elif p == 'F':
@@ -332,7 +318,7 @@ def _write_table(d, write, bits, pack=pack):
     twrite = out.write
     for k, v in items(d):
         if isinstance(k, string):
-            k = k.encode('utf-8')
+            k = k.encode('utf-8', 'surrogatepass')
         twrite(pack('B', len(k)))
         twrite(k)
         try:
@@ -366,7 +352,7 @@ def _write_item(v, write, bits, pack=pack,
                 None_t=None):
     if isinstance(v, (string_t, bytes)):
         if isinstance(v, string):
-            v = v.encode('utf-8')
+            v = v.encode('utf-8', 'surrogatepass')
         write(pack('>cI', b'S', len(v)))
         write(v)
     elif isinstance(v, bool):
diff --git a/amqp/transport.py b/amqp/transport.py
index 981c8b6..b1af3ae 100644
--- a/amqp/transport.py
+++ b/amqp/transport.py
@@ -1,19 +1,5 @@
 """Transport implementation."""
 # Copyright (C) 2009 Barry Pederson <bp at barryp.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 from __future__ import absolute_import, unicode_literals
 
 import errno
diff --git a/debian/changelog b/debian/changelog
index e0bfc1d..b468fb2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,18 +1,30 @@
-python-amqp (2.2.1-1) unstable; urgency=medium
+python-amqp (2.2.2-1) unstable; urgency=medium
 
   * Uploading to unstable.
   * Ran wrap-and-sort -bast to reduce diff size of future changes.
   * Removed X-Python-Version: >= 2.5 and X-Python3-Version: >= 3.0, as these
     versions are even satisfied in oldoldstable.
-  * Standards-Version is now 4.1.1.
   * Properly building docs from override_dh_sphinxdoc and respecting
     DEB_BUILD_OPTIONS=nodoc, plus handling build profiles (also with nocheck).
-  * Deprecating priority extra as per policy 4.0.1.
   * Building sphinx doc directly within the destination folder:
     $(CURDIR)/debian/python-amqp-doc/usr/share/doc/python-amqp-doc/html
 
  -- Thomas Goirand <zigo at debian.org>  Sat, 04 Nov 2017 20:57:21 +0000
 
+python-amqp (2.2.2-1~exp1) experimental; urgency=low
+
+  * New upstream release.
+  * Move upstream signing key to debian/upstream/signing-key.asc.
+  * Use https:// for uscan URL.
+  * Bump Standards-Version to 4.1.1.
+  * Raise minimum Python versions to 2.7 and 3.4.
+  * Remove trailing whitespaces from d/changelog.
+  * Replace Priority extra with optional as required by policy 4.0.1.
+  * Let /usr/share/dpkg/pkg-info.mk export SOURCE_DATE_EPOCH so sphinx
+    can pick it up directly.
+
+ -- Michael Fladischer <fladi at debian.org>  Wed, 01 Nov 2017 18:21:42 +0100
+
 python-amqp (2.2.1-1~exp1) experimental; urgency=low
 
   * New upstream release.
diff --git a/debian/rules b/debian/rules
index 282e71b..3ef1e63 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,8 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/dpkg/pkg-info.mk
+
 LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
 BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
 
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
index 95a390b..b08579d 100644
--- a/debian/source/include-binaries
+++ b/debian/source/include-binaries
@@ -1 +1 @@
-debian/upstream-signing-key.pgp
+debian/upstream/signing-key.asc
diff --git a/debian/upstream-signing-key.pgp b/debian/upstream/signing-key.asc
similarity index 100%
rename from debian/upstream-signing-key.pgp
rename to debian/upstream/signing-key.asc
diff --git a/debian/watch b/debian/watch
index 95d1f98..8dca596 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
 version=3
 
 opts=uversionmangle=s/(rc|a|b|c)/~$1/,pgpsigurlmangle=s/$/.asc/ \
-http://pypi.debian.net/amqp/amqp-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
+https://pypi.debian.net/amqp/amqp-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
diff --git a/docs/includes/introduction.txt b/docs/includes/introduction.txt
index d88fce6..e80572d 100644
--- a/docs/includes/introduction.txt
+++ b/docs/includes/introduction.txt
@@ -1,4 +1,4 @@
-:Version: 2.2.1
+:Version: 2.2.2
 :Web: https://amqp.readthedocs.io/
 :Download: http://pypi.python.org/pypi/amqp/
 :Source: http://github.com/celery/py-amqp/
diff --git a/t/unit/test_method_framing.py b/t/unit/test_method_framing.py
index a58053b..10204c2 100644
--- a/t/unit/test_method_framing.py
+++ b/t/unit/test_method_framing.py
@@ -99,3 +99,9 @@ class test_frame_writer:
         frame = 2, 1, spec.Basic.Publish, b'x' * 10, msg
         self.g(*frame)
         self.write.assert_called()
+
+    def test_write_zero_len_body(self):
+        msg = Message(body=b'', content_type='application/octet-stream')
+        frame = 2, 1, spec.Basic.Publish, b'x' * 10, msg
+        self.g(*frame)
+        self.write.assert_called()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-amqp.git



More information about the Python-modules-commits mailing list