ez-a-sync 0.23.4__tar.gz → 0.23.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.

Potentially problematic release.


This version of ez-a-sync might be problematic. Click here for more details.

Files changed (118) hide show
  1. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/PKG-INFO +1 -1
  2. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/function.py +20 -9
  3. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/method.py +22 -52
  4. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/property.py +21 -19
  5. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/PKG-INFO +1 -1
  6. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.coverage +0 -0
  7. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/black.yaml +0 -0
  8. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/codeql.yaml +0 -0
  9. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/docs.yaml +0 -0
  10. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/mypy.yaml +0 -0
  11. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/pytest.yaml +0 -0
  12. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/release.yaml +0 -0
  13. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.gitignore +0 -0
  14. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.sourcery.yaml +0 -0
  15. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/LICENSE.txt +0 -0
  16. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/Makefile +0 -0
  17. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/README.md +0 -0
  18. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/TODO +0 -0
  19. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/ENVIRONMENT_VARIABLES.py +0 -0
  20. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/__init__.py +0 -0
  21. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/_smart.py +0 -0
  22. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/_typing.py +0 -0
  23. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/__init__.py +0 -0
  24. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_descriptor.py +0 -0
  25. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_flags.c +0 -0
  26. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_flags.pyi +0 -0
  27. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_flags.pyx +0 -0
  28. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_helpers.py +0 -0
  29. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_kwargs.c +0 -0
  30. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_kwargs.pyi +0 -0
  31. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_kwargs.pyx +0 -0
  32. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_meta.py +0 -0
  33. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/abstract.c +0 -0
  34. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/abstract.pyi +0 -0
  35. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/abstract.pyx +0 -0
  36. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/base.py +0 -0
  37. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/config.py +0 -0
  38. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/decorator.py +0 -0
  39. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/__init__.py +0 -0
  40. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/cache/__init__.py +0 -0
  41. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/cache/memory.py +0 -0
  42. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/limiter.py +0 -0
  43. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/manager.c +0 -0
  44. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/manager.pyi +0 -0
  45. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/manager.pyx +0 -0
  46. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/semaphores.py +0 -0
  47. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/singleton.py +0 -0
  48. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/aliases.py +0 -0
  49. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/__init__.py +0 -0
  50. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/as_completed.py +0 -0
  51. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/create_task.py +0 -0
  52. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/gather.py +0 -0
  53. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/utils.py +0 -0
  54. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/exceptions.py +0 -0
  55. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/executor.py +0 -0
  56. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/future.py +0 -0
  57. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/iter.py +0 -0
  58. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/__init__.py +0 -0
  59. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/_debug.py +0 -0
  60. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/_loggable.py +0 -0
  61. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/__init__.py +0 -0
  62. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/counter.py +0 -0
  63. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/event.py +0 -0
  64. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/prio_semaphore.py +0 -0
  65. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/semaphore.py +0 -0
  66. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/queue.py +0 -0
  67. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/py.typed +0 -0
  68. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/sphinx/__init__.py +0 -0
  69. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/sphinx/ext.py +0 -0
  70. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/task.py +0 -0
  71. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/utils/__init__.py +0 -0
  72. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/utils/iterators.py +0 -0
  73. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/Makefile +0 -0
  74. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/alabaster.css +0 -0
  75. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/basic.css +0 -0
  76. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/custom.css +0 -0
  77. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/doctools.js +0 -0
  78. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/documentation_options.js +0 -0
  79. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/file.png +0 -0
  80. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/language_data.js +0 -0
  81. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/minus.png +0 -0
  82. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/plus.png +0 -0
  83. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/pygments.css +0 -0
  84. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/searchtools.js +0 -0
  85. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/sphinx_highlight.js +0 -0
  86. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/conf.py +0 -0
  87. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/index.rst +0 -0
  88. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/make.bat +0 -0
  89. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/SOURCES.txt +0 -0
  90. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/dependency_links.txt +0 -0
  91. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/not-zip-safe +0 -0
  92. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/requires.txt +0 -0
  93. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/top_level.txt +0 -0
  94. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/pyproject.yaml +0 -0
  95. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/requirements-dev.txt +0 -0
  96. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/requirements.txt +0 -0
  97. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/setup.cfg +0 -0
  98. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/setup.py +0 -0
  99. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/__init__.py +0 -0
  100. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/conftest.py +0 -0
  101. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/executor.py +0 -0
  102. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/fixtures.py +0 -0
  103. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_abstract.py +0 -0
  104. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_as_completed.py +0 -0
  105. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_base.py +0 -0
  106. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_cache.py +0 -0
  107. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_decorator.py +0 -0
  108. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_executor.py +0 -0
  109. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_future.py +0 -0
  110. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_gather.py +0 -0
  111. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_helpers.py +0 -0
  112. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_iter.py +0 -0
  113. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_limiter.py +0 -0
  114. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_meta.py +0 -0
  115. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_modified.py +0 -0
  116. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_semaphore.py +0 -0
  117. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_singleton.py +0 -0
  118. {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_task.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ez-a-sync
3
- Version: 0.23.4
3
+ Version: 0.23.5
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
@@ -808,13 +808,21 @@ class ASyncFunction(_ModifiedMixin, Generic[P, T]):
808
808
  - :meth:`_await`
809
809
  """
810
810
 
811
- @functools.wraps(self._modified_fn)
811
+ modified_fn = self._modified_fn
812
+ await_helper = self._await
813
+
814
+ @functools.wraps(modified_fn)
812
815
  def async_wrap(*args: P.args, **kwargs: P.kwargs) -> MaybeAwaitable[T]: # type: ignore [name-defined]
813
- should_await = self._run_sync(
814
- kwargs
815
- ) # Must take place before coro is created, we're popping a kwarg.
816
- coro = self._modified_fn(*args, **kwargs)
817
- return self._await(coro) if should_await else coro
816
+ # sourcery skip: assign-if-exp
817
+ # we dont want this so profiler outputs are more useful
818
+
819
+ # Must take place before coro is created, we're popping a kwarg.
820
+ should_await = self._run_sync(kwargs)
821
+ coro = modified_fn(*args, **kwargs)
822
+ if should_await:
823
+ return await_helper(coro)
824
+ else:
825
+ return coro
818
826
 
819
827
  return async_wrap
820
828
 
@@ -833,11 +841,14 @@ class ASyncFunction(_ModifiedMixin, Generic[P, T]):
833
841
  - :meth:`_asyncified`
834
842
  """
835
843
 
836
- @functools.wraps(self._modified_fn)
844
+ modified_fn = self._modified_fn
845
+ asyncified = self._asyncified
846
+
847
+ @functools.wraps(modified_fn)
837
848
  def sync_wrap(*args: P.args, **kwargs: P.kwargs) -> MaybeAwaitable[T]: # type: ignore [name-defined]
838
849
  if self._run_sync(kwargs):
839
- return self._modified_fn(*args, **kwargs)
840
- return self._asyncified(*args, **kwargs)
850
+ return modified_fn(*args, **kwargs)
851
+ return asyncified(*args, **kwargs)
841
852
 
842
853
  return sync_wrap
843
854
 
@@ -795,22 +795,6 @@ class ASyncBoundMethodSyncDefault(ASyncBoundMethod[I, P, T]):
795
795
  - :class:`ASyncMethodDescriptorSyncDefault`
796
796
  """
797
797
 
798
- def __get__(
799
- self, instance: Optional[I], owner: Type[I]
800
- ) -> ASyncFunctionSyncDefault[P, T]:
801
- """
802
- Get the bound method or descriptor.
803
-
804
- Args:
805
- instance: The instance to bind the method to, or None.
806
- owner: The owner class.
807
-
808
- Examples:
809
- >>> descriptor = ASyncMethodDescriptorSyncDefault(my_function)
810
- >>> bound_method = descriptor.__get__(instance, MyClass)
811
- """
812
- return ASyncBoundMethod.__get__(self, instance, owner)
813
-
814
798
  @overload
815
799
  def __call__(self, *args: P.args, sync: Literal[True], **kwargs: P.kwargs) -> T: ...
816
800
  @overload
@@ -827,19 +811,19 @@ class ASyncBoundMethodSyncDefault(ASyncBoundMethod[I, P, T]):
827
811
  ) -> Coroutine[Any, Any, T]: ...
828
812
  @overload
829
813
  def __call__(self, *args: P.args, **kwargs: P.kwargs) -> T: ...
830
- def __call__(self, *args: P.args, **kwargs: P.kwargs) -> T:
831
- """
832
- Call the bound method with synchronous default behavior.
833
814
 
834
- Args:
835
- *args: Positional arguments.
836
- **kwargs: Keyword arguments.
815
+ __call__ = ASyncBoundMethod.__call__
816
+ """
817
+ Call the bound method with synchronous default behavior.
837
818
 
838
- Examples:
839
- >>> bound_method = ASyncBoundMethodSyncDefault(instance, my_function, True)
840
- >>> bound_method(arg1, arg2, kwarg1=value1)
841
- """
842
- return ASyncBoundMethod.__call__(self, *args, **kwargs)
819
+ Args:
820
+ *args: Positional arguments.
821
+ **kwargs: Keyword arguments.
822
+
823
+ Examples:
824
+ >>> bound_method = ASyncBoundMethodSyncDefault(instance, my_function, True)
825
+ >>> bound_method(arg1, arg2, kwarg1=value1)
826
+ """
843
827
 
844
828
 
845
829
  class ASyncBoundMethodAsyncDefault(ASyncBoundMethod[I, P, T]):
@@ -869,20 +853,6 @@ class ASyncBoundMethodAsyncDefault(ASyncBoundMethod[I, P, T]):
869
853
  - :class:`ASyncMethodDescriptorAsyncDefault`
870
854
  """
871
855
 
872
- def __get__(self, instance: I, owner: Type[I]) -> ASyncFunctionAsyncDefault[P, T]:
873
- """
874
- Get the bound method or descriptor.
875
-
876
- Args:
877
- instance: The instance to bind the method to.
878
- owner: The owner class.
879
-
880
- Examples:
881
- >>> descriptor = ASyncMethodDescriptorAsyncDefault(my_function)
882
- >>> bound_method = descriptor.__get__(instance, MyClass)
883
- """
884
- return ASyncBoundMethod.__get__(self, instance, owner)
885
-
886
856
  @overload
887
857
  def __call__(self, *args: P.args, sync: Literal[True], **kwargs: P.kwargs) -> T: ...
888
858
  @overload
@@ -899,16 +869,16 @@ class ASyncBoundMethodAsyncDefault(ASyncBoundMethod[I, P, T]):
899
869
  ) -> Coroutine[Any, Any, T]: ...
