deltachat-rpc-client 2.25.0__tar.gz → 2.26.0__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 (33) hide show
  1. {deltachat_rpc_client-2.25.0/src/deltachat_rpc_client.egg-info → deltachat_rpc_client-2.26.0}/PKG-INFO +1 -1
  2. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/pyproject.toml +1 -1
  3. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/account.py +2 -1
  4. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/const.py +6 -8
  5. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0/src/deltachat_rpc_client.egg-info}/PKG-INFO +1 -1
  6. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_something.py +11 -12
  7. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/LICENSE +0 -0
  8. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/README.md +0 -0
  9. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/setup.cfg +0 -0
  10. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/__init__.py +0 -0
  11. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/_utils.py +0 -0
  12. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/chat.py +0 -0
  13. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/client.py +0 -0
  14. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/contact.py +0 -0
  15. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/deltachat.py +0 -0
  16. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/events.py +0 -0
  17. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/message.py +0 -0
  18. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/py.typed +0 -0
  19. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/pytestplugin.py +0 -0
  20. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client/rpc.py +0 -0
  21. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client.egg-info/SOURCES.txt +0 -0
  22. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client.egg-info/dependency_links.txt +0 -0
  23. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client.egg-info/entry_points.txt +0 -0
  24. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/src/deltachat_rpc_client.egg-info/top_level.txt +0 -0
  25. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_account_events.py +0 -0
  26. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_calls.py +0 -0
  27. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_chatlist_events.py +0 -0
  28. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_iroh_webxdc.py +0 -0
  29. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_key_transfer.py +0 -0
  30. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_multidevice.py +0 -0
  31. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_securejoin.py +0 -0
  32. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_vcard.py +0 -0
  33. {deltachat_rpc_client-2.25.0 → deltachat_rpc_client-2.26.0}/tests/test_webxdc.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deltachat-rpc-client
3
- Version: 2.25.0
3
+ Version: 2.26.0
4
4
  Summary: Python client for Delta Chat core JSON-RPC interface
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: Intended Audience :: Developers
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "deltachat-rpc-client"
7
- version = "2.25.0"
7
+ version = "2.26.0"
8
8
  description = "Python client for Delta Chat core JSON-RPC interface"
9
9
  classifiers = [
10
10
  "Development Status :: 5 - Production/Stable",
@@ -399,9 +399,10 @@ class Account:
399
399
  next_msg_ids = self._rpc.get_next_msgs(self.id)
400
400
  return [Message(self, msg_id) for msg_id in next_msg_ids]
401
401
 
402
+ @futuremethod
402
403
  def wait_next_messages(self) -> list[Message]:
403
404
  """Wait for new messages and return a list of them."""
404
- next_msg_ids = self._rpc.wait_next_msgs(self.id)
405
+ next_msg_ids = yield self._rpc.wait_next_msgs.future(self.id)
405
406
  return [Message(self, msg_id) for msg_id in next_msg_ids]
406
407
 
407
408
  def wait_for_incoming_msg_event(self):
@@ -91,19 +91,17 @@ class ChatId(IntEnum):
91
91
  LAST_SPECIAL = 9
92
92
 
93
93
 
94
- class ChatType(IntEnum):
94
+ class ChatType(str, Enum):
95
95
  """Chat type."""
96
96
 
97
- UNDEFINED = 0
98
-
99
- SINGLE = 100
97
+ SINGLE = "Single"
100
98
  """1:1 chat, i.e. a direct chat with a single contact"""
101
99
 
102
- GROUP = 120
100
+ GROUP = "Group"
103
101
 
104
- MAILINGLIST = 140
102
+ MAILINGLIST = "Mailinglist"
105
103
 
106
- OUT_BROADCAST = 160
104
+ OUT_BROADCAST = "OutBroadcast"
107
105
  """Outgoing broadcast channel, called "Channel" in the UI.
108
106
 
109
107
  The user can send into this channel,
@@ -115,7 +113,7 @@ class ChatType(IntEnum):
115
113
  which would make it hard to grep for it.
116
114
  """
117
115
 
118
- IN_BROADCAST = 165
116
+ IN_BROADCAST = "InBroadcast"
119
117
  """Incoming broadcast channel, called "Channel" in the UI.
120
118
 
121
119
  This channel is read-only,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deltachat-rpc-client
3
- Version: 2.25.0
3
+ Version: 2.26.0
4
4
  Summary: Python client for Delta Chat core JSON-RPC interface
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: Intended Audience :: Developers
@@ -484,22 +484,21 @@ def test_wait_next_messages(acfactory) -> None:
484
484
  # There are no old messages and the call returns immediately.
485
485
  assert not bot.wait_next_messages()
486
486
 
487
- with concurrent.futures.ThreadPoolExecutor(max_workers=1) as executor:
488
- # Bot starts waiting for messages.
489
- next_messages_task = executor.submit(bot.wait_next_messages)
487
+ # Bot starts waiting for messages.
488
+ next_messages_task = bot.wait_next_messages.future()
490
489
 
491
- alice_contact_bot = alice.create_contact(bot, "Bot")
492
- alice_chat_bot = alice_contact_bot.create_chat()
493
- alice_chat_bot.send_text("Hello!")
490
+ alice_contact_bot = alice.create_contact(bot, "Bot")
491
+ alice_chat_bot = alice_contact_bot.create_chat()
492
+ alice_chat_bot.send_text("Hello!")
494
493
 
495
- next_messages = next_messages_task.result()
494
+ next_messages = next_messages_task()
496
495
 
497
- if len(next_messages) == E2EE_INFO_MSGS:
498
- next_messages += bot.wait_next_messages()
496
+ if len(next_messages) == E2EE_INFO_MSGS:
497
+ next_messages += bot.wait_next_messages()
499
498
 
500
- assert len(next_messages) == 1 + E2EE_INFO_MSGS
501
- snapshot = next_messages[0 + E2EE_INFO_MSGS].get_snapshot()
502
- assert snapshot.text == "Hello!"
499
+ assert len(next_messages) == 1 + E2EE_INFO_MSGS
500
+ snapshot = next_messages[0 + E2EE_INFO_MSGS].get_snapshot()
501
+ assert snapshot.text == "Hello!"
503
502
 
504
503
 
505
504
  def test_import_export_backup(acfactory, tmp_path) -> None: