flpit 0.4.0.dev1__tar.gz → 0.4.0.dev3__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.0.dev1 → flpit-0.4.0.dev3}/PKG-INFO +1 -1
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/pyproject.toml +1 -1
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/core/linq.py +8 -2
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/task.py +10 -3
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/.gitignore +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/LICENSE +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/README.md +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flp/__init__.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/__init__.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/core/__init__.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/core/_grouping.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/core/_index.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/core/_join.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/core/_lookup.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/core/_zip.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/core/async_linq.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/csv.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/flp.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/json.py +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/py.typed +0 -0
- {flpit-0.4.0.dev1 → flpit-0.4.0.dev3}/src/flpit/threading.py +0 -0
|
@@ -290,8 +290,9 @@ def dotnet_context() -> AbstractContextManager[decimal.Context]:
|
|
|
290
290
|
# 1. Create and configure pure Context object
|
|
291
291
|
ctx = decimal.getcontext().copy()
|
|
292
292
|
ctx.prec = max(ctx.prec, 29)
|
|
293
|
+
ctx.Emax = ctx.prec - 1
|
|
293
294
|
ctx.traps[Overflow] = True
|
|
294
|
-
ctx.traps[Inexact] =
|
|
295
|
+
ctx.traps[Inexact] = False
|
|
295
296
|
|
|
296
297
|
return decimal.localcontext(ctx)
|
|
297
298
|
|
|
@@ -1314,12 +1315,17 @@ class FlpIt[TItem](Iterable[TItem]):
|
|
|
1314
1315
|
else:
|
|
1315
1316
|
try:
|
|
1316
1317
|
total += item
|
|
1317
|
-
except
|
|
1318
|
+
except Overflow:
|
|
1318
1319
|
raise OverflowError(
|
|
1319
1320
|
"System.OverflowException: Value was either too large or too small for a Decimal."
|
|
1320
1321
|
)
|
|
1321
1322
|
count += 1
|
|
1322
1323
|
|
|
1324
|
+
if isinstance(total, Decimal) and total.adjusted() >= decimal.getcontext().prec:
|
|
1325
|
+
raise OverflowError(
|
|
1326
|
+
"System.OverflowException: Value was either too large or too small for a Decimal."
|
|
1327
|
+
)
|
|
1328
|
+
|
|
1323
1329
|
return total, count
|
|
1324
1330
|
|
|
1325
1331
|
|
|
@@ -59,6 +59,7 @@ import socket
|
|
|
59
59
|
import threading
|
|
60
60
|
import time
|
|
61
61
|
import warnings
|
|
62
|
+
import weakref
|
|
62
63
|
from collections import deque
|
|
63
64
|
from collections.abc import AsyncGenerator, Generator
|
|
64
65
|
from dataclasses import dataclass
|
|
@@ -2411,9 +2412,15 @@ class _Runtime:
|
|
|
2411
2412
|
def __init__(self, *, min_workers: int, max_workers: int) -> None:
|
|
2412
2413
|
self._pool = _WorkerPool(self, min_workers, max_workers)
|
|
2413
2414
|
self._io = _IOReactor(self)
|
|
2414
|
-
# Pending tasks, so shutdown can cancel them.
|
|
2415
|
-
#
|
|
2416
|
-
|
|
2415
|
+
# Pending tasks, so shutdown can cancel them. The registry is weak on
|
|
2416
|
+
# purpose: a pending task that nothing references can never make
|
|
2417
|
+
# progress (anything that can resume it -- the pool queue, a running
|
|
2418
|
+
# worker, the timer, the selector, a continuation list -- holds it
|
|
2419
|
+
# strongly), so it is garbage, exactly like an abandoned
|
|
2420
|
+
# TaskCompletionSource in .NET. A strong registry would keep every
|
|
2421
|
+
# such task, and the coroutine parked on it, alive for the life of
|
|
2422
|
+
# the process.
|
|
2423
|
+
self._tasks: weakref.WeakSet[Task[Any]] = weakref.WeakSet()
|
|
2417
2424
|
self._state_lock = threading.Lock()
|
|
2418
2425
|
self._shutdown_lock = threading.Lock()
|
|
2419
2426
|
self._shutdown_requested = False
|
|
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
|