hmr 0.4.0.2__py3-none-any.whl → 0.4.0.3__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.
- {hmr-0.4.0.2.dist-info → hmr-0.4.0.3.dist-info}/METADATA +1 -1
- {hmr-0.4.0.2.dist-info → hmr-0.4.0.3.dist-info}/RECORD +6 -6
- reactivity/hmr/api.py +11 -12
- reactivity/hmr/core.py +1 -1
- {hmr-0.4.0.2.dist-info → hmr-0.4.0.3.dist-info}/WHEEL +0 -0
- {hmr-0.4.0.2.dist-info → hmr-0.4.0.3.dist-info}/entry_points.txt +0 -0
@@ -1,14 +1,14 @@
|
|
1
|
-
hmr-0.4.0.
|
2
|
-
hmr-0.4.0.
|
3
|
-
hmr-0.4.0.
|
1
|
+
hmr-0.4.0.3.dist-info/METADATA,sha256=tfICX5ZT9LvEvmSkJPgagiy0bdkslqVB2VMjqwQF_r8,260
|
2
|
+
hmr-0.4.0.3.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
hmr-0.4.0.3.dist-info/entry_points.txt,sha256=g_T0uJ43WgsdG14kkkdaBQuIL0HO-m1qvtjXMP6d060,59
|
4
4
|
reactivity/__init__.py,sha256=pX-RUzkezCC1x4eOWGxNhXbwrbvBLP_3pQuZr9eZz1Y,300
|
5
5
|
reactivity/functional.py,sha256=U06vshcVhZ0sb218gcmHtEhfgTNAGtQ7zyvPz2w5qKM,1292
|
6
6
|
reactivity/helpers.py,sha256=1KCpre2HTFZrngEKkI2HwSFMkCmsUCq2aPEbp0y3kKg,5140
|
7
7
|
reactivity/hmr/__init__.py,sha256=S5ZIHqCRpevdzWuhS0aCua_S8F0LkK0YNg6IgeTScFQ,177
|
8
8
|
reactivity/hmr/__main__.py,sha256=uIcyjR5gMFIXH_3hS0B3SD00RirVf7GIct-uItx675o,64
|
9
|
-
reactivity/hmr/api.py,sha256=
|
10
|
-
reactivity/hmr/core.py,sha256=
|
9
|
+
reactivity/hmr/api.py,sha256=FiygbmlUkfwAp9GoOQrGAQHFe7zk8XzO9PnGvb8Lb1A,1844
|
10
|
+
reactivity/hmr/core.py,sha256=dkN66NzJloJJIHw8E8-pNAF88NcTwN3euZ2D9lrH8Oo,11559
|
11
11
|
reactivity/hmr/hooks.py,sha256=-yLr5ktiyqPb1nDbHsgv6-c_ZkziBjNqCU-0PCfXGYU,592
|
12
12
|
reactivity/hmr/utils.py,sha256=-PO-LMP4sc3IP-Bn_baq2w9IFWBZ3zGesgRn5wR6bS0,1555
|
13
13
|
reactivity/primitives.py,sha256=mB6cbHKDqtilOfgaEhshtRWJq9s0nPEKqRK0hfCoyFE,5671
|
14
|
-
hmr-0.4.0.
|
14
|
+
hmr-0.4.0.3.dist-info/RECORD,,
|
reactivity/hmr/api.py
CHANGED
@@ -2,19 +2,18 @@ from .core import AsyncReloader, BaseReloader, SyncReloader
|
|
2
2
|
from .hooks import call_post_reload_hooks, call_pre_reload_hooks
|
3
3
|
|
4
4
|
|
5
|
-
|
6
|
-
r.entry_module.load.dispose()
|
7
|
-
r.entry_module.load.invalidate()
|
8
|
-
|
9
|
-
|
10
|
-
class ReloadHooksMixin(BaseReloader):
|
5
|
+
class LifecycleMixin(BaseReloader):
|
11
6
|
def run_with_hooks(self):
|
12
7
|
call_pre_reload_hooks()
|
13
8
|
self.run_entry_file()
|
14
9
|
call_post_reload_hooks()
|
15
10
|
|
11
|
+
def clean_up(self):
|
12
|
+
self.entry_module.load.dispose()
|
13
|
+
self.entry_module.load.invalidate()
|
14
|
+
|
16
15
|
|
17
|
-
class SyncReloaderAPI(SyncReloader,
|
16
|
+
class SyncReloaderAPI(SyncReloader, LifecycleMixin):
|
18
17
|
def __enter__(self):
|
19
18
|
from threading import Thread
|
20
19
|
|
@@ -26,7 +25,7 @@ class SyncReloaderAPI(SyncReloader, ReloadHooksMixin):
|
|
26
25
|
def __exit__(self, *_):
|
27
26
|
self.stop_watching()
|
28
27
|
self.thread.join()
|
29
|
-
|
28
|
+
self.clean_up()
|
30
29
|
|
31
30
|
async def __aenter__(self):
|
32
31
|
from asyncio import ensure_future, to_thread
|
@@ -38,10 +37,10 @@ class SyncReloaderAPI(SyncReloader, ReloadHooksMixin):
|
|
38
37
|
async def __aexit__(self, *_):
|
39
38
|
self.stop_watching()
|
40
39
|
await self.future
|
41
|
-
|
40
|
+
self.clean_up()
|
42
41
|
|
43
42
|
|
44
|
-
class AsyncReloaderAPI(AsyncReloader,
|
43
|
+
class AsyncReloaderAPI(AsyncReloader, LifecycleMixin):
|
45
44
|
def __enter__(self):
|
46
45
|
from asyncio import run
|
47
46
|
from threading import Thread
|
@@ -54,7 +53,7 @@ class AsyncReloaderAPI(AsyncReloader, ReloadHooksMixin):
|
|
54
53
|
def __exit__(self, *_):
|
55
54
|
self.stop_watching()
|
56
55
|
self.thread.join()
|
57
|
-
|
56
|
+
self.clean_up()
|
58
57
|
|
59
58
|
async def __aenter__(self):
|
60
59
|
from asyncio import ensure_future, to_thread
|
@@ -66,4 +65,4 @@ class AsyncReloaderAPI(AsyncReloader, ReloadHooksMixin):
|
|
66
65
|
async def __aexit__(self, *_):
|
67
66
|
self.stop_watching()
|
68
67
|
await self.future
|
69
|
-
|
68
|
+
self.clean_up()
|
reactivity/hmr/core.py
CHANGED
File without changes
|
File without changes
|