900
870
  @overload
901
871
  def __call__(self, *args: P.args, **kwargs: P.kwargs) -> Coroutine[Any, Any, T]: ...
902
- def __call__(self, *args: P.args, **kwargs: P.kwargs) -> Coroutine[Any, Any, T]:
903
- """
904
- Call the bound method with asynchronous default behavior.
905
872
 
906
- Args:
907
- *args: Positional arguments.
908
- **kwargs: Keyword arguments.
873
+ __call__ = ASyncBoundMethod.__call__
874
+ """
875
+ Call the bound method with asynchronous default behavior.
909
876
 
910
- Examples:
911
- >>> bound_method = ASyncBoundMethodAsyncDefault(instance, my_function, True)
912
- >>> await bound_method(arg1, arg2, kwarg1=value1)
913
- """
914
- return ASyncBoundMethod.__call__(self, *args, **kwargs)
877
+ Args:
878
+ *args: Positional arguments.
879
+ **kwargs: Keyword arguments.
880
+
881
+ Examples:
882
+ >>> bound_method = ASyncBoundMethodAsyncDefault(instance, my_function, True)
883
+ >>> await bound_method(arg1, arg2, kwarg1=value1)
884
+ """
@@ -210,17 +210,17 @@ class ASyncPropertyDescriptorSyncDefault(property[I, T]):
210
210
  def __get__(self, instance: None, owner: Type[I]) -> Self: ...
211
211
  @overload
212
212
  def __get__(self, instance: I, owner: Type[I]) -> T: ...
213
- def __get__(self, instance: Optional[I], owner: Type[I]) -> Union[Self, T]:
214
- """Retrieves the property value, either synchronously or asynchronously.
215
213
 
216
- Args:
217
- instance: The instance from which the property is accessed.
218
- owner: The owner class of the property.
214
+ __get__ = _ASyncPropertyDescriptorBase.__get__
215
+ """Retrieves the property value, either synchronously or asynchronously.
219
216
 
220
- Returns:
221
- The property value, either as an awaitable or directly.
222
- """
223
- return _ASyncPropertyDescriptorBase.__get__(self, instance, owner)
217
+ Args:
218
+ instance: The instance from which the property is accessed.
219
+ owner: The owner class of the property.
220
+
221
+ Returns:
222
+ The property value, either as an awaitable or directly.
223
+ """
224
224
 
225
225
 
226
226
  @final
@@ -474,17 +474,17 @@ class ASyncCachedPropertyDescriptorSyncDefault(cached_property[I, T]):
474
474
  def __get__(self, instance: None, owner: Type[I]) -> Self: ...
475
475
  @overload
476
476
  def __get__(self, instance: I, owner: Type[I]) -> T: ...
477
- def __get__(self, instance: Optional[I], owner: Type[I]) -> Union[Self, T]:
478
- """Retrieves the cached property value, either synchronously or asynchronously.
479
477
 
480
- Args:
481
- instance: The instance from which the property is accessed.
482
- owner: The owner class of the property.
478
+ __get__ = _ASyncPropertyDescriptorBase.__get__
479
+ """Retrieves the cached property value, either synchronously or asynchronously.
483
480
 
484
- Returns:
485
- The cached property value, either as an awaitable or directly.
486
- """
487
- return _ASyncPropertyDescriptorBase.__get__(self, instance, owner)
481
+ Args:
482
+ instance: The instance from which the property is accessed.
483
+ owner: The owner class of the property.
484
+
485
+ Returns:
486
+ The cached property value, either as an awaitable or directly.
487
+ """
488
488
 
489
489
 
490
490
  @final
@@ -667,7 +667,9 @@ class HiddenMethod(ASyncBoundMethodAsyncDefault[I, Tuple[()], T]):
667
667
 
668
668
  def __await__(self) -> Generator[Any, None, T]:
669
669
  """Returns an awaitable for the method."""
670
- return self(sync=False).__await__()
670
+ # NOTE: self(sync=False).__await__() would be cleaner but requires way more compute for no real gain
671
+ logger.debug("awaiting %s", self)
672
+ return self.fn(self.__self__, sync=False).__await__()
671
673
 
672
674
 
673
675
  @final
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ez-a-sync
3
- Version: 0.23.4
3
+ Version: 0.23.5
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes