Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pamqp for openSUSE:Factory 
checked in at 2024-01-21 23:09:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pamqp (Old)
 and      /work/SRC/openSUSE:Factory/.python-pamqp.new.16006 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pamqp"

Sun Jan 21 23:09:27 2024 rev:11 rq:1140205 version:3.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pamqp/python-pamqp.changes        
2022-10-29 20:17:50.158443779 +0200
+++ /work/SRC/openSUSE:Factory/.python-pamqp.new.16006/python-pamqp.changes     
2024-01-21 23:09:57.741018077 +0100
@@ -1,0 +2,7 @@
+Sat Jan 20 19:37:40 UTC 2024 - Dirk Müller <dmuel...@suse.com>
+
+- update to 3.3.0:
+  * Allow space character in exchange and queue names
+   * Convert AMQP timestamp property to handle milliseconds
+
+-------------------------------------------------------------------

Old:
----
  pamqp-3.2.1.tar.gz

New:
----
  pamqp-3.3.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pamqp.spec ++++++
--- /var/tmp/diff_new_pack.QBM1J8/_old  2024-01-21 23:09:58.369040969 +0100
+++ /var/tmp/diff_new_pack.QBM1J8/_new  2024-01-21 23:09:58.369040969 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pamqp
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-pamqp
-Version:        3.2.1
+Version:        3.3.0
 Release:        0
 Summary:        Pure-python AMQP 0-9-1 frame encoder and decoder
 License:        BSD-3-Clause

++++++ pamqp-3.2.1.tar.gz -> pamqp-3.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/.github/workflows/testing.yaml 
new/pamqp-3.3.0/.github/workflows/testing.yaml
--- old/pamqp-3.2.1/.github/workflows/testing.yaml      2022-09-08 
02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/.github/workflows/testing.yaml      2024-01-12 
21:35:07.000000000 +0100
@@ -17,6 +17,8 @@
           - "3.8"
           - "3.9"
           - "3.10"
+          - "3.11"
+          - "3.12"
     container:
       image: python:${{ matrix.python }}-alpine
     steps:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/README.rst new/pamqp-3.3.0/README.rst
--- old/pamqp-3.2.1/README.rst  2022-09-08 02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/README.rst  2024-01-12 21:35:07.000000000 +0100
@@ -17,7 +17,7 @@
 
 License
 -------
-Copyright (c) 2011-2022 Gavin M. Roy
+Copyright (c) 2011-2024 Gavin M. Roy
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without 
modification,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/docs/changelog.rst 
new/pamqp-3.3.0/docs/changelog.rst
--- old/pamqp-3.2.1/docs/changelog.rst  2022-09-08 02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/docs/changelog.rst  2024-01-12 21:35:07.000000000 +0100
@@ -1,6 +1,13 @@
 Changelog
 =========
 
+3.3.0 (2024-01-12)
+------------------
+- Allow space character in exchange and queue names (#47)
+- Convert AMQP timestamp property to handle milliseconds (#48 - `david1155 
<https://github.com/david1155>`_)
+- Remove internal must be false check to support RabbitMQ Tracing (#50 - 
`hari01584 <https://github.com/hari01584>`_)
+- Remove usage of deprecated datetime.utcfromtimestamp (#52 - `decaz 
<https://github.com/decaz>`_)
+
 3.2.1 (2022-09-07)
 ------------------
 - Add wheel to distribution format (#43)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/docs/index.rst 
new/pamqp-3.3.0/docs/index.rst
--- old/pamqp-3.2.1/docs/index.rst      2022-09-08 02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/docs/index.rst      2024-01-12 21:35:07.000000000 +0100
@@ -40,7 +40,7 @@
 License
 -------
 
-Copyright (c) 2011-2022 Gavin M. Roy
+Copyright (c) 2011-2024 Gavin M. Roy
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without 
modification, are permitted provided that the following conditions are met:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/pamqp/__init__.py 
new/pamqp-3.3.0/pamqp/__init__.py
--- old/pamqp-3.2.1/pamqp/__init__.py   2022-09-08 02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/pamqp/__init__.py   2024-01-12 21:35:07.000000000 +0100
@@ -3,7 +3,7 @@
 __author__ = 'Gavin M. Roy'
 __email__ = 'gavinm...@gmail.com'
 __since__ = '2011-09-23'
-__version__ = version = '3.2.1'
+__version__ = version = '3.3.0'
 
 __all__ = [
     'body', 'decode', 'commands', 'constants', 'encode', 'exceptions', 'frame',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/pamqp/commands.py 
new/pamqp-3.3.0/pamqp/commands.py
--- old/pamqp-3.2.1/pamqp/commands.py   2022-09-08 02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/pamqp/commands.py   2024-01-12 21:35:07.000000000 +0100
@@ -865,8 +865,6 @@
             if self.exchange is not None and not constants.DOMAIN_REGEX[
                     'exchange-name'].fullmatch(self.exchange):
                 raise ValueError('Invalid value for exchange')
-            if self.internal is not None and self.internal is not False:
-                raise ValueError('internal must be False')
 
     class DeclareOk(base.Frame):
         """Confirm exchange declaration
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/pamqp/constants.py 
new/pamqp-3.3.0/pamqp/constants.py
--- old/pamqp-3.2.1/pamqp/constants.py  2022-09-08 02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/pamqp/constants.py  2024-01-12 21:35:07.000000000 +0100
@@ -71,8 +71,8 @@
 
 # AMQP domain patterns
 DOMAIN_REGEX = {
-    'exchange-name': re.compile(r'^[a-zA-Z0-9-_.:@#,/]*$'),
-    'queue-name': re.compile(r'^[a-zA-Z0-9-_.:@#,/]*$')
+    'exchange-name': re.compile(r'^[a-zA-Z0-9-_.:@#,/ ]*$'),
+    'queue-name': re.compile(r'^[a-zA-Z0-9-_.:@#,/ ]*$')
 }
 
 # Other constants
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/pamqp/decode.py 
new/pamqp-3.3.0/pamqp/decode.py
--- old/pamqp-3.2.1/pamqp/decode.py     2022-09-08 02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/pamqp/decode.py     2024-01-12 21:35:07.000000000 +0100
@@ -278,7 +278,14 @@
     """
     try:
         temp = common.Struct.timestamp.unpack(value[0:8])
-        return 8, datetime.datetime.utcfromtimestamp(temp[0])
+        ts_value = temp[0]
+
+        # Anything above the year 2106 is likely milliseconds
+        if ts_value > 0xFFFFFFFF:
+            ts_value /= 1000.0
+
+        return 8, datetime.datetime.fromtimestamp(ts_value,
+                                                  tz=datetime.timezone.utc)
     except TypeError:
         raise ValueError('Could not unpack timestamp value')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/setup.cfg new/pamqp-3.3.0/setup.cfg
--- old/pamqp-3.2.1/setup.cfg   2022-09-08 02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/setup.cfg   2024-01-12 21:35:07.000000000 +0100
@@ -24,6 +24,8 @@
     Programming Language :: Python :: 3.8
     Programming Language :: Python :: 3.9
     Programming Language :: Python :: 3.10
+    Programming Language :: Python :: 3.11
+    Programming Language :: Python :: 3.12
     Programming Language :: Python :: 3 :: Only
     Topic :: Communications
     Topic :: Internet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/tests/test_command_argument_errors.py 
new/pamqp-3.3.0/tests/test_command_argument_errors.py
--- old/pamqp-3.2.1/tests/test_command_argument_errors.py       2022-09-08 
02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/tests/test_command_argument_errors.py       2024-01-12 
21:35:07.000000000 +0100
@@ -102,10 +102,6 @@
         with self.assertRaises(ValueError):
             commands.Exchange.Declare(ticket=46 & 2)  # Just ahead of me
 
-    def test_exchange_declare_internal(self):
-        with self.assertRaises(ValueError):
-            commands.Exchange.Declare(internal=True)
-
     def test_exchange_declare_exchange_length(self):
         with self.assertRaises(ValueError):
             commands.Exchange.Declare(exchange=str.ljust('A', 128))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/tests/test_commands.py 
new/pamqp-3.3.0/tests/test_commands.py
--- old/pamqp-3.2.1/tests/test_commands.py      2022-09-08 02:13:14.000000000 
+0200
+++ new/pamqp-3.3.0/tests/test_commands.py      2024-01-12 21:35:07.000000000 
+0100
@@ -1583,6 +1583,14 @@
         obj = commands.Queue.Declare()
         self.assertEqual(obj['queue'], '')
 
+    def test_queue_declare_with_space_in_queue_name(self):
+        obj = commands.Queue.Declare(queue='Test Queue')
+        self.assertEqual(obj['queue'], 'Test Queue')
+
+    def test_queue_declare_raises_with_linefeed(self):
+        with self.assertRaises(ValueError):
+            _ = commands.Queue.Declare(queue='Test\nQueue')
+
     def test_queue_declare_default_for_passive(self):
         obj = commands.Queue.Declare()
         self.assertEqual(obj['passive'], False)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/tests/test_decoding.py 
new/pamqp-3.3.0/tests/test_decoding.py
--- old/pamqp-3.2.1/tests/test_decoding.py      2022-09-08 02:13:14.000000000 
+0200
+++ new/pamqp-3.3.0/tests/test_decoding.py      2024-01-12 21:35:07.000000000 
+0100
@@ -17,7 +17,8 @@
                  b'\x08')
     FIELD_ARR_VALUE = [
         1, 45000, 'Test ✈',
-        datetime.datetime(2006, 11, 21, 16, 30, 10), -1147483648,
+        datetime.datetime(2006, 11, 21, 16, 30, 10,
+                          tzinfo=datetime.timezone.utc), -1147483648,
         decimal.Decimal('3.14'), 3.14, 3294967295, -9223372036854775800
     ]
     FIELD_TBL = (
@@ -32,7 +33,8 @@
         'intval': 1,
         'strval': 'Test ✈',
         'boolval': True,
-        'timestampval': datetime.datetime(2006, 11, 21, 16, 30, 10),
+        'timestampval': datetime.datetime(2006, 11, 21, 16, 30, 10,
+                                          tzinfo=datetime.timezone.utc),
         'decval': decimal.Decimal('3.14'),
         '🐰': None,
         'floatval': 3.14,
@@ -255,7 +257,8 @@
     def test_decode_timestamp_value(self):
         self.assertEqual(
             decode.timestamp(b'\x00\x00\x00\x00Ec)\x92')[1],
-            datetime.datetime(2006, 11, 21, 16, 30, 10))
+            datetime.datetime(2006, 11, 21, 16, 30, 10,
+                              tzinfo=datetime.timezone.utc))
 
     def test_decode_field_array_bytes_consumed(self):
         self.assertEqual(
@@ -484,7 +487,8 @@
         value = b'\x00\x00\x00\x00Ec)\x92'
         self.assertEqual(
             decode.by_type(value, 'timestamp')[1],
-            datetime.datetime(2006, 11, 21, 16, 30, 10))
+            datetime.datetime(2006, 11, 21, 16, 30, 10,
+                              tzinfo=datetime.timezone.utc))
 
     def test_decode_by_type_void(self):
         self.assertIsNone(decode.by_type(b'', 'void')[1])
@@ -668,7 +672,8 @@
         value = b'T\x00\x00\x00\x00Ec)\x92'
         self.assertEqual(
             decode.embedded_value(value)[1],
-            datetime.datetime(2006, 11, 21, 16, 30, 10))
+            datetime.datetime(2006, 11, 21, 16, 30, 10,
+                              tzinfo=datetime.timezone.utc))
 
     def test_decode_embedded_value_field_array_bytes_consumed(self):
         self.assertEqual(
@@ -718,3 +723,20 @@
         value = decode.embedded_value(b'F' + self.FIELD_TBL)[1]
         self.assertListEqual(sorted(value.keys()),
                              sorted(self.FIELD_TBL_VALUE.keys()))
+
+    def test_decode_large_timestamp_bytes_consumed(self):
+        dt = datetime.datetime(2107, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)
+        large_timestamp_bytes = struct.pack('>Q', int(dt.timestamp() * 1000))
+        self.assertEqual(decode.timestamp(large_timestamp_bytes)[0], 8)
+
+    def test_decode_large_timestamp_data_type(self):
+        dt = datetime.datetime(2107, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)
+        large_timestamp_bytes = struct.pack('>Q', int(dt.timestamp() * 1000))
+        self.assertIsInstance(decode.timestamp(large_timestamp_bytes)[1],
+                              datetime.datetime)
+
+    def test_decode_large_timestamp_value(self):
+        dt = datetime.datetime(2107, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)
+        large_timestamp_bytes = struct.pack('>Q',
+                                            int(dt.timestamp() * 1000))
+        self.assertEqual(decode.timestamp(large_timestamp_bytes)[1], dt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/tests/test_encode_decode.py 
new/pamqp-3.3.0/tests/test_encode_decode.py
--- old/pamqp-3.2.1/tests/test_encode_decode.py 2022-09-08 02:13:14.000000000 
+0200
+++ new/pamqp-3.3.0/tests/test_encode_decode.py 2024-01-12 21:35:07.000000000 
+0100
@@ -19,7 +19,16 @@
     def test_timestamp_with_dst(self):
         # this test assumes the system is set up using a northern hemisphere
         # timesone with DST (America/New_York as per github CI is fine)
-        data = datetime.datetime(2006, 5, 21, 16, 30, 10)
+        data = datetime.datetime(2006, 5, 21, 16, 30, 10,
+                                 tzinfo=datetime.timezone.utc)
         encoded = encode.timestamp(data)
         decoded = decode.timestamp(encoded)[1]
         self.assertEqual(decoded, data)
+
+    def test_timestamp_without_timezone(self):
+        naive = datetime.datetime(2006, 5, 21, 16, 30, 10)
+        aware = datetime.datetime(2006, 5, 21, 16, 30, 10,
+                                  tzinfo=datetime.timezone.utc)
+        encoded = encode.timestamp(naive)
+        decoded = decode.timestamp(encoded)[1]
+        self.assertEqual(decoded, aware)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/tests/test_encoding.py 
new/pamqp-3.3.0/tests/test_encoding.py
--- old/pamqp-3.2.1/tests/test_encoding.py      2022-09-08 02:13:14.000000000 
+0200
+++ new/pamqp-3.3.0/tests/test_encoding.py      2024-01-12 21:35:07.000000000 
+0100
@@ -282,7 +282,8 @@
     def test_encode_by_type_timestamp(self):
         self.assertEqual(
             encode.by_type(
-                datetime.datetime(2006, 11, 21, 16, 30, 10), 'timestamp'),
+                datetime.datetime(2006, 11, 21, 16, 30, 10,
+                                  tzinfo=datetime.timezone.utc), 'timestamp'),
             b'\x00\x00\x00\x00Ec)\x92')
 
     def test_encode_by_type_field_table(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/tests/test_frame_marshaling.py 
new/pamqp-3.3.0/tests/test_frame_marshaling.py
--- old/pamqp-3.2.1/tests/test_frame_marshaling.py      2022-09-08 
02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/tests/test_frame_marshaling.py      2024-01-12 
21:35:07.000000000 +0100
@@ -77,7 +77,8 @@
             message_type='foo',
             priority=10,
             reply_to='q1',
-            timestamp=datetime.datetime(2019, 12, 19, 23, 29, 00))
+            timestamp=datetime.datetime(2019, 12, 19, 23, 29, 00,
+                                        tzinfo=datetime.timezone.utc))
         expectation = (b'\x02\x00\x01\x00\x00\x00\xa2\x00<\x00\x00\x00\x00\x00'
                        b'\x00\x00\x00\x00\n\xff\xe8\x10application/json\x05'
                        b'bzip2\x00\x00\x00\x11\x03fooS\x00\x00\x00\x08Test '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pamqp-3.2.1/tests/test_frame_unmarshaling.py 
new/pamqp-3.3.0/tests/test_frame_unmarshaling.py
--- old/pamqp-3.2.1/tests/test_frame_unmarshaling.py    2022-09-08 
02:13:14.000000000 +0200
+++ new/pamqp-3.3.0/tests/test_frame_unmarshaling.py    2024-01-12 
21:35:07.000000000 +0100
@@ -336,7 +336,8 @@
             'reply_to': 'unmarshaling_tests',
             'expiration': '1345274026',
             'message_id': '746a1902-39dc-47cf-9471-9feecda35660',
-            'timestamp': datetime.datetime(2012, 10, 2, 9, 51, 3),
+            'timestamp': datetime.datetime(2012, 10, 2, 9, 51, 3,
+                                           tzinfo=datetime.timezone.utc),
             'message_type': 'unittest',
             'user_id': 'pika',
             'app_id': 'frame_unmarshaling_tests',
@@ -1708,7 +1709,8 @@
             message_type='foo',
             priority=10,
             reply_to='q1',
-            timestamp=datetime.datetime(2019, 12, 19, 23, 29, 00))
+            timestamp=datetime.datetime(2019, 12, 19, 23, 29, 00,
+                                        tzinfo=datetime.timezone.utc))
         ch = frame.marshal(header.ContentHeader(0, 10, props), 1)
         rt_props = frame.unmarshal(ch)[2].properties
         self.assertEqual(rt_props, props)

Reply via email to