pycrdt 0.12.38__tar.gz → 0.12.40__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.

Potentially problematic release.


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

Files changed (66) hide show
  1. {pycrdt-0.12.38 → pycrdt-0.12.40}/.github/workflows/publish.yml +5 -5
  2. {pycrdt-0.12.38 → pycrdt-0.12.40}/.github/workflows/test.yml +2 -0
  3. {pycrdt-0.12.38 → pycrdt-0.12.40}/CHANGELOG.md +4 -0
  4. {pycrdt-0.12.38 → pycrdt-0.12.40}/Cargo.lock +1 -1
  5. {pycrdt-0.12.38 → pycrdt-0.12.40}/Cargo.toml +1 -1
  6. {pycrdt-0.12.38 → pycrdt-0.12.40}/PKG-INFO +1 -1
  7. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_base.py +9 -4
  8. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_provider.py +2 -4
  9. {pycrdt-0.12.38 → pycrdt-0.12.40}/.gitignore +0 -0
  10. {pycrdt-0.12.38 → pycrdt-0.12.40}/.pre-commit-config.yaml +0 -0
  11. {pycrdt-0.12.38 → pycrdt-0.12.40}/LICENSE +0 -0
  12. {pycrdt-0.12.38 → pycrdt-0.12.40}/README.md +0 -0
  13. {pycrdt-0.12.38 → pycrdt-0.12.40}/docs/api_reference.md +0 -0
  14. {pycrdt-0.12.38 → pycrdt-0.12.40}/docs/assets/logo.png +0 -0
  15. {pycrdt-0.12.38 → pycrdt-0.12.40}/docs/index.md +0 -0
  16. {pycrdt-0.12.38 → pycrdt-0.12.40}/docs/install.md +0 -0
  17. {pycrdt-0.12.38 → pycrdt-0.12.40}/docs/usage.md +0 -0
  18. {pycrdt-0.12.38 → pycrdt-0.12.40}/mkdocs.yml +0 -0
  19. {pycrdt-0.12.38 → pycrdt-0.12.40}/pyproject.toml +0 -0
  20. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/__init__.py +0 -0
  21. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_array.py +0 -0
  22. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_awareness.py +0 -0
  23. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_doc.py +0 -0
  24. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_map.py +0 -0
  25. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_pycrdt.pyi +0 -0
  26. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_snapshot.py +0 -0
  27. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_sticky_index.py +0 -0
  28. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_sync.py +0 -0
  29. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_text.py +0 -0
  30. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_transaction.py +0 -0
  31. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_undo.py +0 -0
  32. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_update.py +0 -0
  33. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_version.py +0 -0
  34. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/_xml.py +0 -0
  35. {pycrdt-0.12.38 → pycrdt-0.12.40}/python/pycrdt/py.typed +0 -0
  36. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/array.rs +0 -0
  37. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/doc.rs +0 -0
  38. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/lib.rs +0 -0
  39. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/map.rs +0 -0
  40. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/snapshot.rs +0 -0
  41. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/sticky_index.rs +0 -0
  42. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/subscription.rs +0 -0
  43. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/text.rs +0 -0
  44. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/transaction.rs +0 -0
  45. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/type_conversions.rs +0 -0
  46. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/undo.rs +0 -0
  47. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/update.rs +0 -0
  48. {pycrdt-0.12.38 → pycrdt-0.12.40}/src/xml.rs +0 -0
  49. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/conftest.py +0 -0
  50. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_array.py +0 -0
  51. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_awareness.py +0 -0
  52. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_doc.py +0 -0
  53. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_map.py +0 -0
  54. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_model.py +0 -0
  55. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_provider.py +0 -0
  56. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_snapshot.py +0 -0
  57. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_sync.py +0 -0
  58. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_text.py +0 -0
  59. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_threads.py +0 -0
  60. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_transaction.py +0 -0
  61. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_typed.py +0 -0
  62. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_types.py +0 -0
  63. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_undo.py +0 -0
  64. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_update.py +0 -0
  65. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/test_xml.py +0 -0
  66. {pycrdt-0.12.38 → pycrdt-0.12.40}/tests/utils.py +0 -0
@@ -28,7 +28,7 @@ jobs:
28
28
  - name: Build wheels - universal2
29
29
  uses: PyO3/maturin-action@v1
30
30
  with:
31
- args: --release --target universal2-apple-darwin --out dist -i 3.10 3.11 3.12 3.13 pypy3.10
31
+ args: --release --target universal2-apple-darwin --out dist -i 3.10 3.11 3.12 3.13 3.14 pypy3.10 pypy3.11
32
32
  - name: Test built wheel - universal2
33
33
  run: |
34
34
  pip install pytest pytest-mypy-testing "pydantic>=2.5.2,<3" "anyio>=4.4.0,<5" "trio>=0.25.1,<0.32" "exceptiongroup; python_version<'3.11'"
@@ -47,9 +47,9 @@ jobs:
47
47
  matrix:
48
48
  platform:
49
49
  - target: x64
50
- interpreter: ["3.10", "3.11", "3.12", "3.13"]
50
+ interpreter: ["3.10", "3.11", "3.12", "3.13", "3.14"]
51
51
  - target: x86
52
- interpreter: ["3.10", "3.11", "3.12", "3.13"]
52
+ interpreter: ["3.10", "3.11", "3.12", "3.13", "3.14"]
53
53
  steps:
54
54
  - uses: actions/checkout@v4
55
55
  - uses: actions/setup-python@v5
@@ -98,7 +98,7 @@ jobs:
98
98
  rust-toolchain: stable
99
99
  target: ${{ matrix.target }}
100
100
  manylinux: auto
101
- args: --release --out dist -i 3.10 3.11 3.12 3.13 pypy3.10
101
+ args: --release --out dist -i 3.10 3.11 3.12 3.13 3.14 pypy3.10 pypy3.11
102
102
  - name: Test built wheel
103
103
  if: matrix.target == 'x86_64'
104
104
  run: |
@@ -127,7 +127,7 @@ jobs:
127
127
  rust-toolchain: stable
128
128
  target: ${{ matrix.target }}
129
129
  manylinux: auto
130
- args: --release --out dist -i 3.10 3.11 3.12 3.13 pypy3.10
130
+ args: --release --out dist -i 3.10 3.11 3.12 3.13 3.14 pypy3.10 pypy3.11
131
131
 
132
132
  - uses: uraimo/run-on-arch-action@v2.8.1
133
133
  name: Test built wheel
@@ -25,7 +25,9 @@ jobs:
25
25
  - '3.11'
26
26
  - '3.12'
27
27
  - '3.13'
28
+ - '3.14'
28
29
  - 'pypy3.10'
30
+ - 'pypy3.11'
29
31
 
30
32
  runs-on: ${{ matrix.os }}-latest
31
33
 
@@ -1,5 +1,9 @@
1
1
  # Version history
2
2
 
3
+ ## 0.12.40
4
+
5
+ - Support Python v3.14.
6
+
3
7
  ## 0.12.38
4
8
 
5
9
  - Improve error propagation with `PyResult`.
@@ -244,7 +244,7 @@ dependencies = [
244
244
 
245
245
  [[package]]
246
246
  name = "pycrdt"
247
- version = "0.12.38"
247
+ version = "0.12.40"
248
248
  dependencies = [
249
249
  "pyo3",
250
250
  "serde_json",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pycrdt"
3
- version = "0.12.38"
3
+ version = "0.12.40"
4
4
  edition = "2021"
5
5
  readme = "README.md"
6
6
 
@@ -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
@@ -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:
@@ -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]:
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
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
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes