satori-python-core 1.3.3__py3-none-any.whl → 1.3.4__py3-none-any.whl

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.
satori/__init__.py CHANGED
@@ -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.4"
49
49
 
50
50
 
51
51
  MessageReceipt = MessageObject
satori/model.py CHANGED
@@ -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())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satori-python-core
3
- Version: 1.3.3
3
+ Version: 1.3.4
4
4
  Summary: Satori Protocol SDK for python, specify common part
5
5
  Home-page: https://github.com/RF-Tar-Railt/satori-python
6
6
  Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
@@ -1,15 +1,15 @@
1
1
  .mina/core.toml,sha256=iGHLR9TARlanYzoo3EtSt3O9A9ciAi2H7qN6ubF6CnU,972
2
- satori/__init__.py,sha256=Uo9vtxXg7Smr-CCrMc4CNzHYIoXdqE2x8w_eGmcZBhI,1888
2
+ satori/__init__.py,sha256=FQefy9qVHoveZvovXuXDhPFX775QW0B8IutY41otMe8,1888
3
3
  satori/_vendor/fleep.py,sha256=_zKP7iY3mMQr0rC5KbgkbkMorT3KVLeIsWPLIUa0Y34,16347
4
4
  satori/const.py,sha256=6TQAIlgNq7fHLiadxGUU-mzkffOcpRrEvq5yrWYMuGc,2738
5
5
  satori/element.py,sha256=Ya0iDwMpgmfdluHWEYEhbaC9fdRZuYRJfjMwLM4vb_E,20707
6
6
  satori/event.py,sha256=yC6rKaa7JbeOZ4Un1rX-Isvm3EcR7e782nxYf1j6JdM,1060
7
7
  satori/exception.py,sha256=edKeuLRZAQxyCdw1_XCgOtv5tIHkfHw0Die9B818_HM,545
8
- satori/model.py,sha256=U3Ad78zjIATMgEQ-dpNtA60eungIU3L_AAJMq_EhzHU,17439
8
+ satori/model.py,sha256=L8Wlk4zGlnR5kM4rAsaXvPufxdwmUsshkFY9PLGj8tY,17614
9
9
  satori/parser.py,sha256=EyKitj39OewGhZuNIvrd8nWJiL5EJAVy7mtcv8Zk6v0,14658
10
10
  satori/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  satori/utils.py,sha256=N8HEw-DOXxOBwFHmmXgqPdMh6AXjiGR0ZGa1zBPH6EI,822
12
- satori_python_core-1.3.3.dist-info/METADATA,sha256=We07087PxeedV_TFmClbs3eTx2I_g-zjRCQ1yssdnVo,5150
13
- satori_python_core-1.3.3.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
14
- satori_python_core-1.3.3.dist-info/licenses/LICENSE,sha256=2EDswKd1M1648judap8BEEwp3Jz6IpfFP2wYVdU0Y2o,1069
15
- satori_python_core-1.3.3.dist-info/RECORD,,
12
+ satori_python_core-1.3.4.dist-info/METADATA,sha256=Q4RLVpNT88V_KCbA67PI4sjbk0cjNguGBfygwna_k2E,5150
13
+ satori_python_core-1.3.4.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
14
+ satori_python_core-1.3.4.dist-info/licenses/LICENSE,sha256=2EDswKd1M1648judap8BEEwp3Jz6IpfFP2wYVdU0Y2o,1069
15
+ satori_python_core-1.3.4.dist-info/RECORD,,