pycrdt 0.12.38__cp313-cp313-win32.whl → 0.12.40__cp313-cp313-win32.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.

Potentially problematic release.


This version of pycrdt might be problematic. Click here for more details.

pycrdt/_base.py CHANGED
@@ -4,6 +4,7 @@ import threading
4
4
  from abc import ABC, abstractmethod
5
5
  from functools import lru_cache, partial
6
6
  from inspect import signature
7
+ from types import UnionType
7
8
  from typing import (
8
9
  TYPE_CHECKING,
9
10
  Any,
@@ -12,6 +13,8 @@ from typing import (
12
13
  Type,
13
14
  Union,
14
15
  cast,
16
+ get_args,
17
+ get_origin,
15
18
  get_type_hints,
16
19
  overload,
17
20
  )
@@ -388,10 +391,12 @@ class Typed:
388
391
  if key not in annotations:
389
392
  raise AttributeError(f'"{type(self).mro()[0]}" has no attribute "{key}"')
390
393
  expected_type = annotations[key]
391
- if hasattr(expected_type, "__origin__"):
392
- expected_type = expected_type.__origin__
393
- if hasattr(expected_type, "__args__"):
394
- expected_types = expected_type.__args__
394
+ origin = get_origin(expected_type)
395
+ if origin in (Union, UnionType):
396
+ expected_types = get_args(expected_type)
397
+ elif origin is not None:
398
+ expected_type = origin
399
+ expected_types = (expected_type,)
395
400
  else:
396
401
  expected_types = (expected_type,)
397
402
  if type(value) not in expected_types:
pycrdt/_provider.py CHANGED
@@ -141,10 +141,8 @@ class Provider:
141
141
  return self
142
142
 
143
143
  async def __aexit__(self, exc_type, exc_value, exc_tb):
144
- try:
145
- await self.stop()
146
- finally:
147
- return await self._exit_stack.__aexit__(exc_type, exc_value, exc_tb)
144
+ await self.stop()
145
+ return await self._exit_stack.__aexit__(exc_type, exc_value, exc_tb)
148
146
 
149
147
  @asynccontextmanager
150
148
  async def _get_or_create_task_group(self) -> AsyncIterator[TaskGroup]:
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pycrdt
3
- Version: 0.12.38
3
+ Version: 0.12.40
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -1,14 +1,14 @@
1
- pycrdt-0.12.38.dist-info/METADATA,sha256=gfW9_4cjWjXpQxbK4UanGbzVefeQnItDKSWQdMBjdHw,1487
2
- pycrdt-0.12.38.dist-info/WHEEL,sha256=TKYAokHfG6FndJvxsB6gPIh2207CKa8QCGaVjiVShKI,92
3
- pycrdt-0.12.38.dist-info/licenses/LICENSE,sha256=-uIz47KBJpIuEvvMUTwpg6OAiJJuqYajA4bW7QJ9o18,1102
1
+ pycrdt-0.12.40.dist-info/METADATA,sha256=VFcq9q1IHJd0bWaTTdfhUsTwjHvFsly4bwCk5-OpYOc,1487
2
+ pycrdt-0.12.40.dist-info/WHEEL,sha256=JxUeaYp69WTmPUBx4dkPAWqxDm8JFrAL_AcImdz_qsY,92
3
+ pycrdt-0.12.40.dist-info/licenses/LICENSE,sha256=-uIz47KBJpIuEvvMUTwpg6OAiJJuqYajA4bW7QJ9o18,1102
4
4
  pycrdt/__init__.py,sha256=2fK0vWlJyzGEx767phtTDHrkCsEn0p4ftNxAFOK70CU,2150
5
5
  pycrdt/_array.py,sha256=YflwaoYzi_fSf9fLexyBrVJXGmJM5MJSBdQfn9HDRyE,15099
6
6
  pycrdt/_awareness.py,sha256=mKPNp5PVehxqy_cP1ErhITbp8YY52C3Ux2BsEuu8778,11208
7
- pycrdt/_base.py,sha256=GWWTRZ93KbR87Qug1nu0X-YYUWGLXYP5vg9HbwCyizc,13361
7
+ pycrdt/_base.py,sha256=4iw_7jtEwyZrzPCW_z9L8tZ7iq3aiVn55miB3dsBAXk,13482
8
8
  pycrdt/_doc.py,sha256=Hqxfs4GiCCxbbJ8kRL-mCMf3g1ZCRlfJ2pgmBPXO5r0,17305
9
9
  pycrdt/_map.py,sha256=2qPHaWX6U0dMy7QRkXclCsFO6Zt13UCtmJL332CtxSM,10969
10
- pycrdt/_provider.py,sha256=C4vjfsH7NlGtA7fPM6PM4oap49MYWKnjmiRjYyM1NyI,5511
11
- pycrdt/_pycrdt.cp313-win32.pyd,sha256=-g4uHp06e4NnG9kE1lwfZTp6A75-0RSrGyQxka571fY,1529344
10
+ pycrdt/_provider.py,sha256=E_fzs44tWvYa_NGd5HE6dUVd6N2B1S8S4d-sX_Ao6Es,5471
11
+ pycrdt/_pycrdt.cp313-win32.pyd,sha256=aUPczC7f7dq1FPGNpY3ONNL2sPaT9tI-eTBEW4W09O0,1528320
12
12
  pycrdt/_pycrdt.pyi,sha256=arzSIfs4E60vlWQ2y4s3l5tOsZaI7EzqrZnTUlWI7Lo,16614
13
13
  pycrdt/_snapshot.py,sha256=BpApwJ9WVqtJvXHHI_lu6KgaJxYS_Q2rMp9Y6R1H9EE,1422
14
14
  pycrdt/_sticky_index.py,sha256=GL4vNGPqqgLOGj_tm_1SDiAo6NuudvGAkXaTDvvuFi0,4612
@@ -20,4 +20,4 @@ pycrdt/_update.py,sha256=odt-Dsq2vKQTW_yfiqukmRTs5T6E4pe5Wl_PtrhH71w,1202
20
20
  pycrdt/_version.py,sha256=1B-NXFpddZSmM_1TNhtXeKRiTr9WBOpl5Mftxt7zCDc,190
21
21
  pycrdt/_xml.py,sha256=jHRpLpC07oH4KDY2RskGQ7HTcMqO-TFQj56xbnnwejM,18870
22
22
  pycrdt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
- pycrdt-0.12.38.dist-info/RECORD,,
23
+ pycrdt-0.12.40.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.9.5)
2
+ Generator: maturin (1.9.6)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp313-cp313-win32