py4web-debug-tools 1.1.2__tar.gz → 1.1.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.
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/CHANGELOG.md +7 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/PKG-INFO +1 -1
- py4web_debug_tools-1.1.4/src/py4web_debug/__about__.py +1 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/core.py +4 -7
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/internals.py +3 -3
- py4web_debug_tools-1.1.2/src/py4web_debug/__about__.py +0 -1
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/.gitignore +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/README.md +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/pyproject.toml +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/__init__.py +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/_internals.py +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/debugbar.py +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/dumping.py +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/env.py +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/py.typed +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/templates/debugbar.html +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/templates/dumpdie.html +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/templates/error_default.html +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/templates/fancy_dumpdie.html +0 -0
- {py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/wsgi.py +0 -0
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
<!--next-version-placeholder-->
|
|
4
4
|
|
|
5
|
+
## v1.1.4 (2023-07-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## v1.1.3 (2023-07-19)
|
|
9
|
+
### Fix
|
|
10
|
+
* Error page renderer can also be False (in addition to None or a method) ([`41d33aa`](https://github.com/trialandsuccess/py4web-debug-tools/commit/41d33aae9e307034b2818641c041f1dd6c8364fc))
|
|
11
|
+
|
|
5
12
|
## v1.1.2 (2023-07-19)
|
|
6
13
|
### Fix
|
|
7
14
|
* Wrapper can also return an HTTP response! ([`4431d80`](https://github.com/trialandsuccess/py4web-debug-tools/commit/4431d8094162dc9100aab2798571b87e5a076ed4))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: py4web-debug-tools
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.4
|
|
4
4
|
Summary: Debug Tools for py4web
|
|
5
5
|
Project-URL: Documentation, https://github.com/trialandsuccess/py4web-debug-tools#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/trialandsuccess/py4web-debug-tools/issues
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.1.4"
|
|
@@ -7,10 +7,7 @@ from py4web import DAL as P4WDAL
|
|
|
7
7
|
|
|
8
8
|
from .debugbar import DebugBar, DummyDebugBar
|
|
9
9
|
from .env import is_debug
|
|
10
|
-
from .internals import
|
|
11
|
-
|
|
12
|
-
# in: context, out: string
|
|
13
|
-
RendererMethod = typing.Callable[[ContextDict], str]
|
|
10
|
+
from .internals import T_Renderer, patch_py4
|
|
14
11
|
|
|
15
12
|
|
|
16
13
|
@dataclass
|
|
@@ -47,7 +44,7 @@ class DebugTools:
|
|
|
47
44
|
set_env_var: bool = True,
|
|
48
45
|
# error screen settings:
|
|
49
46
|
errorpage_enabled: bool = None, # value of 'enabled' is used by default
|
|
50
|
-
errorpage_renderer:
|
|
47
|
+
errorpage_renderer: T_Renderer = None,
|
|
51
48
|
# debugbar settings:
|
|
52
49
|
debugbar_enabled: bool = None, # value of 'enabled' is used by default
|
|
53
50
|
debugbar_fancy_rendering: bool = True,
|
|
@@ -95,7 +92,7 @@ class DebugTools:
|
|
|
95
92
|
else:
|
|
96
93
|
self.debug_bar = DummyDebugBar()
|
|
97
94
|
|
|
98
|
-
def set_renderer(self, cb:
|
|
95
|
+
def set_renderer(self, cb: T_Renderer) -> None:
|
|
99
96
|
# swap the errorpage_renderer
|
|
100
97
|
if not (self.enabled and self.config.errorpage.enabled):
|
|
101
98
|
# do nothing
|
|
@@ -106,4 +103,4 @@ class DebugTools:
|
|
|
106
103
|
|
|
107
104
|
tools = DebugTools()
|
|
108
105
|
|
|
109
|
-
__all__ = ["tools", "patch_py4"
|
|
106
|
+
__all__ = ["tools", "patch_py4"]
|
|
@@ -31,12 +31,12 @@ class ContextDict(typing.TypedDict):
|
|
|
31
31
|
color: typing.Optional[str]
|
|
32
32
|
traceback: str
|
|
33
33
|
err_type: str
|
|
34
|
-
exception: typing.Optional[Exception]
|
|
34
|
+
exception: typing.Optional[Exception | str]
|
|
35
35
|
|
|
36
36
|
XML: NotRequired[typing.Type[XML]]
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
T_Renderer = typing.Callable[[ContextDict], str]
|
|
39
|
+
T_Renderer = typing.Callable[[ContextDict], str] | typing.Literal[False]
|
|
40
40
|
AnyFunc = typing.Callable[..., typing.Any]
|
|
41
41
|
|
|
42
42
|
|
|
@@ -48,7 +48,7 @@ def custom_error_page(
|
|
|
48
48
|
message: str = None,
|
|
49
49
|
traceback: str = "",
|
|
50
50
|
err_type: str | typing.Type[Exception] | None = None,
|
|
51
|
-
bare_exception: Exception = None,
|
|
51
|
+
bare_exception: Exception | str = None,
|
|
52
52
|
renderer: T_Renderer = None,
|
|
53
53
|
) -> str:
|
|
54
54
|
if err_type and not isinstance(err_type, str):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.1.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/templates/debugbar.html
RENAMED
|
File without changes
|
{py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/templates/dumpdie.html
RENAMED
|
File without changes
|
{py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/templates/error_default.html
RENAMED
|
File without changes
|
{py4web_debug_tools-1.1.2 → py4web_debug_tools-1.1.4}/src/py4web_debug/templates/fancy_dumpdie.html
RENAMED
|
File without changes
|
|
File without changes
|