ez-a-sync 0.24.11__tar.gz → 0.24.12__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 ez-a-sync might be problematic. Click here for more details.

Files changed (168) hide show
  1. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/PKG-INFO +1 -1
  2. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/_smart.py +7 -2
  3. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/prio_semaphore.c +35 -41
  4. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/prio_semaphore.pyx +4 -4
  5. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/ez_a_sync.egg-info/PKG-INFO +1 -1
  6. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/.coverage +0 -0
  7. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/.github/workflows/black.yaml +0 -0
  8. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/.github/workflows/codeql.yaml +0 -0
  9. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/.github/workflows/docs.yaml +0 -0
  10. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/.github/workflows/mypy.yaml +0 -0
  11. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/.github/workflows/pytest.yaml +0 -0
  12. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/.github/workflows/release.yaml +0 -0
  13. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/.gitignore +0 -0
  14. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/.sourcery.yaml +0 -0
  15. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/LICENSE.txt +0 -0
  16. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/MANIFEST.in +0 -0
  17. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/Makefile +0 -0
  18. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/README.md +0 -0
  19. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/TODO +0 -0
  20. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/ENVIRONMENT_VARIABLES.py +0 -0
  21. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/__init__.pxd +0 -0
  22. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/__init__.py +0 -0
  23. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/_typing.py +0 -0
  24. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/__init__.py +0 -0
  25. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_descriptor.py +0 -0
  26. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_flags.c +0 -0
  27. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_flags.pxd +0 -0
  28. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_flags.pyx +0 -0
  29. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_helpers.c +0 -0
  30. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_helpers.pxd +0 -0
  31. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_helpers.pyi +0 -0
  32. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_helpers.pyx +0 -0
  33. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_kwargs.c +0 -0
  34. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_kwargs.pxd +0 -0
  35. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_kwargs.pyx +0 -0
  36. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/_meta.py +0 -0
  37. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/abstract.c +0 -0
  38. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/abstract.pyi +0 -0
  39. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/abstract.pyx +0 -0
  40. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/base.c +0 -0
  41. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/base.pyi +0 -0
  42. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/base.pyx +0 -0
  43. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/config.py +0 -0
  44. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/decorator.py +0 -0
  45. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/flags.py +0 -0
  46. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/function.c +0 -0
  47. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/function.pyi +0 -0
  48. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/function.pyx +0 -0
  49. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/method.c +0 -0
  50. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/method.pxd +0 -0
  51. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/method.pyi +0 -0
  52. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/method.pyx +0 -0
  53. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/modifiers/__init__.py +0 -0
  54. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/modifiers/cache/__init__.py +0 -0
  55. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/modifiers/cache/memory.py +0 -0
  56. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/modifiers/limiter.py +0 -0
  57. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/modifiers/manager.c +0 -0
  58. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/modifiers/manager.pyi +0 -0
  59. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/modifiers/manager.pyx +0 -0
  60. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/modifiers/semaphores.py +0 -0
  61. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/property.c +0 -0
  62. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/property.pyi +0 -0
  63. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/property.pyx +0 -0
  64. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/a_sync/singleton.py +0 -0
  65. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/aliases.py +0 -0
  66. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/__init__.py +0 -0
  67. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/as_completed.c +0 -0
  68. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/as_completed.pxd +0 -0
  69. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/as_completed.pyi +0 -0
  70. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/as_completed.pyx +0 -0
  71. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/create_task.c +0 -0
  72. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/create_task.pxd +0 -0
  73. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/create_task.pyi +0 -0
  74. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/create_task.pyx +0 -0
  75. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/gather.c +0 -0
  76. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/gather.pyi +0 -0
  77. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/asyncio/gather.pyx +0 -0
  78. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/exceptions.py +0 -0
  79. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/executor.py +0 -0
  80. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/future.py +0 -0
  81. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/iter.c +0 -0
  82. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/iter.pyi +0 -0
  83. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/iter.pyx +0 -0
  84. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/__init__.pxd +0 -0
  85. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/__init__.py +0 -0
  86. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/_debug.c +0 -0
  87. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/_debug.pxd +0 -0
  88. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/_debug.pyi +0 -0
  89. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/_debug.pyx +0 -0
  90. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/_loggable.c +0 -0
  91. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/_loggable.pxd +0 -0
  92. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/_loggable.pyi +0 -0
  93. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/_loggable.pyx +0 -0
  94. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/__init__.pxd +0 -0
  95. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/__init__.py +0 -0
  96. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/counter.c +0 -0
  97. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/counter.pxd +0 -0
  98. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/counter.pyi +0 -0
  99. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/counter.pyx +0 -0
  100. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/event.c +0 -0
  101. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/event.pxd +0 -0
  102. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/event.pyi +0 -0
  103. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/event.pyx +0 -0
  104. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/prio_semaphore.pxd +0 -0
  105. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/prio_semaphore.pyi +0 -0
  106. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/semaphore.c +0 -0
  107. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/semaphore.pxd +0 -0
  108. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/semaphore.pyi +0 -0
  109. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/locks/semaphore.pyx +0 -0
  110. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/primitives/queue.py +0 -0
  111. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/py.typed +0 -0
  112. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/sphinx/__init__.py +0 -0
  113. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/sphinx/ext.py +0 -0
  114. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/task.py +0 -0
  115. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/utils/__init__.py +0 -0
  116. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/a_sync/utils/iterators.py +0 -0
  117. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/Makefile +0 -0
  118. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/alabaster.css +0 -0
  119. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/basic.css +0 -0
  120. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/custom.css +0 -0
  121. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/doctools.js +0 -0
  122. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/documentation_options.js +0 -0
  123. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/file.png +0 -0
  124. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/language_data.js +0 -0
  125. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/minus.png +0 -0
  126. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/plus.png +0 -0
  127. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/pygments.css +0 -0
  128. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/searchtools.js +0 -0
  129. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/_build/html/_static/sphinx_highlight.js +0 -0
  130. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/conf.py +0 -0
  131. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/index.rst +0 -0
  132. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/docs/make.bat +0 -0
  133. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/ez_a_sync.egg-info/SOURCES.txt +0 -0
  134. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/ez_a_sync.egg-info/dependency_links.txt +0 -0
  135. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/ez_a_sync.egg-info/not-zip-safe +0 -0
  136. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/ez_a_sync.egg-info/requires.txt +0 -0
  137. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/ez_a_sync.egg-info/top_level.txt +0 -0
  138. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/pyproject.yaml +0 -0
  139. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/requirements-dev.txt +0 -0
  140. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/requirements.txt +0 -0
  141. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/setup.cfg +0 -0
  142. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/setup.py +0 -0
  143. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/__init__.py +0 -0
  144. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/a_sync/test_abstract.py +0 -0
  145. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/a_sync/test_base.py +0 -0
  146. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/a_sync/test_cache.py +0 -0
  147. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/a_sync/test_decorator.py +0 -0
  148. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/a_sync/test_limiter.py +0 -0
  149. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/a_sync/test_meta.py +0 -0
  150. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/a_sync/test_modified.py +0 -0
  151. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/a_sync/test_singleton.py +0 -0
  152. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/asyncio/test_as_completed.py +0 -0
  153. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/asyncio/test_create_task.py +0 -0
  154. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/asyncio/test_gather.py +0 -0
  155. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/conftest.py +0 -0
  156. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/executor.py +0 -0
  157. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/fixtures.py +0 -0
  158. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/primitives/test_counter.py +0 -0
  159. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/primitives/test_event.py +0 -0
  160. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/primitives/test_prio_semaphore.py +0 -0
  161. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/primitives/test_queue.py +0 -0
  162. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/primitives/test_semaphore.py +0 -0
  163. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/task/test_task.py +0 -0
  164. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/task/test_task_mapping_views.py +0 -0
  165. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/test_executor.py +0 -0
  166. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/test_future.py +0 -0
  167. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/test_helpers.py +0 -0
  168. {ez_a_sync-0.24.11 → ez_a_sync-0.24.12}/tests/test_iter.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ez-a-sync
3
- Version: 0.24.11
3
+ Version: 0.24.12
4
4
  Summary: A library that makes it easy to define objects that can be used for both sync and async use cases.
5
5
  Home-page: https://github.com/BobTheBuidler/a-sync
6
6
  Author: BobTheBuidler
@@ -6,6 +6,7 @@ to protect tasks from cancellation.
6
6
  """
7
7
 
8
8
  import asyncio
9
+ import contextvars
9
10
  import logging
10
11
  import warnings
11
12
  import weakref
@@ -197,7 +198,9 @@ class SmartFuture(_SmartFutureMixin[T], asyncio.Future):
197
198
  if key:
198
199
  self._key = key
199
200
  self._waiters = weakref.WeakSet()
200
- self.add_done_callback(SmartFuture._self_done_cleanup_callback)
201
+ self._callbacks.append(
202
+ (SmartFuture._self_done_cleanup_callback, contextvars.copy_context())
203
+ )
201
204
 
202
205
  def __repr__(self):
203
206
  return f"<{type(self).__name__} key={self._key} waiters={self.num_waiters} {self._state}>"
@@ -298,7 +301,9 @@ class SmartTask(_SmartFutureMixin[T], asyncio.Task):
298
301
  """
299
302
  asyncio.Task.__init__(self, coro, loop=loop, name=name)
300
303
  self._waiters: Set["asyncio.Task[T]"] = set()
301
- self.add_done_callback(SmartTask._self_done_cleanup_callback)
304
+ self._callbacks.append(
305
+ (SmartTask._self_done_cleanup_callback, contextvars.copy_context())
306
+ )
302
307
 
303
308
 
304
309
  def smart_task_factory(
@@ -3405,7 +3405,7 @@ static const char __pyx_k_AbstractPrioritySemaphore_locke[] = "_AbstractPriority
3405
3405
  static const char __pyx_k_Acquires_the_semaphore_for_this[] = "Acquires the semaphore for this context manager.\n\n If the internal counter is larger than zero on entry,\n decrement it by one and return True immediately. If it is\n zero on entry, block, waiting until some other coroutine has\n called release() to make it larger than 0, and then return\n True.\n\n This method overrides :meth:`Semaphore.acquire` to handle priority-based logic.\n\n Examples:\n >>> context_manager = _AbstractPrioritySemaphoreContextManager(parent, priority=1)\n >>> await context_manager.acquire()\n ";
3406
3406
  static const char __pyx_k_Acquires_the_semaphore_with_the[] = "Acquires the semaphore with the top priority.\n\n This method overrides :meth:`Semaphore.acquire` to handle priority-based logic.\n\n Examples:\n >>> semaphore = _AbstractPrioritySemaphore(5)\n >>> await semaphore.acquire()\n ";
3407
3407
  static const char __pyx_k_Initializes_the_context_manager[] = "Initializes the context manager for a specific priority.\n\n Args:\n parent: The parent semaphore.\n priority: The priority associated with this context manager.\n name: An optional name for the context manager, used for debugging.\n\n Examples:\n >>> parent_semaphore = _AbstractPrioritySemaphore(5)\n >>> context_manager = _AbstractPrioritySemaphoreContextManager(parent_semaphore, priority=1)\n ";
3408
- static const char __pyx_k_PrioritySemaphoreContextManager[] = "_PrioritySemaphoreContextManager__AbstractPrioritySemaphoreContextManager__waiters";
3408
+ static const char __pyx_k_PrioritySemaphoreContextManager[] = "_PrioritySemaphoreContextManager";
3409
3409
  static const char __pyx_k_Releases_the_semaphore_for_this[] = "Releases the semaphore for this context manager.\n\n This method overrides :meth:`Semaphore.release` to handle priority-based logic.\n\n Examples:\n >>> context_manager = _AbstractPrioritySemaphoreContextManager(parent, priority=1)\n >>> context_manager.release()\n ";
3410
3410
  static const char __pyx_k_This_module_provides_priority_b[] = "\nThis module provides priority-based semaphore implementations. These semaphores allow \nwaiters to be assigned priorities, ensuring that higher priority waiters are \nprocessed before lower priority ones.\n";
3411
3411
  static const char __pyx_k_Checks_if_the_semaphore_is_locke[] = "Checks if the semaphore is locked.\n\n Returns:\n True if the semaphore cannot be acquired immediately, False otherwise.\n\n Examples:\n >>> semaphore = _AbstractPrioritySemaphore(5)\n >>> semaphore.locked()\n ";
@@ -3436,10 +3436,9 @@ static const char __pyx_k_AbstractPrioritySemaphore__wake_2[] = "_AbstractPriori
3436
3436
  static const char __pyx_k_AbstractPrioritySemaphore_acqui_2[] = "_AbstractPrioritySemaphore.acquire (line 108)";
3437
3437
  static const char __pyx_k_AbstractPrioritySemaphore_c_loc_2[] = "_AbstractPrioritySemaphore.c_locked.<locals>.genexpr";
3438
3438
  static const char __pyx_k_AbstractPrioritySemaphore_locke_2[] = "_AbstractPrioritySemaphore.locked (line 151)";
3439
- static const char __pyx_k_PrioritySemaphoreContextManager_2[] = "_PrioritySemaphoreContextManager";
3440
- static const char __pyx_k_PrioritySemaphoreContextManager_3[] = "_PrioritySemaphoreContextManager.__reduce_cython__";
3441
- static const char __pyx_k_PrioritySemaphoreContextManager_4[] = "_PrioritySemaphoreContextManager.__setstate_cython__";
3442
- static const char __pyx_k_PrioritySemaphoreContextManager_5[] = "_PrioritySemaphoreContextManager.__lt__ (line 400)";
3439
+ static const char __pyx_k_PrioritySemaphoreContextManager_2[] = "_PrioritySemaphoreContextManager.__reduce_cython__";
3440
+ static const char __pyx_k_PrioritySemaphoreContextManager_3[] = "_PrioritySemaphoreContextManager.__setstate_cython__";
3441
+ static const char __pyx_k_PrioritySemaphoreContextManager_4[] = "_PrioritySemaphoreContextManager.__lt__ (line 400)";
3443
3442
  static const char __pyx_k_AbstractPrioritySemaphoreContex_10[] = "_AbstractPrioritySemaphoreContextManager.__reduce_cython__";
3444
3443
  static const char __pyx_k_AbstractPrioritySemaphoreContex_11[] = "_AbstractPrioritySemaphoreContextManager.__setstate_cython__";
3445
3444
  static const char __pyx_k_AbstractPrioritySemaphoreContex_12[] = "_AbstractPrioritySemaphoreContextManager.__init__ (line 266)";
@@ -3612,8 +3611,7 @@ typedef struct {
3612
3611
  PyObject *__pyx_n_s_PrioritySemaphoreContextManager;
3613
3612
  PyObject *__pyx_n_s_PrioritySemaphoreContextManager_2;
3614
3613
  PyObject *__pyx_n_s_PrioritySemaphoreContextManager_3;
3615
- PyObject *__pyx_n_s_PrioritySemaphoreContextManager_4;
3616
- PyObject *__pyx_kp_u_PrioritySemaphoreContextManager_5;
3614
+ PyObject *__pyx_kp_u_PrioritySemaphoreContextManager_4;
3617
3615
  PyObject *__pyx_kp_u_PrioritySemaphore___getitem___li;
3618
3616
  PyObject *__pyx_n_s_PrioritySemaphore___reduce_cytho;
3619
3617
  PyObject *__pyx_n_s_PrioritySemaphore___setstate_cyt;
@@ -3923,8 +3921,7 @@ static int __pyx_m_clear(PyObject *m) {
3923
3921
  Py_CLEAR(clear_module_state->__pyx_n_s_PrioritySemaphoreContextManager);
3924
3922
  Py_CLEAR(clear_module_state->__pyx_n_s_PrioritySemaphoreContextManager_2);
3925
3923
  Py_CLEAR(clear_module_state->__pyx_n_s_PrioritySemaphoreContextManager_3);
3926
- Py_CLEAR(clear_module_state->__pyx_n_s_PrioritySemaphoreContextManager_4);
3927
- Py_CLEAR(clear_module_state->__pyx_kp_u_PrioritySemaphoreContextManager_5);
3924
+ Py_CLEAR(clear_module_state->__pyx_kp_u_PrioritySemaphoreContextManager_4);
3928
3925
  Py_CLEAR(clear_module_state->__pyx_kp_u_PrioritySemaphore___getitem___li);
3929
3926
  Py_CLEAR(clear_module_state->__pyx_n_s_PrioritySemaphore___reduce_cytho);
3930
3927
  Py_CLEAR(clear_module_state->__pyx_n_s_PrioritySemaphore___setstate_cyt);
@@ -4212,8 +4209,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4212
4209
  Py_VISIT(traverse_module_state->__pyx_n_s_PrioritySemaphoreContextManager);
4213
4210
  Py_VISIT(traverse_module_state->__pyx_n_s_PrioritySemaphoreContextManager_2);
4214
4211
  Py_VISIT(traverse_module_state->__pyx_n_s_PrioritySemaphoreContextManager_3);
4215
- Py_VISIT(traverse_module_state->__pyx_n_s_PrioritySemaphoreContextManager_4);
4216
- Py_VISIT(traverse_module_state->__pyx_kp_u_PrioritySemaphoreContextManager_5);
4212
+ Py_VISIT(traverse_module_state->__pyx_kp_u_PrioritySemaphoreContextManager_4);
4217
4213
  Py_VISIT(traverse_module_state->__pyx_kp_u_PrioritySemaphore___getitem___li);
4218
4214
  Py_VISIT(traverse_module_state->__pyx_n_s_PrioritySemaphore___reduce_cytho);
4219
4215
  Py_VISIT(traverse_module_state->__pyx_n_s_PrioritySemaphore___setstate_cyt);
@@ -4517,8 +4513,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4517
4513
  #define __pyx_n_s_PrioritySemaphoreContextManager __pyx_mstate_global->__pyx_n_s_PrioritySemaphoreContextManager
4518
4514
  #define __pyx_n_s_PrioritySemaphoreContextManager_2 __pyx_mstate_global->__pyx_n_s_PrioritySemaphoreContextManager_2
4519
4515
  #define __pyx_n_s_PrioritySemaphoreContextManager_3 __pyx_mstate_global->__pyx_n_s_PrioritySemaphoreContextManager_3
4520
- #define __pyx_n_s_PrioritySemaphoreContextManager_4 __pyx_mstate_global->__pyx_n_s_PrioritySemaphoreContextManager_4
4521
- #define __pyx_kp_u_PrioritySemaphoreContextManager_5 __pyx_mstate_global->__pyx_kp_u_PrioritySemaphoreContextManager_5
4516
+ #define __pyx_kp_u_PrioritySemaphoreContextManager_4 __pyx_mstate_global->__pyx_kp_u_PrioritySemaphoreContextManager_4
4522
4517
  #define __pyx_kp_u_PrioritySemaphore___getitem___li __pyx_mstate_global->__pyx_kp_u_PrioritySemaphore___getitem___li
4523
4518
  #define __pyx_n_s_PrioritySemaphore___reduce_cytho __pyx_mstate_global->__pyx_n_s_PrioritySemaphore___reduce_cytho
4524
4519
  #define __pyx_n_s_PrioritySemaphore___setstate_cyt __pyx_mstate_global->__pyx_n_s_PrioritySemaphore___setstate_cyt
@@ -9857,8 +9852,8 @@ static PyObject *__pyx_gb_6a_sync_10primitives_5locks_14prio_semaphore_40_Abstra
9857
9852
  * async def __acquire(self) -> Literal[True]:
9858
9853
  * cdef object loop, fut
9859
9854
  * while self._parent._Semaphore__value <= 0: # <<<<<<<<<<<<<<
9860
- * if self.__waiters is None:
9861
- * self.__waiters = deque()
9855
+ * if self._AbstractPrioritySemaphoreContextManager__waiters is None:
9856
+ * self._AbstractPrioritySemaphoreContextManager__waiters = deque()
9862
9857
  */
9863
9858
  __Pyx_TraceLine(351,0,__PYX_ERR(0, 351, __pyx_L1_error))
9864
9859
  while (1) {
@@ -9868,8 +9863,8 @@ static PyObject *__pyx_gb_6a_sync_10primitives_5locks_14prio_semaphore_40_Abstra
9868
9863
  /* "a_sync/primitives/locks/prio_semaphore.pyx":352
9869
9864
  * cdef object loop, fut
9870
9865
  * while self._parent._Semaphore__value <= 0:
9871
- * if self.__waiters is None: # <<<<<<<<<<<<<<
9872
- * self.__waiters = deque()
9866
+ * if self._AbstractPrioritySemaphoreContextManager__waiters is None: # <<<<<<<<<<<<<<
9867
+ * self._AbstractPrioritySemaphoreContextManager__waiters = deque()
9873
9868
  * fut = (self.__loop or self._c_get_loop()).create_future()
9874
9869
  */
9875
9870
  __Pyx_TraceLine(352,0,__PYX_ERR(0, 352, __pyx_L1_error))
@@ -9881,10 +9876,10 @@ static PyObject *__pyx_gb_6a_sync_10primitives_5locks_14prio_semaphore_40_Abstra
9881
9876
 
9882
9877
  /* "a_sync/primitives/locks/prio_semaphore.pyx":353
9883
9878
  * while self._parent._Semaphore__value <= 0:
9884
- * if self.__waiters is None:
9885
- * self.__waiters = deque() # <<<<<<<<<<<<<<
9879
+ * if self._AbstractPrioritySemaphoreContextManager__waiters is None:
9880
+ * self._AbstractPrioritySemaphoreContextManager__waiters = deque() # <<<<<<<<<<<<<<
9886
9881
  * fut = (self.__loop or self._c_get_loop()).create_future()
9887
- * self.__waiters.append(fut)
9882
+ * self._AbstractPrioritySemaphoreContextManager__waiters.append(fut)
9888
9883
  */
9889
9884
  __Pyx_TraceLine(353,0,__PYX_ERR(0, 353, __pyx_L1_error))
9890
9885
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_deque); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error)
@@ -9917,17 +9912,17 @@ static PyObject *__pyx_gb_6a_sync_10primitives_5locks_14prio_semaphore_40_Abstra
9917
9912
  /* "a_sync/primitives/locks/prio_semaphore.pyx":352
9918
9913
  * cdef object loop, fut
9919
9914
  * while self._parent._Semaphore__value <= 0:
9920
- * if self.__waiters is None: # <<<<<<<<<<<<<<
9921
- * self.__waiters = deque()
9915
+ * if self._AbstractPrioritySemaphoreContextManager__waiters is None: # <<<<<<<<<<<<<<
9916
+ * self._AbstractPrioritySemaphoreContextManager__waiters = deque()
9922
9917
  * fut = (self.__loop or self._c_get_loop()).create_future()
9923
9918
  */
9924
9919
  }
9925
9920
 
9926
9921
  /* "a_sync/primitives/locks/prio_semaphore.pyx":354
9927
- * if self.__waiters is None:
9928
- * self.__waiters = deque()
9922
+ * if self._AbstractPrioritySemaphoreContextManager__waiters is None:
9923
+ * self._AbstractPrioritySemaphoreContextManager__waiters = deque()
9929
9924
  * fut = (self.__loop or self._c_get_loop()).create_future() # <<<<<<<<<<<<<<
9930
- * self.__waiters.append(fut)
9925
+ * self._AbstractPrioritySemaphoreContextManager__waiters.append(fut)
9931
9926
  * self._parent._potential_lost_waiters.append(fut)
9932
9927
  */
9933
9928
  __Pyx_TraceLine(354,0,__PYX_ERR(0, 354, __pyx_L1_error))
@@ -9979,9 +9974,9 @@ static PyObject *__pyx_gb_6a_sync_10primitives_5locks_14prio_semaphore_40_Abstra
9979
9974
  __pyx_t_2 = 0;
9980
9975
 
9981
9976
  /* "a_sync/primitives/locks/prio_semaphore.pyx":355
9982
- * self.__waiters = deque()
9977
+ * self._AbstractPrioritySemaphoreContextManager__waiters = deque()
9983
9978
  * fut = (self.__loop or self._c_get_loop()).create_future()
9984
- * self.__waiters.append(fut) # <<<<<<<<<<<<<<
9979
+ * self._AbstractPrioritySemaphoreContextManager__waiters.append(fut) # <<<<<<<<<<<<<<
9985
9980
  * self._parent._potential_lost_waiters.append(fut)
9986
9981
  * try:
9987
9982
  */
@@ -9993,7 +9988,7 @@ static PyObject *__pyx_gb_6a_sync_10primitives_5locks_14prio_semaphore_40_Abstra
9993
9988
 
9994
9989
  /* "a_sync/primitives/locks/prio_semaphore.pyx":356
9995
9990
  * fut = (self.__loop or self._c_get_loop()).create_future()
9996
- * self.__waiters.append(fut)
9991
+ * self._AbstractPrioritySemaphoreContextManager__waiters.append(fut)
9997
9992
  * self._parent._potential_lost_waiters.append(fut) # <<<<<<<<<<<<<<
9998
9993
  * try:
9999
9994
  * await fut
@@ -10006,7 +10001,7 @@ static PyObject *__pyx_gb_6a_sync_10primitives_5locks_14prio_semaphore_40_Abstra
10006
10001
  __pyx_t_6 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_self->_parent->_potential_lost_waiters, __pyx_cur_scope->__pyx_v_fut); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 356, __pyx_L1_error)
10007
10002
 
10008
10003
  /* "a_sync/primitives/locks/prio_semaphore.pyx":357
10009
- * self.__waiters.append(fut)
10004
+ * self._AbstractPrioritySemaphoreContextManager__waiters.append(fut)
10010
10005
  * self._parent._potential_lost_waiters.append(fut)
10011
10006
  * try: # <<<<<<<<<<<<<<
10012
10007
  * await fut
@@ -10064,7 +10059,7 @@ static PyObject *__pyx_gb_6a_sync_10primitives_5locks_14prio_semaphore_40_Abstra
10064
10059
  }
10065
10060
 
10066
10061
  /* "a_sync/primitives/locks/prio_semaphore.pyx":357
10067
- * self.__waiters.append(fut)
10062
+ * self._AbstractPrioritySemaphoreContextManager__waiters.append(fut)
10068
10063
  * self._parent._potential_lost_waiters.append(fut)
10069
10064
  * try: # <<<<<<<<<<<<<<
10070
10065
  * await fut
@@ -10234,7 +10229,7 @@ static PyObject *__pyx_gb_6a_sync_10primitives_5locks_14prio_semaphore_40_Abstra
10234
10229
  }
10235
10230
 
10236
10231
  /* "a_sync/primitives/locks/prio_semaphore.pyx":357
10237
- * self.__waiters.append(fut)
10232
+ * self._AbstractPrioritySemaphoreContextManager__waiters.append(fut)
10238
10233
  * self._parent._potential_lost_waiters.append(fut)
10239
10234
  * try: # <<<<<<<<<<<<<<
10240
10235
  * await fut
@@ -11085,7 +11080,7 @@ static int __pyx_pf_6a_sync_10primitives_5locks_14prio_semaphore_32_PrioritySema
11085
11080
  * def __cinit__(self):
11086
11081
  * self._priority_name = "priority" # <<<<<<<<<<<<<<
11087
11082
  * # Semaphore.__cinit__(self)
11088
- * self.__AbstractPrioritySemaphoreContextManager__waiters = deque()
11083
+ * self._AbstractPrioritySemaphoreContextManager__waiters = deque()
11089
11084
  */
11090
11085
  __Pyx_TraceLine(395,0,__PYX_ERR(0, 395, __pyx_L1_error))
11091
11086
  __Pyx_INCREF(__pyx_n_u_priority_2);
@@ -11097,7 +11092,7 @@ static int __pyx_pf_6a_sync_10primitives_5locks_14prio_semaphore_32_PrioritySema
11097
11092
  /* "a_sync/primitives/locks/prio_semaphore.pyx":397
11098
11093
  * self._priority_name = "priority"
11099
11094
  * # Semaphore.__cinit__(self)
11100
- * self.__AbstractPrioritySemaphoreContextManager__waiters = deque() # <<<<<<<<<<<<<<
11095
+ * self._AbstractPrioritySemaphoreContextManager__waiters = deque() # <<<<<<<<<<<<<<
11101
11096
  * self._decorated: Set[str] = set()
11102
11097
  *
11103
11098
  */
@@ -11126,12 +11121,12 @@ static int __pyx_pf_6a_sync_10primitives_5locks_14prio_semaphore_32_PrioritySema
11126
11121
  __Pyx_GOTREF(__pyx_t_1);
11127
11122
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11128
11123
  }
