hmr 0.3.2.2__py3-none-any.whl → 0.3.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.
@@ -1,13 +1,13 @@
|
|
1
|
-
hmr-0.3.
|
2
|
-
hmr-0.3.
|
3
|
-
hmr-0.3.
|
1
|
+
hmr-0.3.3.dist-info/METADATA,sha256=pBTW65YJHP8X5EMGNol-ErbXuNjtsLCS-U5JtFZag8c,258
|
2
|
+
hmr-0.3.3.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
hmr-0.3.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=7gwsIKKrjEahSz9G9oR4s1LdYXQTCIMO0k4UGXGla9Y,3714
|
7
7
|
reactivity/hmr/__init__.py,sha256=S5ZIHqCRpevdzWuhS0aCua_S8F0LkK0YNg6IgeTScFQ,177
|
8
8
|
reactivity/hmr/api.py,sha256=eqxQuqJUCbHE6vdHplWxxJt1RdItFC42neOB_exbPkE,1665
|
9
|
-
reactivity/hmr/core.py,sha256=
|
9
|
+
reactivity/hmr/core.py,sha256=c9N5eJvWnr7KQp6UtaPKqOdDkLXZJ5B3PfNrxqgort4,10203
|
10
10
|
reactivity/hmr/hooks.py,sha256=-yLr5ktiyqPb1nDbHsgv6-c_ZkziBjNqCU-0PCfXGYU,592
|
11
11
|
reactivity/hmr/utils.py,sha256=zgKjz3RhcUDYLoIqZFRVBcPtPWUJA1YphJycyrQx3tk,1464
|
12
12
|
reactivity/primitives.py,sha256=DR2waJbzhVKOioHXMliE4FIsxQUq7DZA0umPrlvchA4,4217
|
13
|
-
hmr-0.3.
|
13
|
+
hmr-0.3.3.dist-info/RECORD,,
|
reactivity/hmr/core.py
CHANGED
@@ -194,12 +194,11 @@ class BaseReloader:
|
|
194
194
|
def run_entry_file(self):
|
195
195
|
call_pre_reload_hooks()
|
196
196
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
module.load()
|
197
|
+
if not isinstance(module := sys.modules["__main__"], ReactiveModule):
|
198
|
+
namespace = {"__file__": self.entry, "__name__": "__main__"}
|
199
|
+
module = sys.modules["__main__"] = ReactiveModule(Path(self.entry), namespace, "__main__")
|
200
|
+
module.load.invalidate()
|
201
|
+
module.load()
|
203
202
|
|
204
203
|
call_post_reload_hooks()
|
205
204
|
|
@@ -224,15 +223,14 @@ class BaseReloader:
|
|
224
223
|
if path.samefile(self.entry):
|
225
224
|
self.run_entry_file.invalidate()
|
226
225
|
elif module := path2module.get(path):
|
227
|
-
|
228
|
-
module.load.invalidate()
|
226
|
+
module.load.invalidate()
|
229
227
|
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
228
|
+
with self.error_filter:
|
229
|
+
for module in path2module.values():
|
230
|
+
if module.file.samefile(self.entry):
|
231
|
+
continue
|
234
232
|
module.load()
|
235
|
-
|
233
|
+
self.run_entry_file()
|
236
234
|
|
237
235
|
|
238
236
|
class _SimpleEvent:
|
@@ -264,7 +262,8 @@ class SyncReloader(BaseReloader):
|
|
264
262
|
|
265
263
|
def keep_watching_until_interrupt(self):
|
266
264
|
with suppress(KeyboardInterrupt):
|
267
|
-
self.
|
265
|
+
with self.error_filter:
|
266
|
+
self.run_entry_file()
|
268
267
|
self.start_watching()
|
269
268
|
self.run_entry_file.dispose()
|
270
269
|
|
@@ -289,7 +288,8 @@ class AsyncReloader(BaseReloader):
|
|
289
288
|
|
290
289
|
async def keep_watching_until_interrupt(self):
|
291
290
|
with suppress(KeyboardInterrupt):
|
292
|
-
self.
|
291
|
+
with self.error_filter:
|
292
|
+
self.run_entry_file()
|
293
293
|
await self.start_watching()
|
294
294
|
self.run_entry_file.dispose()
|
295
295
|
|
@@ -305,4 +305,4 @@ def cli():
|
|
305
305
|
SyncReloader(entry).keep_watching_until_interrupt()
|
306
306
|
|
307
307
|
|
308
|
-
__version__ = "0.3.
|
308
|
+
__version__ = "0.3.3"
|
File without changes
|
File without changes
|