flpit 0.4.2.dev3__tar.gz → 0.4.2.dev4__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.
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/PKG-INFO +1 -1
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/pyproject.toml +1 -1
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/task.py +4 -23
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/.gitignore +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/LICENSE +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/README.md +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flp/__init__.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/__init__.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/channels.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/concurrent.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/core/__init__.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/core/_grouping.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/core/_index.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/core/_join.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/core/_lookup.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/core/_zip.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/core/async_linq.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/core/comparers.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/core/linq.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/csv.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/flp.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/json/__init__.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/json/_core.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/json/_msgspec.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/json/_native.py +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/py.typed +0 -0
- {flpit-0.4.2.dev3 → flpit-0.4.2.dev4}/src/flpit/threading.py +0 -0
|
@@ -859,9 +859,10 @@ class Task(Generic[T], metaclass=_TaskMeta):
|
|
|
859
859
|
# Promise-style tasks never run code and need no execution context.
|
|
860
860
|
# The context holds this task as the current task, so the two form a
|
|
861
861
|
# reference cycle. Every path on which the task's code has finished
|
|
862
|
-
# drops the context
|
|
863
|
-
#
|
|
864
|
-
#
|
|
862
|
+
# drops the context: otherwise a finished task, its result and every
|
|
863
|
+
# AsyncLocal value set inside it would only be freed by the cyclic
|
|
864
|
+
# garbage collector. (A failed task still is: its exception's traceback
|
|
865
|
+
# reaches the runtime frames that ran it, as with any stored exception.)
|
|
865
866
|
self._execution_context: Context | None = (
|
|
866
867
|
copy_context() if capture_context else None
|
|
867
868
|
)
|
|
@@ -1804,9 +1805,6 @@ class Task(Generic[T], metaclass=_TaskMeta):
|
|
|
1804
1805
|
if result is not None:
|
|
1805
1806
|
self._result = result
|
|
1806
1807
|
if exception is not None:
|
|
1807
|
-
tb = exception.__traceback__
|
|
1808
|
-
if tb is not None and tb.tb_frame.f_code in _RUNTIME_CODES:
|
|
1809
|
-
exception.__traceback__ = _without_runtime_frames(tb)
|
|
1810
1808
|
self._exception = exception
|
|
1811
1809
|
# Published last: lock-free readers check the state first.
|
|
1812
1810
|
self._state = state
|
|
@@ -2111,23 +2109,6 @@ class Task(Generic[T], metaclass=_TaskMeta):
|
|
|
2111
2109
|
|
|
2112
2110
|
_current_task: AsyncLocal[Task[Any] | None] = AsyncLocal()
|
|
2113
2111
|
|
|
2114
|
-
# The runtime's own frames, which head the traceback of an exception that escapes a
|
|
2115
|
-
# task's code. They tell the user nothing, and their locals include the task itself:
|
|
2116
|
-
# kept in the stored exception, they would tie the task, its exception and everything
|
|
2117
|
-
# the traceback references into a cycle that only the cyclic GC can free.
|
|
2118
|
-
_RUNTIME_CODES: Final = frozenset({
|
|
2119
|
-
Task._start.__code__,
|
|
2120
|
-
Task._drive.__code__,
|
|
2121
|
-
Task._run_coroutine_inline.__code__,
|
|
2122
|
-
_run_with_context.__code__,
|
|
2123
|
-
})
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
def _without_runtime_frames(tb: Any) -> Any:
|
|
2127
|
-
while tb is not None and tb.tb_frame.f_code in _RUNTIME_CODES:
|
|
2128
|
-
tb = tb.tb_next
|
|
2129
|
-
return tb
|
|
2130
|
-
|
|
2131
2112
|
|
|
2132
2113
|
# ---------------------------------------------------------------------------
|
|
2133
2114
|
# Async generators (PEP 525 hooks)
|
|
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
|