satori-python 1.3.3__tar.gz → 1.3.5__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 (31) hide show
  1. {satori_python-1.3.3 → satori_python-1.3.5}/PKG-INFO +1 -1
  2. {satori_python-1.3.3 → satori_python-1.3.5}/pyproject.toml +1 -1
  3. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/__init__.py +1 -1
  4. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/element.py +3 -1
  5. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/model.py +8 -1
  6. {satori_python-1.3.3 → satori_python-1.3.5}/LICENSE +0 -0
  7. {satori_python-1.3.3 → satori_python-1.3.5}/README.md +0 -0
  8. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/_vendor/fleep.py +0 -0
  9. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/__init__.py +0 -0
  10. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/account.py +0 -0
  11. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/account.pyi +0 -0
  12. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/config.py +0 -0
  13. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/network/__init__.py +0 -0
  14. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/network/base.py +0 -0
  15. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/network/util.py +0 -0
  16. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/network/webhook.py +0 -0
  17. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/network/websocket.py +0 -0
  18. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/client/protocol.py +0 -0
  19. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/const.py +0 -0
  20. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/event.py +0 -0
  21. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/exception.py +0 -0
  22. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/parser.py +0 -0
  23. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/py.typed +0 -0
  24. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/server/__init__.py +0 -0
  25. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/server/adapter.py +0 -0
  26. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/server/connection.py +0 -0
  27. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/server/formdata.py +0 -0
  28. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/server/model.py +0 -0
  29. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/server/route.py +0 -0
  30. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/server/utils.py +0 -0
  31. {satori_python-1.3.3 → satori_python-1.3.5}/src/satori/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satori-python
3
- Version: 1.3.3
3
+ Version: 1.3.5
4
4
  Summary: Satori Protocol SDK for python
5
5
  Home-page: https://github.com/RF-Tar-Railt/satori-python
6
6
  Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
@@ -30,7 +30,7 @@ classifiers = [
30
30
  "Programming Language :: Python :: 3.14",
31
31
  "Operating System :: OS Independent",
32
32
  ]
33
- version = "1.3.3"
33
+ version = "1.3.5"
34
34
 
35
35
  [project.license]
36
36
  text = "MIT"
@@ -45,7 +45,7 @@ from .model import Role as Role
45
45
  from .model import Upload as Upload
46
46
  from .model import User as User
47
47
 
48
- __version__ = "1.3.3"
48
+ __version__ = "1.3.5"
49
49
 
50
50
 
51
51
  MessageReceipt = MessageObject
@@ -124,6 +124,8 @@ class Element:
124
124
  return self.dumps()
125
125
 
126
126
  def __repr__(self) -> str:
127
+ if not self._attrs:
128
+ self._attrs = {k: v for k, v in self.__dict__.items() if not k.startswith("_")}
127
129
  args = {**self._attrs}
128
130
  elem = f"{self.__class__.__name__}(" + ", ".join(f"{k}={v!r}" for k, v in args.items())
129
131
  if self._children:
@@ -487,7 +489,7 @@ class Message(Element):
487
489
  self,
488
490
  id: str | None = None,
489
491
  forward: bool | None = None,
490
- content: list[str | Element] | None = None,
492
+ content: Sequence[str | Element] | None = None,
491
493
  ):
492
494
  self.id = id
493
495
  self.forward = forward
@@ -1,4 +1,6 @@
1
1
  import mimetypes
2
+ import sys
3
+ import typing
2
4
  from collections.abc import AsyncIterable, Awaitable, Callable
3
5
  from dataclasses import dataclass, field
4
6
  from datetime import datetime
@@ -12,6 +14,11 @@ from .element import Element, Emoji, transform
12
14
  from .parser import Element as RawElement
13
15
  from .parser import parse
14
16
 
17
+ if sys.version_info >= (3, 12):
18
+ _generic_init_subclass = typing._generic_init_subclass
19
+ else:
20
+ _generic_init_subclass = Generic.__init_subclass__.__func__
21
+
15
22
 
16
23
  @dataclass(slots=True)
17
24
  class ModelBase:
@@ -41,7 +48,7 @@ class ModelBase:
41
48
  keys = set()
42
49
  for c in cls.__mro__:
43
50
  if c is Generic:
44
- Generic.__init_subclass__.__func__(cls, **kwargs)
51
+ _generic_init_subclass(cls, **kwargs)
45
52
  if getattr(c, "__converter__", None):
46
53
  has_converter = True
47
54
  keys.update(getattr(c, "__annotations__", {}).keys())
File without changes
File without changes