py4web-debug-tools 1.2.1__tar.gz → 1.2.2__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.2.1 → py4web_debug_tools-1.2.2}/CHANGELOG.md +6 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/PKG-INFO +1 -1
- py4web_debug_tools-1.2.2/src/py4web_debug/__about__.py +1 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/internals.py +5 -4
- py4web_debug_tools-1.2.1/src/py4web_debug/__about__.py +0 -1
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/.gitignore +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/README.md +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/pyproject.toml +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/__init__.py +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/_internals.py +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/core.py +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/debugbar.py +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/dumping.py +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/env.py +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/py.typed +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/templates/debugbar.html +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/templates/dumpdie.html +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/templates/error_default.html +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/templates/fancy_dumpdie.html +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/types.py +0 -0
- {py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/wsgi.py +0 -0
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
<!--next-version-placeholder-->
|
|
4
4
|
|
|
5
|
+
## v1.2.2 (2024-11-20)
|
|
6
|
+
|
|
7
|
+
### Fix
|
|
8
|
+
|
|
9
|
+
* Replace 'self' with 'patch_py4' for better stability ([`6987942`](https://github.com/trialandsuccess/py4web-debug-tools/commit/6987942347b993cf767166b6f3dac90e75989130))
|
|
10
|
+
|
|
5
11
|
## v1.2.1 (2024-11-20)
|
|
6
12
|
|
|
7
13
|
### Fix
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: py4web-debug-tools
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
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.2.2"
|
|
@@ -122,7 +122,8 @@ class patch_py4:
|
|
|
122
122
|
renderer: T_Renderer | None = None
|
|
123
123
|
logger: T_Logger | typing.Literal[False] | None = None
|
|
124
124
|
|
|
125
|
-
def __init__(
|
|
125
|
+
def __init__(_, renderer: T_Renderer = None, logger: T_Logger | bool | None = None):
|
|
126
|
+
# note: don't use self, use patch_py4 instead
|
|
126
127
|
if logger is True:
|
|
127
128
|
# use default logger:
|
|
128
129
|
logger = None
|
|
@@ -152,10 +153,10 @@ class patch_py4:
|
|
|
152
153
|
except Exception as e:
|
|
153
154
|
err_code = 500
|
|
154
155
|
snapshot = get_error_snapshot()
|
|
155
|
-
if
|
|
156
|
+
if patch_py4.logger is not False:
|
|
156
157
|
# False - don't log
|
|
157
158
|
# None - default logger
|
|
158
|
-
(
|
|
159
|
+
(patch_py4.logger or default_error_logger)(snapshot)
|
|
159
160
|
|
|
160
161
|
ticket_uuid = error_logger.log(request.app_name, snapshot) or "unknown"
|
|
161
162
|
response.status = err_code
|
|
@@ -182,4 +183,4 @@ class patch_py4:
|
|
|
182
183
|
# allows swapping renderer on the fly with tools.set_renderer():
|
|
183
184
|
patch_py4.renderer = renderer
|
|
184
185
|
_logger = getattr(patch_py4, "logger", None) or logger
|
|
185
|
-
patch_py4.logger = staticmethod(_logger) if _logger else
|
|
186
|
+
patch_py4.logger = staticmethod(_logger) if callable(_logger) else _logger
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.2.1"
|
|
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
|
|
File without changes
|
{py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/templates/debugbar.html
RENAMED
|
File without changes
|
{py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/templates/dumpdie.html
RENAMED
|
File without changes
|
{py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/templates/error_default.html
RENAMED
|
File without changes
|
{py4web_debug_tools-1.2.1 → py4web_debug_tools-1.2.2}/src/py4web_debug/templates/fancy_dumpdie.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|