11129
- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_PrioritySemaphoreContextManager, __pyx_t_1) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
11124
+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_AbstractPrioritySemaphoreContex_3, __pyx_t_1) < 0) __PYX_ERR(0, 397, __pyx_L1_error)
11130
11125
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11131
11126
 
11132
11127
  /* "a_sync/primitives/locks/prio_semaphore.pyx":398
11133
11128
  * # Semaphore.__cinit__(self)
11134
- * self.__AbstractPrioritySemaphoreContextManager__waiters = deque()
11129
+ * self._AbstractPrioritySemaphoreContextManager__waiters = deque()
11135
11130
  * self._decorated: Set[str] = set() # <<<<<<<<<<<<<<
11136
11131
  *
11137
11132
  * def __lt__(self, _PrioritySemaphoreContextManager other) -> bool:
@@ -15076,8 +15071,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
15076
15071
  {&__pyx_n_s_PrioritySemaphoreContextManager, __pyx_k_PrioritySemaphoreContextManager, sizeof(__pyx_k_PrioritySemaphoreContextManager), 0, 0, 1, 1},
15077
15072
  {&__pyx_n_s_PrioritySemaphoreContextManager_2, __pyx_k_PrioritySemaphoreContextManager_2, sizeof(__pyx_k_PrioritySemaphoreContextManager_2), 0, 0, 1, 1},
15078
15073
  {&__pyx_n_s_PrioritySemaphoreContextManager_3, __pyx_k_PrioritySemaphoreContextManager_3, sizeof(__pyx_k_PrioritySemaphoreContextManager_3), 0, 0, 1, 1},
15079
- {&__pyx_n_s_PrioritySemaphoreContextManager_4, __pyx_k_PrioritySemaphoreContextManager_4, sizeof(__pyx_k_PrioritySemaphoreContextManager_4), 0, 0, 1, 1},
15080
- {&__pyx_kp_u_PrioritySemaphoreContextManager_5, __pyx_k_PrioritySemaphoreContextManager_5, sizeof(__pyx_k_PrioritySemaphoreContextManager_5), 0, 1, 0, 0},
15074
+ {&__pyx_kp_u_PrioritySemaphoreContextManager_4, __pyx_k_PrioritySemaphoreContextManager_4, sizeof(__pyx_k_PrioritySemaphoreContextManager_4), 0, 1, 0, 0},
15081
15075
  {&__pyx_kp_u_PrioritySemaphore___getitem___li, __pyx_k_PrioritySemaphore___getitem___li, sizeof(__pyx_k_PrioritySemaphore___getitem___li), 0, 1, 0, 0},
15082
15076
  {&__pyx_n_s_PrioritySemaphore___reduce_cytho, __pyx_k_PrioritySemaphore___reduce_cytho, sizeof(__pyx_k_PrioritySemaphore___reduce_cytho), 0, 0, 1, 1},
15083
15077
  {&__pyx_n_s_PrioritySemaphore___setstate_cyt, __pyx_k_PrioritySemaphore___setstate_cyt, sizeof(__pyx_k_PrioritySemaphore___setstate_cyt), 0, 0, 1, 1},
@@ -15715,7 +15709,7 @@ static int __Pyx_modinit_type_init_code(void) {
15715
15709
  #if !CYTHON_COMPILING_IN_LIMITED_API
15716
15710
  if (__Pyx_MergeVtables(__pyx_ptype_6a_sync_10primitives_5locks_14prio_semaphore__PrioritySemaphoreContextManager) < 0) __PYX_ERR(0, 391, __pyx_L1_error)
15717
15711
  #endif
15718
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PrioritySemaphoreContextManager_2, (PyObject *) __pyx_ptype_6a_sync_10primitives_5locks_14prio_semaphore__PrioritySemaphoreContextManager) < 0) __PYX_ERR(0, 391, __pyx_L1_error)
15712
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PrioritySemaphoreContextManager, (PyObject *) __pyx_ptype_6a_sync_10primitives_5locks_14prio_semaphore__PrioritySemaphoreContextManager) < 0) __PYX_ERR(0, 391, __pyx_L1_error)
15719
15713
  #if !CYTHON_COMPILING_IN_LIMITED_API
15720
15714
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6a_sync_10primitives_5locks_14prio_semaphore__PrioritySemaphoreContextManager) < 0) __PYX_ERR(0, 391, __pyx_L1_error)
15721
15715
  #endif
@@ -16720,7 +16714,7 @@ if (!__Pyx_RefNanny) {
16720
16714
  * def __setstate_cython__(self, __pyx_state):
16721
16715
  */
