flpit 0.4.2.dev3__py3-none-any.whl → 0.4.2.dev4__py3-none-any.whl

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/task.py CHANGED
@@ -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 ("see _release_context"): otherwise a finished
863
- # task, its result and every AsyncLocal value set inside it would only
864
- # be freed by the cyclic garbage collector.
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: flpit
3
- Version: 0.4.2.dev3
3
+ Version: 0.4.2.dev4
4
4
  Summary: Fluent LINQ for Python — flip your iterables
5
5
  Project-URL: Homepage, https://github.com/riemar/flpit
6
6
  Project-URL: Documentation, https://riemar.github.io/flpit/
@@ -5,7 +5,7 @@ flpit/concurrent.py,sha256=HZueI_zSTX9ozwmxwrn7_HSrxT4VL3CKoDbKQRqAKLA,32211
5
5
  flpit/csv.py,sha256=QMG8AxYR32i4I_lD1KL284OXdScN6vjjgusvnqw2q-A,25862
6
6
  flpit/flp.py,sha256=WaZnrtYdxwEOJUEBv_hXg8Uwm81h8kcH64pjDh8oJhU,1527
7
7
  flpit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- flpit/task.py,sha256=xXDJ0O3uMAs7kVTmJCNFx0XbUkuttAWg42YOEArqvCM,162832
8
+ flpit/task.py,sha256=_rjjebmW1GLHJl5MBvFMkCOZ6NjztNg0mRPXb1qSw_Q,162098
9
9
  flpit/threading.py,sha256=aCIgUpuTdWdkdGrW2N4LNlxhm-PQZk5iSWZ4gEIylQc,36581
10
10
  flpit/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  flpit/core/_grouping.py,sha256=QZNdNqXx4fcRsnun4nwkGKnst63Y10Q-rYBevof7Abw,954
@@ -20,7 +20,7 @@ flpit/json/__init__.py,sha256=7U7-KaxLbQybqmNTqDf4U54Njhac2ep5gxPEaavR7hA,4625
20
20
  flpit/json/_core.py,sha256=IhLM116xW4jI4gg3-QmRGptVr5pHRY7X7aicm8TmO3Y,13445
21
21
  flpit/json/_msgspec.py,sha256=19NB98R1tftz8LYY_2QriWo9d4Syii4f7QW_s8vWL2s,20124
22
22
  flpit/json/_native.py,sha256=E_Ro3rXTCKDpb6jicBOYU9fzOJch6ZJkLqsKJNXAsTg,39974
23
- flpit-0.4.2.dev3.dist-info/METADATA,sha256=q5PG90BsHFaAKMY2kZDwxHs0JIFQ3wv0uJ7wFh-Y7-M,19395
24
- flpit-0.4.2.dev3.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
25
- flpit-0.4.2.dev3.dist-info/licenses/LICENSE,sha256=bi5Vg_YP3Oq3jaOMQT4b7WZu0NfBcZr-nRyOExUKJrQ,1063
26
- flpit-0.4.2.dev3.dist-info/RECORD,,
23
+ flpit-0.4.2.dev4.dist-info/METADATA,sha256=ZhkCXLfzNwYXq5xFSKcsaF6a-pzzSDGKL09PyLe0lUQ,19395
24
+ flpit-0.4.2.dev4.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
25
+ flpit-0.4.2.dev4.dist-info/licenses/LICENSE,sha256=bi5Vg_YP3Oq3jaOMQT4b7WZu0NfBcZr-nRyOExUKJrQ,1063
26
+ flpit-0.4.2.dev4.dist-info/RECORD,,