httpdbg 1.2.3__tar.gz → 1.2.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.
Files changed (92) hide show
  1. {httpdbg-1.2.3 → httpdbg-1.2.4}/PKG-INFO +1 -1
  2. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/__init__.py +1 -1
  3. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/initiator.py +8 -5
  4. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg.egg-info/PKG-INFO +1 -1
  5. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_initiator.py +12 -0
  6. {httpdbg-1.2.3 → httpdbg-1.2.4}/LICENSE +0 -0
  7. {httpdbg-1.2.3 → httpdbg-1.2.4}/README.md +0 -0
  8. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/__main__.py +0 -0
  9. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/args.py +0 -0
  10. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/env.py +0 -0
  11. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/exception.py +0 -0
  12. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/__init__.py +0 -0
  13. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/aiohttp.py +0 -0
  14. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/all.py +0 -0
  15. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/external.py +0 -0
  16. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/fastapi.py +0 -0
  17. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/flask.py +0 -0
  18. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/generic.py +0 -0
  19. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/http.py +0 -0
  20. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/httpx.py +0 -0
  21. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/pytest.py +0 -0
  22. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/requests.py +0 -0
  23. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/socket.py +0 -0
  24. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/starlette.py +0 -0
  25. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/template_sitecustomize.py +0 -0
  26. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/unittest.py +0 -0
  27. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/urllib3.py +0 -0
  28. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/utils.py +0 -0
  29. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/hooks/uvicorn.py +0 -0
  30. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/log.py +0 -0
  31. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/mode_console.py +0 -0
  32. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/mode_module.py +0 -0
  33. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/mode_script.py +0 -0
  34. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/preview.py +0 -0
  35. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/records.py +0 -0
  36. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/server.py +0 -0
  37. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/utils.py +0 -0
  38. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/__init__.py +0 -0
  39. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/api.py +0 -0
  40. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/app.py +0 -0
  41. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/api.js +0 -0
  42. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/column.css +0 -0
  43. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/configuration.css +0 -0
  44. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/configuration.js +0 -0
  45. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/detail.css +0 -0
  46. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/favicon.ico +0 -0
  47. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/filter.js +0 -0
  48. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/chevron-direction-top-outline-icon.svg +0 -0
  49. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/download-install-line-icon.svg +0 -0
  50. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/engine-gears-icon.svg +0 -0
  51. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/eye-blind-icon.svg +0 -0
  52. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/eye-icon.svg +0 -0
  53. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/files-papers-outline-icon.svg +0 -0
  54. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/filter-outline-icon.svg +0 -0
  55. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/information-mark-circle-outline-icon.svg +0 -0
  56. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/lock-line-icon.svg +0 -0
  57. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/lock-open-line-icon.svg +0 -0
  58. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/math-multiplication-icon.svg +0 -0
  59. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/push-pin-green-icon.svg +0 -0
  60. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/question-mark-round-line-icon.svg +0 -0
  61. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/recycle-bin-line-icon.svg +0 -0
  62. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/wait-sandclock-icon.svg +0 -0
  63. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/index.htm +0 -0
  64. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/main.js +0 -0
  65. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/mustache.min.js +0 -0
  66. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/render.js +0 -0
  67. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/style.css +0 -0
  68. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg/webapp/static/table.css +0 -0
  69. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg.egg-info/SOURCES.txt +0 -0
  70. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg.egg-info/dependency_links.txt +0 -0
  71. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg.egg-info/entry_points.txt +0 -0
  72. {httpdbg-1.2.3 → httpdbg-1.2.4}/httpdbg.egg-info/top_level.txt +0 -0
  73. {httpdbg-1.2.3 → httpdbg-1.2.4}/pyproject.toml +0 -0
  74. {httpdbg-1.2.3 → httpdbg-1.2.4}/setup.cfg +0 -0
  75. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_api.py +0 -0
  76. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_cli.py +0 -0
  77. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_context_manager.py +0 -0
  78. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_hook_aiohttp.py +0 -0
  79. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_hook_httpx.py +0 -0
  80. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_hook_pytest.py +0 -0
  81. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_hook_requests.py +0 -0
  82. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_hook_unittest.py +0 -0
  83. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_hook_urllib3.py +0 -0
  84. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_mode_console.py +0 -0
  85. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_mode_module_pytest.py +0 -0
  86. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_mode_script.py +0 -0
  87. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_multiprocess.py +0 -0
  88. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_preview.py +0 -0
  89. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_pyhttpdbg_server.py +0 -0
  90. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_server.py +0 -0
  91. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_server_hook_fastapi.py +0 -0
  92. {httpdbg-1.2.3 → httpdbg-1.2.4}/tests/test_server_hook_flask.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: httpdbg
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: A very simple tool to debug HTTP(S) client and server requests.
5
5
  Author-email: cle-b <cle@tictac.pm>
6
6
  License: Apache-2.0
@@ -3,6 +3,6 @@ from httpdbg.hooks.all import httprecord
3
3
  from httpdbg.records import HTTPRecords
4
4
 
5
5
 
6
- __version__ = "1.2.3"
6
+ __version__ = "1.2.4"
7
7
 
8
8
  __all__ = ["httprecord", "HTTPRecords"]
@@ -205,11 +205,14 @@ def extract_short_stack_from_file(
205
205
 
206
206
  def construct_call_str(original_method, *args, **kwargs):
207
207
 
208
- def print_v(v):
209
- if isinstance(v, str):
210
- return f'"{v}"'
211
- else:
212
- return v
208
+ def print_v(v) -> str:
209
+ try:
210
+ if isinstance(v, str):
211
+ return f'"{v}"'
212
+ else:
213
+ return str(v)
214
+ except Exception:
215
+ return "-?-" # in case __retr__ or __str__ is broken
213
216
 
214
217
  callargs = getcallargs(original_method, *args, **kwargs)
215
218
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: httpdbg
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: A very simple tool to debug HTTP(S) client and server requests.
5
5
  Author-email: cle-b <cle@tictac.pm>
6
6
  License: Apache-2.0
@@ -165,3 +165,15 @@ def test_initiator_add_package_fnc(httpbin):
165
165
  == "requests.get(url) # method"
166
166
  )
167
167
  assert records.initiators[records[4].initiator_id].label == "await client.get(url)"
168
+
169
+
170
+ def test_exception_in_initiator(httpbin):
171
+
172
+ with httprecord(initiators=["tests.initiator_pck"]) as records:
173
+ from tests.initiator_pck.repr_exception import BrokenREPR, get
174
+
175
+ br = BrokenREPR(f"{httpbin.url}/get")
176
+ get(br)
177
+
178
+ assert records.initiators[records[0].initiator_id].label == "get(br)"
179
+ assert "br=-?-" in records.initiators[records[0].initiator_id].short_stack
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
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
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