16722
16716
  __Pyx_TraceLine(1,0,__PYX_ERR(1, 1, __pyx_L1_error))
16723
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_10primitives_5locks_14prio_semaphore_32_PrioritySemaphoreContextManager_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PrioritySemaphoreContextManager_3, NULL, __pyx_n_s_a_sync_primitives_locks_prio_sem, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
16717
+ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_10primitives_5locks_14prio_semaphore_32_PrioritySemaphoreContextManager_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PrioritySemaphoreContextManager_2, NULL, __pyx_n_s_a_sync_primitives_locks_prio_sem, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
16724
16718
  __Pyx_GOTREF(__pyx_t_3);
16725
16719
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
16726
16720
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -16732,7 +16726,7 @@ if (!__Pyx_RefNanny) {
16732
16726
  * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
16733
16727
  */
16734
16728
  __Pyx_TraceLine(3,0,__PYX_ERR(1, 3, __pyx_L1_error))
16735
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_10primitives_5locks_14prio_semaphore_32_PrioritySemaphoreContextManager_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PrioritySemaphoreContextManager_4, NULL, __pyx_n_s_a_sync_primitives_locks_prio_sem, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
16729
+ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_10primitives_5locks_14prio_semaphore_32_PrioritySemaphoreContextManager_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PrioritySemaphoreContextManager_3, NULL, __pyx_n_s_a_sync_primitives_locks_prio_sem, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
16736
16730
  __Pyx_GOTREF(__pyx_t_3);
16737
16731
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
16738
16732
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -16823,7 +16817,7 @@ if (!__Pyx_RefNanny) {
16823
16817
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_AbstractPrioritySemaphoreContex_13, __pyx_kp_u_Compares_this_context_manager_wi) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16824
16818
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_AbstractPrioritySemaphoreContex_14, __pyx_kp_u_Acquires_the_semaphore_for_this) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16825
16819
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_AbstractPrioritySemaphoreContex_15, __pyx_kp_u_Releases_the_semaphore_for_this) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16826
- if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_PrioritySemaphoreContextManager_5, __pyx_kp_u_Compares_this_context_manager_wi) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16820
+ if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_PrioritySemaphoreContextManager_4, __pyx_kp_u_Compares_this_context_manager_wi) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16827
16821
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_u_PrioritySemaphore___getitem___li, __pyx_kp_u_Gets_the_context_manager_for_a_g) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16828
16822
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
16829
16823
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -349,10 +349,10 @@ cdef class _AbstractPrioritySemaphoreContextManager(Semaphore):
349
349
  async def __acquire(self) -> Literal[True]:
350
350
  cdef object loop, fut
351
351
  while self._parent._Semaphore__value <= 0:
352
- if self.__waiters is None:
353
- self.__waiters = deque()
352
+ if self._AbstractPrioritySemaphoreContextManager__waiters is None:
353
+ self._AbstractPrioritySemaphoreContextManager__waiters = deque()
354
354
  fut = (self.__loop or self._c_get_loop()).create_future()
355
- self.__waiters.append(fut)
355
+ self._AbstractPrioritySemaphoreContextManager__waiters.append(fut)
356
356
  self._parent._potential_lost_waiters.append(fut)
357
357
  try:
358
358
  await fut
@@ -394,7 +394,7 @@ cdef class _PrioritySemaphoreContextManager(_AbstractPrioritySemaphoreContextMan
394
394
  def __cinit__(self):
395
395
  self._priority_name = "priority"
396
396
  # Semaphore.__cinit__(self)
397
- self.__AbstractPrioritySemaphoreContextManager__waiters = deque()
397
+ self._AbstractPrioritySemaphoreContextManager__waiters = deque()
398
398
  self._decorated: Set[str] = set()
399
399
 
400
400
  def __lt__(self, _PrioritySemaphoreContextManager other) -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ez-a-sync
3
- Version: 0.24.11
3
+ Version: 0.24.12
4
4
  Summary: A library that makes it easy to define objects that can be used for both sync and async use cases.
5
5
  Home-page: https://github.com/BobTheBuidler/a-sync
6
6
  Author: BobTheBuidler
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