hmr 0.3.2.1__tar.gz → 0.3.3__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.
- {hmr-0.3.2.1 → hmr-0.3.3}/PKG-INFO +1 -1
- {hmr-0.3.2.1 → hmr-0.3.3}/pyproject.toml +1 -1
- {hmr-0.3.2.1 → hmr-0.3.3}/reactivity/hmr/core.py +16 -14
- {hmr-0.3.2.1 → hmr-0.3.3}/reactivity/__init__.py +0 -0
- {hmr-0.3.2.1 → hmr-0.3.3}/reactivity/functional.py +0 -0
- {hmr-0.3.2.1 → hmr-0.3.3}/reactivity/helpers.py +0 -0
- {hmr-0.3.2.1 → hmr-0.3.3}/reactivity/hmr/__init__.py +0 -0
- {hmr-0.3.2.1 → hmr-0.3.3}/reactivity/hmr/api.py +0 -0
- {hmr-0.3.2.1 → hmr-0.3.3}/reactivity/hmr/hooks.py +0 -0
- {hmr-0.3.2.1 → hmr-0.3.3}/reactivity/hmr/utils.py +0 -0
- {hmr-0.3.2.1 → hmr-0.3.3}/reactivity/primitives.py +0 -0
@@ -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,13 +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
|
-
|
228
|
+
with self.error_filter:
|
229
|
+
for module in path2module.values():
|
230
|
+
if module.file.samefile(self.entry):
|
231
|
+
continue
|
232
232
|
module.load()
|
233
|
-
|
233
|
+
self.run_entry_file()
|
234
234
|
|
235
235
|
|
236
236
|
class _SimpleEvent:
|
@@ -262,7 +262,8 @@ class SyncReloader(BaseReloader):
|
|
262
262
|
|
263
263
|
def keep_watching_until_interrupt(self):
|
264
264
|
with suppress(KeyboardInterrupt):
|
265
|
-
self.
|
265
|
+
with self.error_filter:
|
266
|
+
self.run_entry_file()
|
266
267
|
self.start_watching()
|
267
268
|
self.run_entry_file.dispose()
|
268
269
|
|
@@ -287,7 +288,8 @@ class AsyncReloader(BaseReloader):
|
|
287
288
|
|
288
289
|
async def keep_watching_until_interrupt(self):
|
289
290
|
with suppress(KeyboardInterrupt):
|
290
|
-
self.
|
291
|
+
with self.error_filter:
|
292
|
+
self.run_entry_file()
|
291
293
|
await self.start_watching()
|
292
294
|
self.run_entry_file.dispose()
|
293
295
|
|
@@ -303,4 +305,4 @@ def cli():
|
|
303
305
|
SyncReloader(entry).keep_watching_until_interrupt()
|
304
306
|
|
305
307
|
|
306
|
-
__version__ = "0.3.
|
308
|
+
__version__ = "0.3.3"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|