asimpy 0.3.0__py3-none-any.whl → 0.4.1__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.
asimpy/__init__.py CHANGED
@@ -7,6 +7,6 @@ from .event import Event as Event
7
7
  from .firstof import FirstOf as FirstOf
8
8
  from .interrupt import Interrupt as Interrupt
9
9
  from .process import Process as Process
10
- from .queue import Queue as Queue, PriorityQueue as PriorityQueue
11
10
  from .resource import Resource as Resource
11
+ from .simqueue import Queue as Queue, PriorityQueue as PriorityQueue
12
12
  from .timeout import Timeout as Timeout
asimpy/_adapt.py CHANGED
@@ -2,6 +2,7 @@ import inspect
2
2
  from .event import Event
3
3
  from .process import Process
4
4
 
5
+
5
6
  def ensure_event(env, obj):
6
7
  if isinstance(obj, Event):
7
8
  return obj
@@ -14,7 +15,6 @@ def ensure_event(env, obj):
14
15
  raise TypeError(f"Expected Event or coroutine, got {type(obj)}")
15
16
 
16
17
 
17
-
18
18
  class _Runner(Process):
19
19
  def init(self, evt, obj):
20
20
  self.evt = evt
asimpy/allof.py CHANGED
@@ -8,7 +8,7 @@ from ._adapt import ensure_event
8
8
 
9
9
  class AllOf(Event):
10
10
  """Wait for all of a set of events."""
11
-
11
+
12
12
  def __init__(self, env: Environment, **events: Any):
