hmr 0.3.3.2__tar.gz → 0.3.3.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hmr
3
- Version: 0.3.3.2
3
+ Version: 0.3.3.4
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
@@ -6,7 +6,7 @@ description = "Hot Module Reload for Python"
6
6
  dependencies = [
7
7
  "watchfiles>=0.21,<2 ; sys_platform != 'emscripten'",
8
8
  ]
9
- version = "0.3.3.2"
9
+ version = "0.3.3.4"
10
10
 
11
11
  [project.scripts]
12
12
  hmr = "reactivity.hmr:cli"
@@ -91,6 +91,8 @@ class ReactiveModule(ModuleType):
91
91
  try:
92
92
  return self.__namespace_proxy[name]
93
93
  except KeyError as e:
94
+ if getattr := self.__namespace_proxy.get("__getattr__"):
95
+ return getattr(name)
94
96
  raise AttributeError(*e.args) from e
95
97
 
96
98
  def __setattr__(self, name: str, value):
@@ -312,4 +314,4 @@ def cli():
312
314
  SyncReloader(entry).keep_watching_until_interrupt()
313
315
 
314
316
 
315
- __version__ = "0.3.3.2"
317
+ __version__ = "0.3.3.4"
@@ -30,9 +30,9 @@ def clear_memos():
30
30
  def cache_across_reloads[T](func: Callable[[], T]) -> Callable[[], T]:
31
31
  file = getsourcefile(func)
32
32
  assert file is not None
33
- module = ReactiveModule.instances[Path(file).resolve()]
33
+ module = ReactiveModule.instances.get(Path(file).resolve())
34
34
 
35
- if not isinstance(module, ReactiveModule):
35
+ if module is None:
36
36
  from functools import cache
37
37
 
38
38
  return cache(func) # type: ignore
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes