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.
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/PKG-INFO +1 -1
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/function.py +20 -9
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/method.py +22 -52
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/property.py +21 -19
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/PKG-INFO +1 -1
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.coverage +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/black.yaml +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/codeql.yaml +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/docs.yaml +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/mypy.yaml +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/pytest.yaml +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.github/workflows/release.yaml +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.gitignore +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/.sourcery.yaml +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/LICENSE.txt +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/Makefile +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/README.md +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/TODO +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/ENVIRONMENT_VARIABLES.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/_smart.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/_typing.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_descriptor.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_flags.c +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_flags.pyi +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_flags.pyx +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_helpers.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_kwargs.c +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_kwargs.pyi +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_kwargs.pyx +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/_meta.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/abstract.c +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/abstract.pyi +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/abstract.pyx +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/base.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/config.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/decorator.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/cache/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/cache/memory.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/limiter.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/manager.c +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/manager.pyi +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/manager.pyx +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/modifiers/semaphores.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/a_sync/singleton.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/aliases.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/as_completed.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/create_task.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/gather.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/asyncio/utils.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/exceptions.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/executor.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/future.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/iter.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/_debug.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/_loggable.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/counter.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/event.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/prio_semaphore.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/locks/semaphore.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/primitives/queue.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/py.typed +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/sphinx/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/sphinx/ext.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/task.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/utils/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/a_sync/utils/iterators.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/Makefile +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/alabaster.css +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/basic.css +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/custom.css +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/doctools.js +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/documentation_options.js +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/file.png +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/language_data.js +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/minus.png +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/plus.png +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/pygments.css +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/searchtools.js +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/_build/html/_static/sphinx_highlight.js +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/conf.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/index.rst +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/docs/make.bat +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/SOURCES.txt +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/dependency_links.txt +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/not-zip-safe +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/requires.txt +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/ez_a_sync.egg-info/top_level.txt +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/pyproject.yaml +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/requirements-dev.txt +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/requirements.txt +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/setup.cfg +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/setup.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/__init__.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/conftest.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/executor.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/fixtures.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_abstract.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_as_completed.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_base.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_cache.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_decorator.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_executor.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_future.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_gather.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_helpers.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_iter.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_limiter.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_meta.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_modified.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_semaphore.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_singleton.py +0 -0
- {ez_a_sync-0.23.4 → ez_a_sync-0.23.5}/tests/test_task.py +0 -0
|
@@ -808,13 +808,21 @@ class ASyncFunction(_ModifiedMixin, Generic[P, T]):
|
|
|
808
808
|
- :meth:`_await`
|
|
809
809
|
"""
|
|
810
810
|
|
|
811
|
-
|
|
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
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
coro
|
|
817
|
-
|
|
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
|
-
|
|
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
|
|
840
|
-
return
|
|
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
|
-
|
|
835
|
-
|
|
836
|
-
|
|
815
|
+
__call__ = ASyncBoundMethod.__call__
|
|
816
|
+
"""
|
|
817
|
+
Call the bound method with synchronous default behavior.
|
|
837
818
|
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
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
|
-
|
|
907
|
-
|
|
908
|
-
|
|
873
|
+
__call__ = ASyncBoundMethod.__call__
|
|
874
|
+
"""
|
|
875
|
+
Call the bound method with asynchronous default behavior.
|
|
909
876
|
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
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
|
-
|
|
217
|
-
|
|
218
|
-
owner: The owner class of the property.
|
|
214
|
+
__get__ = _ASyncPropertyDescriptorBase.__get__
|
|
215
|
+
"""Retrieves the property value, either synchronously or asynchronously.
|
|
219
216
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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
|
-
|
|
481
|
-
|
|
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
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|