13
13
  """
14
14
  Construct new collective wait.
@@ -34,7 +34,6 @@ class AllOf(Event):
34
34
  self._events[key] = evt
35
35
  evt._add_waiter(_AllOfWatcher(self, key))
36
36
 
37
-
38
37
  def _child_done(self, key, value):
39
38
  self._results[key] = value
40
39
  if len(self._results) == len(self._events):
asimpy/event.py CHANGED
@@ -1,9 +1,11 @@
1
1
  """Events."""
2
2
 
3
3
  from typing import TYPE_CHECKING, Any
4
+
4
5
  if TYPE_CHECKING:
5
6
  from .environment import Environment
6
7
 
8
+
7
9
  class Event:
8
10
  """Manage an event."""
9
11
 
asimpy/resource.py CHANGED
@@ -6,6 +6,7 @@ from .event import Event
6
6
  if TYPE_CHECKING:
7
7
  from .environment import Environment
8
8
 
9
+
9
10
  class Resource:
10
11
  """A shared resource with limited capacity."""
11
12
 
@@ -7,6 +7,7 @@ from .event import Event
7
7
  if TYPE_CHECKING:
8
8
  from .environment import Environment
9
9
 
10
+
10
11
  class Queue:
11
12
  """FIFO queue."""
12
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: asimpy
3
- Version: 0.3.0
3
+ Version: 0.4.1
4
4
  Summary: A simple discrete event simulator using async/await
5
5
  Author-email: Greg Wilson <gvwilson@third-bit.com>
6
6
  Maintainer-email: Greg Wilson <gvwilson@third-bit.com>
@@ -9,7 +9,7 @@ Keywords: discrete event simulation,open source
9
9
  Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: Python :: 3
12
- Requires-Python: >=3.13
12
+ Requires-Python: >=3.12
13
13
  Provides-Extra: dev
14
14
  Requires-Dist: build>=1.4.0; extra == 'dev'
15
15
  Requires-Dist: markdown-include>=0.8.1; extra == 'dev'
@@ -0,0 +1,16 @@
1
+ asimpy/__init__.py,sha256=c01u2z29W688jAccd6OKnON132IueBKn31JrcA5wNSk,490
2
+ asimpy/_adapt.py,sha256=-rUIvJMneEDdxdiMImwXYfMChsqdQwWoyHVsDCsxRKI,521
3
+ asimpy/allof.py,sha256=artqJqBHUaHh8oOk3a3tpqIlt5sJzGW9VEJ2-YkdECU,1211
4
+ asimpy/barrier.py,sha256=evubm6H_93qi9vBogqrNLg1dZosY7YdnCnJc1jNGYW4,770
5
+ asimpy/environment.py,sha256=ndjPR7W-j7FPwV7ze5Icen-xRgHKYGLNl5M2m26d4Fw,1205
6
+ asimpy/event.py,sha256=zAExS6m72SWTuk6zkx9eADCx9JzPl-vStUhAQNmux0A,1360
7
+ asimpy/firstof.py,sha256=htwskm_5lwBVD6yb7hD8jmAypeaJJk5iUqB7cKPYWyk,1356
8
+ asimpy/interrupt.py,sha256=tybPzsCeX7cpVL6psOUQf6egcAujV0vnJe1zDwkZWxo,406
9
+ asimpy/process.py,sha256=IQldzjqF5CuBUccdkM3ZV5mEtEIivZx8whGeNEr2jIc,2349
10
+ asimpy/resource.py,sha256=Ml8E71FdJ61Sy6dcoXyQkb0SXLv6xRBkI7Rkriyu438,1680
11
+ asimpy/simqueue.py,sha256=Vh70iIRNpEXt2yo7LgosTdpxt1wSjKiyr4-1If5ckEs,1515
12
+ asimpy/timeout.py,sha256=yRKJvKPITB75u25ZnE3-bk3yMC39w4bPnh9yZ_pNSes,549
13
+ asimpy-0.4.1.dist-info/METADATA,sha256=MU4Q_Q0sqjAStfb2yIsQz_QvJiRSvdCMaUPEJAOFH9I,9315
14
+ asimpy-0.4.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
15
+ asimpy-0.4.1.dist-info/licenses/LICENSE.md,sha256=IjTDUvBk8xdl_n50CG1Vtk4FYdrS-C3uEYrRWAoOQqQ,1066
16
+ asimpy-0.4.1.dist-info/RECORD,,
@@ -1,16 +0,0 @@
1
- asimpy/__init__.py,sha256=zJx5CIZDInFYyjXT99QpYQvp1x5aQluob9amrnmPJkU,487
2
- asimpy/_adapt.py,sha256=GHiDp8wmMrr3XWfGRDM1rrFJ2KR7_7F8L0xB4g6pe5U,521
3
- asimpy/allof.py,sha256=8UpFe_-hmtm2brt-SHk1RgBv55agcef5AathH11Ax2E,1216
4
- asimpy/barrier.py,sha256=evubm6H_93qi9vBogqrNLg1dZosY7YdnCnJc1jNGYW4,770
5
- asimpy/environment.py,sha256=ndjPR7W-j7FPwV7ze5Icen-xRgHKYGLNl5M2m26d4Fw,1205
6
- asimpy/event.py,sha256=ACYPPRGyaRgsSNB7KADgMu3PnQYLFLs7OOh70lHsEb4,1358
7
- asimpy/firstof.py,sha256=htwskm_5lwBVD6yb7hD8jmAypeaJJk5iUqB7cKPYWyk,1356
8
- asimpy/interrupt.py,sha256=tybPzsCeX7cpVL6psOUQf6egcAujV0vnJe1zDwkZWxo,406
9
- asimpy/process.py,sha256=IQldzjqF5CuBUccdkM3ZV5mEtEIivZx8whGeNEr2jIc,2349
10
- asimpy/queue.py,sha256=BFGDIle1olAbOSGc2umtl6DxVCl59twb4s658_RTChc,1514
11
- asimpy/resource.py,sha256=ENDY37S2vQ_3iIISq9rPCdnVP-bLW7qCX9jJZ8RlX5Q,1679
12
- asimpy/timeout.py,sha256=yRKJvKPITB75u25ZnE3-bk3yMC39w4bPnh9yZ_pNSes,549
13
- asimpy-0.3.0.dist-info/METADATA,sha256=DB3RniluV4SAMgykUwUNh7TDeZRqSXLGpcdJBr3KZAs,9315
14
- asimpy-0.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
15
- asimpy-0.3.0.dist-info/licenses/LICENSE.md,sha256=IjTDUvBk8xdl_n50CG1Vtk4FYdrS-C3uEYrRWAoOQqQ,1066
16
- asimpy-0.3.0.dist-info/RECORD,,
File without changes