rbfly 0.10.0.dev1__tar.gz → 0.10.0.dev3__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.
Files changed (59) hide show
  1. {rbfly-0.10.0.dev1/rbfly.egg-info → rbfly-0.10.0.dev3}/PKG-INFO +3 -4
  2. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/pyproject.toml +1 -0
  3. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/amqp/_message.c +24 -24
  4. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/amqp/_message.pyx +4 -4
  5. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/protocol.py +12 -3
  6. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/amqp/test_message.py +2 -2
  7. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/streams/test_codec.py +1 -2
  8. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3/rbfly.egg-info}/PKG-INFO +3 -4
  9. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly.egg-info/requires.txt +2 -2
  10. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/setup.cfg +3 -4
  11. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/COPYING +0 -0
  12. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/README +0 -0
  13. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/__init__.py +0 -0
  14. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/_buffer.c +0 -0
  15. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/_buffer.pxd +0 -0
  16. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/_buffer.pyx +0 -0
  17. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/_codec.c +0 -0
  18. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/_codec.h +0 -0
  19. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/_codec.pxd +0 -0
  20. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/_codec.pyx +0 -0
  21. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/amqp/__init__.py +0 -0
  22. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/amqp/_message.pxd +0 -0
  23. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/amqp/_message.pyi +0 -0
  24. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/cm.py +0 -0
  25. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/error.py +0 -0
  26. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/py.typed +0 -0
  27. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/slotmap.py +0 -0
  28. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/__init__.py +0 -0
  29. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_client.c +0 -0
  30. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_client.pyi +0 -0
  31. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_client.pyx +0 -0
  32. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_codec.c +0 -0
  33. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_codec.pyi +0 -0
  34. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_codec.pyx +0 -0
  35. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_mqueue.c +0 -0
  36. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_mqueue.pxd +0 -0
  37. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_mqueue.pyi +0 -0
  38. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/_mqueue.pyx +0 -0
  39. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/client.py +0 -0
  40. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/codec.py +0 -0
  41. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/const.py +0 -0
  42. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/error.py +0 -0
  43. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/offset.py +0 -0
  44. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/types.py +0 -0
  45. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/streams/util.py +0 -0
  46. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/__init__.py +0 -0
  47. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/amqp/__init__.py +0 -0
  48. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/streams/__init__.py +0 -0
  49. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/streams/test_client.py +0 -0
  50. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/streams/test_mqueue.py +0 -0
  51. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/streams/test_offset.py +0 -0
  52. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/test_slotmap.py +0 -0
  53. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/tests/test_util.py +0 -0
  54. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/types.py +0 -0
  55. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly/util.py +0 -0
  56. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly.egg-info/SOURCES.txt +0 -0
  57. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly.egg-info/dependency_links.txt +0 -0
  58. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/rbfly.egg-info/top_level.txt +0 -0
  59. {rbfly-0.10.0.dev1 → rbfly-0.10.0.dev3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rbfly
3
- Version: 0.10.0.dev1
3
+ Version: 0.10.0.dev3
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.1; extra == "tests"
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.13.0; extra == "performance"
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 *__pyx_v_msg_header = 0;
5643
+ CYTHON_UNUSED PyObject *__pyx_v__msg_header = 0;
5644
5644
  PyObject *__pyx_v_msg_annotations = 0;
5645
- CYTHON_UNUSED PyObject *__pyx_v_msg_properties = 0;
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 msg_header = {} # <<<<<<<<<<<<<<
5667
+ * object _msg_header = {} # <<<<<<<<<<<<<<
5668
5668
  * object msg_annotations = {}
5669
- * object msg_properties = {}
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
- __pyx_v_msg_header = __pyx_t_1;
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 msg_header = {}
5678
+ * object _msg_header = {}
5679
5679
  * object msg_annotations = {} # <<<<<<<<<<<<<<
5680
- * object msg_properties = {}
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 msg_header = {}
5689
+ * object _msg_header = {}
5690
5690
  * object msg_annotations = {}
5691
- * object msg_properties = {} # <<<<<<<<<<<<<<
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
- __pyx_v_msg_properties = __pyx_t_1;
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 msg_properties = {}
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
- * msg_header = _decode_value(buffer, type_code)
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
- * msg_header = _decode_value(buffer, type_code)
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
- * msg_header = _decode_value(buffer, type_code) # <<<<<<<<<<<<<<
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(__pyx_v_msg_header, __pyx_t_1);
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
- * msg_header = _decode_value(buffer, type_code)
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
- * msg_header = _decode_value(buffer, type_code)
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
- * msg_properties = _decode_value(buffer, type_code)
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
- * msg_properties = _decode_value(buffer, type_code) # <<<<<<<<<<<<<<
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(__pyx_v_msg_properties, __pyx_t_1);
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
- * msg_properties = _decode_value(buffer, type_code)
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
- * msg_properties = _decode_value(buffer, type_code)
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(__pyx_v_msg_header);
6203
+ __Pyx_XDECREF(__pyx_v__msg_header);
6204
6204
  __Pyx_XDECREF(__pyx_v_msg_annotations);
6205
- __Pyx_XDECREF(__pyx_v_msg_properties);
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 msg_header = {}
226
+ object _msg_header = {}
227
227
  object msg_annotations = {}
228
- object msg_properties = {}
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
- msg_header = _decode_value(buffer, type_code)
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
- msg_properties = _decode_value(buffer, type_code)
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:
@@ -632,6 +632,11 @@ class RabbitMQStreamsProtocol(asyncio.Protocol):
632
632
  """
633
633
  Send RabbitMQ streams frame to broker.
634
634
  """
635
+ # multiple participants might kill connection for each other,
636
+ # reconnect then
637
+ if self.transport.empty:
638
+ logger.warning('connection lost on frame send')
639
+ raise ConnectionError('Connection lost on frame send')
635
640
  transport = self.transport.value
636
641
  transport.write(data)
637
642
 
@@ -648,7 +653,11 @@ class RabbitMQStreamsProtocol(asyncio.Protocol):
648
653
  'request sent, key=0x{:02x}, correlation_id={}'
649
654
  .format(key, correlation_id)
650
655
  )
651
- return await task
656
+ try:
657
+ return await task
658
+ except asyncio.CancelledError:
659
+ if correlation_id in self._requests:
660
+ del self._requests[correlation_id]
652
661
 
653
662
  def create_waiter(self, key: int) -> asyncio.Future[None]:
654
663
  """
@@ -672,11 +681,11 @@ class RabbitMQStreamsProtocol(asyncio.Protocol):
672
681
  )
673
682
 
674
683
  task = self._requests.pop(correlation_id, None)
675
- if not task:
684
+ if not task or task.done():
676
685
  # maybe wrong response from the broker, maybe task no longer
677
686
  # valid due to disconnection process in progress
678
687
  logger.warning(
679
- 'request task not found, correlation id={}'
688
+ 'request task not found or done, correlation id={}'
680
689
  .format(correlation_id)
681
690
  )
682
691
  return
@@ -18,7 +18,7 @@
18
18
  #
19
19
 
20
20
  import uuid
21
- from datetime import datetime, timezone
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=timezone.utc)),
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: tp.Optional[int]=None) -> bytes:
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.dev1
3
+ Version: 0.10.0.dev3
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.1; extra == "tests"
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.13.0; extra == "performance"
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.13.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.1
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.dev1
3
+ version = 0.10.0.dev3
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.1
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.13.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