hmr 0.3.2__py3-none-any.whl → 0.3.2.2__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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hmr
3
- Version: 0.3.2
3
+ Version: 0.3.2.2
4
4
  Summary: Hot Module Reload for Python
5
5
  Project-URL: repository, https://github.com/promplate/pyth-on-line/tree/reactivity
6
6
  Requires-Python: >=3.12
@@ -1,13 +1,13 @@
1
- hmr-0.3.2.dist-info/METADATA,sha256=zfw1PcNenS5CDvOtkomtt3sLr8vBwrdzTqcjsYNvcFM,258
2
- hmr-0.3.2.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- hmr-0.3.2.dist-info/entry_points.txt,sha256=g_T0uJ43WgsdG14kkkdaBQuIL0HO-m1qvtjXMP6d060,59
1
+ hmr-0.3.2.2.dist-info/METADATA,sha256=lSFlyjbQ_eVRE3qJre4KkoK7QQ3SdDShRVmIlxlN95Q,260
2
+ hmr-0.3.2.2.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ hmr-0.3.2.2.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=WLF-GJitT9L8YmmWKyvfrw3WnFfH3bMSJ9MEYrXcM-E,10237
9
+ reactivity/hmr/core.py,sha256=UrA2KWk7jqh-I4O5YM2NmyJVyz4nZsOl7ZhBocgBPDg,10217
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.2.dist-info/RECORD,,
13
+ hmr-0.3.2.2.dist-info/RECORD,,
reactivity/hmr/core.py CHANGED
@@ -228,6 +228,8 @@ class BaseReloader:
228
228
  module.load.invalidate()
229
229
 
230
230
  for module in path2module.values():
231
+ if module.file.samefile(self.entry):
232
+ continue
231
233
  with self.error_filter:
232
234
  module.load()
233
235
  self.run_entry_file()
@@ -258,8 +260,6 @@ class SyncReloader(BaseReloader):
258
260
  for events in watch(self.entry, *self.includes, watch_filter=self.watch_filter, stop_event=self._stop_event):
259
261
  self.on_events(events)
260
262
 
261
- # this should only be called when the stop event is set
262
- assert self._stop_event.is_set()
263
263
  del self._stop_event
264
264
 
265
265
  def keep_watching_until_interrupt(self):
@@ -278,7 +278,6 @@ class AsyncReloader(BaseReloader):
278
278
 
279
279
  def stop_watching(self):
280
280
  self._stop_event.set()
281
- del self._stop_event
282
281
 
283
282
  async def start_watching(self):
284
283
  from watchfiles import awatch
@@ -286,6 +285,8 @@ class AsyncReloader(BaseReloader):
286
285
  async for events in awatch(self.entry, *self.includes, watch_filter=self.watch_filter, stop_event=self._stop_event):
287
286
  self.on_events(events)
288
287
 
288
+ del self._stop_event
289
+
289
290
  async def keep_watching_until_interrupt(self):
290
291
  with suppress(KeyboardInterrupt):
291
292
  self.run_entry_file()
@@ -304,4 +305,4 @@ def cli():
304
305
  SyncReloader(entry).keep_watching_until_interrupt()
305
306
 
306
307
 
307
- __version__ = "0.3.2"
308
+ __version__ = "0.3.2.2"
File without changes