rbfly 0.10.0.dev1__tar.gz → 0.10.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rbfly-0.10.0.dev1/rbfly.egg-info → rbfly-0.10.0.dev2}/PKG-INFO +3 -4
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/pyproject.toml +1 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/amqp/_message.c +24 -24
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/amqp/_message.pyx +4 -4
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/protocol.py +7 -3
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/amqp/test_message.py +2 -2
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/streams/test_codec.py +1 -2
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2/rbfly.egg-info}/PKG-INFO +3 -4
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly.egg-info/requires.txt +2 -2
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/setup.cfg +3 -4
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/COPYING +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/README +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/__init__.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/_buffer.c +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/_buffer.pxd +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/_buffer.pyx +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/_codec.c +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/_codec.h +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/_codec.pxd +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/_codec.pyx +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/amqp/__init__.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/amqp/_message.pxd +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/amqp/_message.pyi +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/cm.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/error.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/py.typed +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/slotmap.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/__init__.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_client.c +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_client.pyi +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_client.pyx +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_codec.c +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_codec.pyi +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_codec.pyx +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_mqueue.c +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_mqueue.pxd +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_mqueue.pyi +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/_mqueue.pyx +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/client.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/codec.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/const.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/error.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/offset.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/types.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/streams/util.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/__init__.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/amqp/__init__.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/streams/__init__.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/streams/test_client.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/streams/test_mqueue.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/streams/test_offset.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/test_slotmap.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/tests/test_util.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/types.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly/util.py +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly.egg-info/SOURCES.txt +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly.egg-info/dependency_links.txt +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/rbfly.egg-info/top_level.txt +0 -0
- {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev2}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rbfly
|
|
3
|
-
Version: 0.10.0.
|
|
3
|
+
Version: 0.10.0.dev2
|
|
4
4
|
Summary: RbFly - a library for RabbitMQ Streams using Python asyncio
|
|
5
5
|
Home-page: https://wrobell.dcmod.org/rbfly/
|
|
6
6
|
Author: Artur Wroblewski
|
|
@@ -12,13 +12,12 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Development Status :: 4 - Beta
|
|
15
|
-
Requires-Python: >=3.11
|
|
16
15
|
Description-Content-Type: text/x-rst
|
|
17
16
|
License-File: COPYING
|
|
18
17
|
Provides-Extra: tests
|
|
19
18
|
Requires-Dist: bandit; extra == "tests"
|
|
20
19
|
Requires-Dist: cython-lint; extra == "tests"
|
|
21
|
-
Requires-Dist: mypy==1.11.
|
|
20
|
+
Requires-Dist: mypy==1.11.2; extra == "tests"
|
|
22
21
|
Requires-Dist: pika; extra == "tests"
|
|
23
22
|
Requires-Dist: pytest-asyncio; extra == "tests"
|
|
24
23
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
@@ -30,7 +29,7 @@ Requires-Dist: uvloop>=0.19.0; extra == "tests"
|
|
|
30
29
|
Provides-Extra: performance
|
|
31
30
|
Requires-Dist: msgpack; extra == "performance"
|
|
32
31
|
Requires-Dist: aiokafka==0.8.1; extra == "performance"
|
|
33
|
-
Requires-Dist: rstream==0.
|
|
32
|
+
Requires-Dist: rstream==0.20.3; extra == "performance"
|
|
34
33
|
Requires-Dist: uamqp==1.6.9; extra == "performance"
|
|
35
34
|
Requires-Dist: python-qpid-proton==0.39.0; extra == "performance"
|
|
36
35
|
Provides-Extra: doc
|
|
@@ -26,6 +26,7 @@ omit = ["rbfly/tests/*"]
|
|
|
26
26
|
lint.select = ['F', 'N', 'E', 'W', 'PL', 'C90', 'RUF', 'SLF', 'UP']
|
|
27
27
|
# drop from ignore: PLR2004, E501
|
|
28
28
|
lint.ignore = ['E731', 'PLR2004', 'E501', 'UP032', 'E721']
|
|
29
|
+
target-version = "py311"
|
|
29
30
|
|
|
30
31
|
[tool.cython-lint]
|
|
31
32
|
ignore = ['E252', 'E302', 'E305']
|
|
@@ -5640,9 +5640,9 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_pf_5rbfly_4amqp
|
|
|
5640
5640
|
static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_8_message_c_decode_amqp(struct __pyx_t_5rbfly_7_buffer_Buffer *__pyx_v_buffer, CYTHON_UNUSED Py_ssize_t __pyx_v_size) {
|
|
5641
5641
|
uint32_t __pyx_v_desc_code;
|
|
5642
5642
|
uint8_t __pyx_v_type_code;
|
|
5643
|
-
CYTHON_UNUSED PyObject *
|
|
5643
|
+
CYTHON_UNUSED PyObject *__pyx_v__msg_header = 0;
|
|
5644
5644
|
PyObject *__pyx_v_msg_annotations = 0;
|
|
5645
|
-
CYTHON_UNUSED PyObject *
|
|
5645
|
+
CYTHON_UNUSED PyObject *__pyx_v__msg_properties = 0;
|
|
5646
5646
|
PyObject *__pyx_v_app_properties = 0;
|
|
5647
5647
|
PyObject *__pyx_v_body = 0;
|
|
5648
5648
|
struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_r = NULL;
|
|
@@ -5664,20 +5664,20 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
5664
5664
|
/* "rbfly/amqp/_message.pyx":226
|
|
5665
5665
|
* uint32_t desc_code
|
|
5666
5666
|
* uint8_t type_code
|
|
5667
|
-
* object
|
|
5667
|
+
* object _msg_header = {} # <<<<<<<<<<<<<<
|
|
5668
5668
|
* object msg_annotations = {}
|
|
5669
|
-
* object
|
|
5669
|
+
* object _msg_properties = {}
|
|
5670
5670
|
*/
|
|
5671
5671
|
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
|
|
5672
5672
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5673
|
-
|
|
5673
|
+
__pyx_v__msg_header = __pyx_t_1;
|
|
5674
5674
|
__pyx_t_1 = 0;
|
|
5675
5675
|
|
|
5676
5676
|
/* "rbfly/amqp/_message.pyx":227
|
|
5677
5677
|
* uint8_t type_code
|
|
5678
|
-
* object
|
|
5678
|
+
* object _msg_header = {}
|
|
5679
5679
|
* object msg_annotations = {} # <<<<<<<<<<<<<<
|
|
5680
|
-
* object
|
|
5680
|
+
* object _msg_properties = {}
|
|
5681
5681
|
* object app_properties = {}
|
|
5682
5682
|
*/
|
|
5683
5683
|
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 227, __pyx_L1_error)
|
|
@@ -5686,20 +5686,20 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
5686
5686
|
__pyx_t_1 = 0;
|
|
5687
5687
|
|
|
5688
5688
|
/* "rbfly/amqp/_message.pyx":228
|
|
5689
|
-
* object
|
|
5689
|
+
* object _msg_header = {}
|
|
5690
5690
|
* object msg_annotations = {}
|
|
5691
|
-
* object
|
|
5691
|
+
* object _msg_properties = {} # <<<<<<<<<<<<<<
|
|
5692
5692
|
* object app_properties = {}
|
|
5693
5693
|
* object body
|
|
5694
5694
|
*/
|
|
5695
5695
|
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error)
|
|
5696
5696
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5697
|
-
|
|
5697
|
+
__pyx_v__msg_properties = __pyx_t_1;
|
|
5698
5698
|
__pyx_t_1 = 0;
|
|
5699
5699
|
|
|
5700
5700
|
/* "rbfly/amqp/_message.pyx":229
|
|
5701
5701
|
* object msg_annotations = {}
|
|
5702
|
-
* object
|
|
5702
|
+
* object _msg_properties = {}
|
|
5703
5703
|
* object app_properties = {} # <<<<<<<<<<<<<<
|
|
5704
5704
|
* object body
|
|
5705
5705
|
*
|
|
@@ -5714,7 +5714,7 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
5714
5714
|
*
|
|
5715
5715
|
* _next_code(buffer, &desc_code, &type_code) # <<<<<<<<<<<<<<
|
|
5716
5716
|
* if desc_code == MESSAGE_HEADER:
|
|
5717
|
-
*
|
|
5717
|
+
* _msg_header = _decode_value(buffer, type_code)
|
|
5718
5718
|
*/
|
|
5719
5719
|
__pyx_f_5rbfly_4amqp_8_message__next_code(__pyx_v_buffer, (&__pyx_v_desc_code), (&__pyx_v_type_code)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 232, __pyx_L1_error)
|
|
5720
5720
|
|
|
@@ -5722,7 +5722,7 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
5722
5722
|
*
|
|
5723
5723
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5724
5724
|
* if desc_code == MESSAGE_HEADER: # <<<<<<<<<<<<<<
|
|
5725
|
-
*
|
|
5725
|
+
* _msg_header = _decode_value(buffer, type_code)
|
|
5726
5726
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5727
5727
|
*/
|
|
5728
5728
|
__pyx_t_2 = (__pyx_v_desc_code == 0x5370);
|
|
@@ -5731,18 +5731,18 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
5731
5731
|
/* "rbfly/amqp/_message.pyx":234
|
|
5732
5732
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5733
5733
|
* if desc_code == MESSAGE_HEADER:
|
|
5734
|
-
*
|
|
5734
|
+
* _msg_header = _decode_value(buffer, type_code) # <<<<<<<<<<<<<<
|
|
5735
5735
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5736
5736
|
*
|
|
5737
5737
|
*/
|
|
5738
5738
|
__pyx_t_1 = __pyx_f_5rbfly_4amqp_8_message__decode_value(__pyx_v_buffer, __pyx_v_type_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error)
|
|
5739
5739
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5740
|
-
__Pyx_DECREF_SET(
|
|
5740
|
+
__Pyx_DECREF_SET(__pyx_v__msg_header, __pyx_t_1);
|
|
5741
5741
|
__pyx_t_1 = 0;
|
|
5742
5742
|
|
|
5743
5743
|
/* "rbfly/amqp/_message.pyx":235
|
|
5744
5744
|
* if desc_code == MESSAGE_HEADER:
|
|
5745
|
-
*
|
|
5745
|
+
* _msg_header = _decode_value(buffer, type_code)
|
|
5746
5746
|
* _next_code(buffer, &desc_code, &type_code) # <<<<<<<<<<<<<<
|
|
5747
5747
|
*
|
|
5748
5748
|
* if desc_code == MESSAGE_ANNOTATIONS:
|
|
@@ -5753,7 +5753,7 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
5753
5753
|
*
|
|
5754
5754
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5755
5755
|
* if desc_code == MESSAGE_HEADER: # <<<<<<<<<<<<<<
|
|
5756
|
-
*
|
|
5756
|
+
* _msg_header = _decode_value(buffer, type_code)
|
|
5757
5757
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5758
5758
|
*/
|
|
5759
5759
|
}
|
|
@@ -5802,7 +5802,7 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
5802
5802
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5803
5803
|
*
|
|
5804
5804
|
* if desc_code == MESSAGE_PROPERTIES: # <<<<<<<<<<<<<<
|
|
5805
|
-
*
|
|
5805
|
+
* _msg_properties = _decode_value(buffer, type_code)
|
|
5806
5806
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5807
5807
|
*/
|
|
5808
5808
|
__pyx_t_2 = (__pyx_v_desc_code == 0x5373);
|
|
@@ -5811,18 +5811,18 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
5811
5811
|
/* "rbfly/amqp/_message.pyx":242
|
|
5812
5812
|
*
|
|
5813
5813
|
* if desc_code == MESSAGE_PROPERTIES:
|
|
5814
|
-
*
|
|
5814
|
+
* _msg_properties = _decode_value(buffer, type_code) # <<<<<<<<<<<<<<
|
|
5815
5815
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5816
5816
|
*
|
|
5817
5817
|
*/
|
|
5818
5818
|
__pyx_t_1 = __pyx_f_5rbfly_4amqp_8_message__decode_value(__pyx_v_buffer, __pyx_v_type_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 242, __pyx_L1_error)
|
|
5819
5819
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5820
|
-
__Pyx_DECREF_SET(
|
|
5820
|
+
__Pyx_DECREF_SET(__pyx_v__msg_properties, __pyx_t_1);
|
|
5821
5821
|
__pyx_t_1 = 0;
|
|
5822
5822
|
|
|
5823
5823
|
/* "rbfly/amqp/_message.pyx":243
|
|
5824
5824
|
* if desc_code == MESSAGE_PROPERTIES:
|
|
5825
|
-
*
|
|
5825
|
+
* _msg_properties = _decode_value(buffer, type_code)
|
|
5826
5826
|
* _next_code(buffer, &desc_code, &type_code) # <<<<<<<<<<<<<<
|
|
5827
5827
|
*
|
|
5828
5828
|
* if desc_code == MESSAGE_APP_PROPERTIES:
|
|
@@ -5833,7 +5833,7 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
5833
5833
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5834
5834
|
*
|
|
5835
5835
|
* if desc_code == MESSAGE_PROPERTIES: # <<<<<<<<<<<<<<
|
|
5836
|
-
*
|
|
5836
|
+
* _msg_properties = _decode_value(buffer, type_code)
|
|
5837
5837
|
* _next_code(buffer, &desc_code, &type_code)
|
|
5838
5838
|
*/
|
|
5839
5839
|
}
|
|
@@ -6200,9 +6200,9 @@ static struct __pyx_obj_5rbfly_4amqp_8_message_MessageCtx *__pyx_f_5rbfly_4amqp_
|
|
|
6200
6200
|
__Pyx_AddTraceback("rbfly.amqp._message.c_decode_amqp", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
6201
6201
|
__pyx_r = 0;
|
|
6202
6202
|
__pyx_L0:;
|
|
6203
|
-
__Pyx_XDECREF(
|
|
6203
|
+
__Pyx_XDECREF(__pyx_v__msg_header);
|
|
6204
6204
|
__Pyx_XDECREF(__pyx_v_msg_annotations);
|
|
6205
|
-
__Pyx_XDECREF(
|
|
6205
|
+
__Pyx_XDECREF(__pyx_v__msg_properties);
|
|
6206
6206
|
__Pyx_XDECREF(__pyx_v_app_properties);
|
|
6207
6207
|
__Pyx_XDECREF(__pyx_v_body);
|
|
6208
6208
|
__Pyx_XGIVEREF((PyObject *)__pyx_r);
|
|
@@ -223,15 +223,15 @@ cdef MessageCtx c_decode_amqp(Buffer *buffer, Py_ssize_t size):
|
|
|
223
223
|
cdef:
|
|
224
224
|
uint32_t desc_code
|
|
225
225
|
uint8_t type_code
|
|
226
|
-
object
|
|
226
|
+
object _msg_header = {}
|
|
227
227
|
object msg_annotations = {}
|
|
228
|
-
object
|
|
228
|
+
object _msg_properties = {}
|
|
229
229
|
object app_properties = {}
|
|
230
230
|
object body
|
|
231
231
|
|
|
232
232
|
_next_code(buffer, &desc_code, &type_code)
|
|
233
233
|
if desc_code == MESSAGE_HEADER:
|
|
234
|
-
|
|
234
|
+
_msg_header = _decode_value(buffer, type_code)
|
|
235
235
|
_next_code(buffer, &desc_code, &type_code)
|
|
236
236
|
|
|
237
237
|
if desc_code == MESSAGE_ANNOTATIONS:
|
|
@@ -239,7 +239,7 @@ cdef MessageCtx c_decode_amqp(Buffer *buffer, Py_ssize_t size):
|
|
|
239
239
|
_next_code(buffer, &desc_code, &type_code)
|
|
240
240
|
|
|
241
241
|
if desc_code == MESSAGE_PROPERTIES:
|
|
242
|
-
|
|
242
|
+
_msg_properties = _decode_value(buffer, type_code)
|
|
243
243
|
_next_code(buffer, &desc_code, &type_code)
|
|
244
244
|
|
|
245
245
|
if desc_code == MESSAGE_APP_PROPERTIES:
|
|
@@ -648,7 +648,11 @@ class RabbitMQStreamsProtocol(asyncio.Protocol):
|
|
|
648
648
|
'request sent, key=0x{:02x}, correlation_id={}'
|
|
649
649
|
.format(key, correlation_id)
|
|
650
650
|
)
|
|
651
|
-
|
|
651
|
+
try:
|
|
652
|
+
return await task
|
|
653
|
+
except asyncio.CancelledError:
|
|
654
|
+
if correlation_id in self._requests:
|
|
655
|
+
del self._requests[correlation_id]
|
|
652
656
|
|
|
653
657
|
def create_waiter(self, key: int) -> asyncio.Future[None]:
|
|
654
658
|
"""
|
|
@@ -672,11 +676,11 @@ class RabbitMQStreamsProtocol(asyncio.Protocol):
|
|
|
672
676
|
)
|
|
673
677
|
|
|
674
678
|
task = self._requests.pop(correlation_id, None)
|
|
675
|
-
if not task:
|
|
679
|
+
if not task or task.done():
|
|
676
680
|
# maybe wrong response from the broker, maybe task no longer
|
|
677
681
|
# valid due to disconnection process in progress
|
|
678
682
|
logger.warning(
|
|
679
|
-
'request task not found, correlation id={}'
|
|
683
|
+
'request task not found or done, correlation id={}'
|
|
680
684
|
.format(correlation_id)
|
|
681
685
|
)
|
|
682
686
|
return
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
#
|
|
19
19
|
|
|
20
20
|
import uuid
|
|
21
|
-
from datetime import datetime,
|
|
21
|
+
from datetime import datetime, UTC
|
|
22
22
|
|
|
23
23
|
from rbfly.amqp._message import MessageCtx, encode_amqp, decode_amqp
|
|
24
24
|
from rbfly.types import Symbol
|
|
@@ -66,7 +66,7 @@ DATA = (
|
|
|
66
66
|
|
|
67
67
|
# timestamp
|
|
68
68
|
(
|
|
69
|
-
MessageCtx(datetime(2022, 8, 14, 16, 1, 13, 567000, tzinfo=
|
|
69
|
+
MessageCtx(datetime(2022, 8, 14, 16, 1, 13, 567000, tzinfo=UTC)),
|
|
70
70
|
b'\x00Sw\x83\x00\x00\x01\x82\x9d\x16\x7f_'
|
|
71
71
|
),
|
|
72
72
|
|
|
@@ -23,7 +23,6 @@ commands.
|
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
import struct
|
|
26
|
-
import typing as tp
|
|
27
26
|
|
|
28
27
|
from rbfly.amqp import MessageCtx
|
|
29
28
|
from rbfly.error import RbFlyBufferError
|
|
@@ -563,7 +562,7 @@ def test_frame_incomplete() -> None:
|
|
|
563
562
|
assert next(it, None) is None
|
|
564
563
|
assert decoder.data == b''
|
|
565
564
|
|
|
566
|
-
def create_frame(data: bytes, n:
|
|
565
|
+
def create_frame(data: bytes, n: int | None=None) -> bytes:
|
|
567
566
|
"""
|
|
568
567
|
Utility function to create RabbitMQ Streams protocol frame.
|
|
569
568
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rbfly
|
|
3
|
-
Version: 0.10.0.
|
|
3
|
+
Version: 0.10.0.dev2
|
|
4
4
|
Summary: RbFly - a library for RabbitMQ Streams using Python asyncio
|
|
5
5
|
Home-page: https://wrobell.dcmod.org/rbfly/
|
|
6
6
|
Author: Artur Wroblewski
|
|
@@ -12,13 +12,12 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Development Status :: 4 - Beta
|
|
15
|
-
Requires-Python: >=3.11
|
|
16
15
|
Description-Content-Type: text/x-rst
|
|
17
16
|
License-File: COPYING
|
|
18
17
|
Provides-Extra: tests
|
|
19
18
|
Requires-Dist: bandit; extra == "tests"
|
|
20
19
|
Requires-Dist: cython-lint; extra == "tests"
|
|
21
|
-
Requires-Dist: mypy==1.11.
|
|
20
|
+
Requires-Dist: mypy==1.11.2; extra == "tests"
|
|
22
21
|
Requires-Dist: pika; extra == "tests"
|
|
23
22
|
Requires-Dist: pytest-asyncio; extra == "tests"
|
|
24
23
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
@@ -30,7 +29,7 @@ Requires-Dist: uvloop>=0.19.0; extra == "tests"
|
|
|
30
29
|
Provides-Extra: performance
|
|
31
30
|
Requires-Dist: msgpack; extra == "performance"
|
|
32
31
|
Requires-Dist: aiokafka==0.8.1; extra == "performance"
|
|
33
|
-
Requires-Dist: rstream==0.
|
|
32
|
+
Requires-Dist: rstream==0.20.3; extra == "performance"
|
|
34
33
|
Requires-Dist: uamqp==1.6.9; extra == "performance"
|
|
35
34
|
Requires-Dist: python-qpid-proton==0.39.0; extra == "performance"
|
|
36
35
|
Provides-Extra: doc
|
|
@@ -5,14 +5,14 @@ sphinx_rtd_theme
|
|
|
5
5
|
[performance]
|
|
6
6
|
msgpack
|
|
7
7
|
aiokafka==0.8.1
|
|
8
|
-
rstream==0.
|
|
8
|
+
rstream==0.20.3
|
|
9
9
|
uamqp==1.6.9
|
|
10
10
|
python-qpid-proton==0.39.0
|
|
11
11
|
|
|
12
12
|
[tests]
|
|
13
13
|
bandit
|
|
14
14
|
cython-lint
|
|
15
|
-
mypy==1.11.
|
|
15
|
+
mypy==1.11.2
|
|
16
16
|
pika
|
|
17
17
|
pytest-asyncio
|
|
18
18
|
pytest-cov
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = rbfly
|
|
3
|
-
version = 0.10.0.
|
|
3
|
+
version = 0.10.0.dev2
|
|
4
4
|
author = Artur Wroblewski
|
|
5
5
|
author_email = wrobell@riseup.net
|
|
6
6
|
license = GPLv3+
|
|
@@ -19,7 +19,6 @@ classifiers =
|
|
|
19
19
|
|
|
20
20
|
[options]
|
|
21
21
|
packages = find:
|
|
22
|
-
python_requires = >= 3.11
|
|
23
22
|
include_package_data = True
|
|
24
23
|
|
|
25
24
|
[options.package_data]
|
|
@@ -34,7 +33,7 @@ include_package_data = True
|
|
|
34
33
|
tests =
|
|
35
34
|
bandit
|
|
36
35
|
cython-lint
|
|
37
|
-
mypy == 1.11.
|
|
36
|
+
mypy == 1.11.2
|
|
38
37
|
pika # required for integration tests
|
|
39
38
|
pytest-asyncio
|
|
40
39
|
pytest-cov
|
|
@@ -46,7 +45,7 @@ tests =
|
|
|
46
45
|
performance =
|
|
47
46
|
msgpack
|
|
48
47
|
aiokafka == 0.8.1
|
|
49
|
-
rstream == 0.
|
|
48
|
+
rstream == 0.20.3
|
|
50
49
|
uamqp == 1.6.9
|
|
51
50
|
python-qpid-proton == 0.39.0
|
|
52
51
|
doc =
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|