pyramid-debugtoolbar 4.10__tar.gz → 4.12__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 (203) hide show
  1. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/.github/workflows/ci-tests.yml +26 -12
  2. pyramid_debugtoolbar-4.12/.readthedocs.yaml +14 -0
  3. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/CHANGES.txt +26 -0
  4. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/CONTRIBUTORS.txt +1 -0
  5. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/MANIFEST.in +9 -2
  6. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/PKG-INFO +40 -2
  7. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/debugtoolbar_demo.egg-info/PKG-INFO +9 -1
  8. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/debugtoolbar_demo.egg-info/requires.txt +1 -0
  9. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/demo.py +3 -4
  10. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/setup.py +1 -0
  11. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/sqla.py +17 -18
  12. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/conf.py +6 -2
  13. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/setup.cfg +3 -2
  14. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/__init__.py +9 -10
  15. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/console.py +1 -0
  16. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/__init__.py +2 -2
  17. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/performance.py +4 -4
  18. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/request_vars.py +41 -46
  19. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/sqla.py +19 -17
  20. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/versions.dbtmako +2 -2
  21. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/versions.py +9 -5
  22. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/repr.py +1 -0
  23. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/tbtools.py +1 -0
  24. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/templates/history_tab.dbtmako +1 -1
  25. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/toolbar.py +7 -2
  26. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/toolbar_app.py +16 -6
  27. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/utils.py +33 -0
  28. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar.egg-info/PKG-INFO +41 -3
  29. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar.egg-info/SOURCES.txt +1 -1
  30. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar.egg-info/requires.txt +3 -1
  31. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_debug.py +1 -0
  32. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_panels/_utils.py +0 -1
  33. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_panels/test_request_vars.py +0 -1
  34. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_panels/test_sqla.py +5 -7
  35. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_toolbar.py +9 -9
  36. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tox.ini +3 -1
  37. pyramid_debugtoolbar-4.10/rtd.txt +0 -1
  38. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/.coveragerc +0 -0
  39. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/.flake8 +0 -0
  40. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/.github/dependabot.yml +0 -0
  41. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/LICENSE.txt +0 -0
  42. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/README.rst +0 -0
  43. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/RELEASING.txt +0 -0
  44. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/TODO.txt +0 -0
  45. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/contributing.md +0 -0
  46. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/.gitignore +0 -0
  47. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/README.txt +0 -0
  48. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/debugtoolbar_demo.egg-info/SOURCES.txt +0 -0
  49. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/debugtoolbar_demo.egg-info/dependency_links.txt +0 -0
  50. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/debugtoolbar_demo.egg-info/not-zip-safe +0 -0
  51. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/debugtoolbar_demo.egg-info/top_level.txt +0 -0
  52. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/setup.cfg +0 -0
  53. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/static/jquery-1.7.2.min.js +0 -0
  54. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/static/main.js +0 -0
  55. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/static/require-1.0.6.js +0 -0
  56. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/templates/ajax.mako +0 -0
  57. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/templates/error.jinja2 +0 -0
  58. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/templates/error.mako +0 -0
  59. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/templates/error.pt +0 -0
  60. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/templates/highorder.mako +0 -0
  61. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/templates/index.mako +0 -0
  62. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/templates/notfound.mako +0 -0
  63. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/templates/sqla.mako +0 -0
  64. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/demo/test.py +0 -0
  65. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/.gitignore +0 -0
  66. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/Makefile +0 -0
  67. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/api.rst +0 -0
  68. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/changes.rst +0 -0
  69. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/exc.png +0 -0
  70. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/glossary.rst +0 -0
  71. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/headers.png +0 -0
  72. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/index.rst +0 -0
  73. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/introspection.png +0 -0
  74. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/logging.png +0 -0
  75. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/performance.png +0 -0
  76. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/redirect.png +0 -0
  77. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/renderings.png +0 -0
  78. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/requestvars.png +0 -0
  79. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/routes.png +0 -0
  80. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/session.png +0 -0
  81. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/settings.png +0 -0
  82. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/sqla-explain.png +0 -0
  83. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/sqla-select.png +0 -0
  84. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/sqla.png +0 -0
  85. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/toolbar-closed.png +0 -0
  86. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/toolbar-open.png +0 -0
  87. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/toolbar_settings.png +0 -0
  88. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/tweens.png +0 -0
  89. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/docs/versions.png +0 -0
  90. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/pyproject.toml +0 -0
  91. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/pytest.ini +0 -0
  92. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/setup.py +0 -0
  93. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/headers.py +0 -0
  94. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/introspection.py +0 -0
  95. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/logger.py +0 -0
  96. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/renderings.py +0 -0
  97. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/routes.py +0 -0
  98. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/session.py +0 -0
  99. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/settings.py +0 -0
  100. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/headers.dbtmako +0 -0
  101. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/introspection.dbtmako +0 -0
  102. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/logger.dbtmako +0 -0
  103. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/performance.dbtmako +0 -0
  104. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/renderings.dbtmako +0 -0
  105. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/request_vars.dbtmako +0 -0
  106. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/routes.dbtmako +0 -0
  107. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/session.dbtmako +0 -0
  108. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/settings.dbtmako +0 -0
  109. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/sqlalchemy.dbtmako +0 -0
  110. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/sqlalchemy_explain.dbtmako +0 -0
  111. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/sqlalchemy_select.dbtmako +0 -0
  112. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/traceback.dbtmako +0 -0
  113. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/templates/tweens.dbtmako +0 -0
  114. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/traceback.py +0 -0
  115. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/panels/tweens.py +0 -0
  116. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/bootstrap/css/bootstrap.min.css +0 -0
  117. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  118. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/bootstrap/fonts/glyphicons-halflings-regular.svg +0 -0
  119. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  120. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  121. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
  122. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/bootstrap/js/bootstrap.min.js +0 -0
  123. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/debugger/debugger.css +0 -0
  124. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/debugger/debugger.js +0 -0
  125. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/debugger/img/console.png +0 -0
  126. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/debugger/img/source.png +0 -0
  127. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/eventsource/LICENSE +0 -0
  128. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/eventsource/eventsource.js +0 -0
  129. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery/jquery.min.js +0 -0
  130. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.cookie/jquery.cookie.js +0 -0
  131. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/README.rst +0 -0
  132. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/black-asc.gif +0 -0
  133. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/black-desc.gif +0 -0
  134. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/black-unsorted.gif +0 -0
  135. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/bootstrap-black-unsorted.png +0 -0
  136. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/bootstrap-white-unsorted.png +0 -0
  137. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/dragtable-handle.png +0 -0
  138. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/dragtable-handle.svg +0 -0
  139. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/dropbox-asc-hovered.png +0 -0
  140. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/dropbox-asc.png +0 -0
  141. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/dropbox-desc-hovered.png +0 -0
  142. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/dropbox-desc.png +0 -0
  143. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/first.png +0 -0
  144. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/green-asc.gif +0 -0
  145. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/green-desc.gif +0 -0
  146. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/green-header.gif +0 -0
  147. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/green-unsorted.gif +0 -0
  148. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/ice-asc.gif +0 -0
  149. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/ice-desc.gif +0 -0
  150. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/ice-unsorted.gif +0 -0
  151. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/last.png +0 -0
  152. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/loading.gif +0 -0
  153. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/metro-black-asc.png +0 -0
  154. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/metro-black-desc.png +0 -0
  155. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/metro-loading.gif +0 -0
  156. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/metro-unsorted.png +0 -0
  157. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/metro-white-asc.png +0 -0
  158. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/metro-white-desc.png +0 -0
  159. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/next.png +0 -0
  160. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/prev.png +0 -0
  161. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/white-asc.gif +0 -0
  162. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/white-desc.gif +0 -0
  163. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/images/white-unsorted.gif +0 -0
  164. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/css/theme.bootstrap.min.css +0 -0
  165. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/js/jquery.tablesorter.min.js +0 -0
  166. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/jquery.tablesorter/js/jquery.tablesorter.widgets.min.js +0 -0
  167. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/dashboard.css +0 -0
  168. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/asc.gif +0 -0
  169. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/back.png +0 -0
  170. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/back_hover.png +0 -0
  171. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/bg.gif +0 -0
  172. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/close.png +0 -0
  173. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/close_hover.png +0 -0
  174. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/cross.png +0 -0
  175. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/desc.gif +0 -0
  176. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/headerbg.png +0 -0
  177. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/indicator.png +0 -0
  178. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/less.png +0 -0
  179. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/more.png +0 -0
  180. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/panel_bg.png +0 -0
  181. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/pdtb.png +0 -0
  182. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/pyramid.png +0 -0
  183. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/tick-default.png +0 -0
  184. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/img/tick.png +0 -0
  185. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/toolbar.css +0 -0
  186. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/toolbar.js +0 -0
  187. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/static/toolbar/toolbar_button.css +0 -0
  188. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/templates/exception.dbtmako +0 -0
  189. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/templates/exception_summary.dbtmako +0 -0
  190. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/templates/global_tab.dbtmako +0 -0
  191. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/templates/redirect.dbtmako +0 -0
  192. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/templates/settings_tab.dbtmako +0 -0
  193. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar/templates/toolbar.dbtmako +0 -0
  194. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar.egg-info/dependency_links.txt +0 -0
  195. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar.egg-info/not-zip-safe +0 -0
  196. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/src/pyramid_debugtoolbar.egg-info/top_level.txt +0 -0
  197. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/__init__.py +0 -0
  198. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_auth.py +0 -0
  199. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_init.py +0 -0
  200. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_panels/__init__.py +0 -0
  201. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_panels/test_session.py +0 -0
  202. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_utils.py +0 -0
  203. {pyramid_debugtoolbar-4.10 → pyramid_debugtoolbar-4.12}/tests/test_views.py +0 -0
@@ -20,6 +20,7 @@ jobs:
20
20
  - "3.9"
21
21
  - "3.10"
22
22
  - "3.11"
23
+ - "3.12"
23
24
  - "pypy-3.8"
24
25
  os:
25
26
  - "ubuntu-latest"
@@ -42,9 +43,9 @@ jobs:
42
43
  name: "Python: ${{ matrix.py }}-${{ matrix.architecture }} on ${{ matrix.os }}"
43
44
  runs-on: ${{ matrix.os }}
44
45
  steps:
45
- - uses: actions/checkout@v3
46
+ - uses: actions/checkout@v4
46
47
  - name: Setup python
47
- uses: actions/setup-python@v4
48
+ uses: actions/setup-python@v5
48
49
  with:
49
50
  python-version: ${{ matrix.py }}
50
51
  architecture: ${{ matrix.architecture }}
@@ -55,9 +56,9 @@ jobs:
55
56
  runs-on: ubuntu-latest
56
57
  name: "Python: 3.7-x64 on ubuntu-latest with Pyramid 1.4"
57
58
  steps:
58
- - uses: actions/checkout@v3
59
+ - uses: actions/checkout@v4
59
60
  - name: Setup python
60
- uses: actions/setup-python@v4
61
+ uses: actions/setup-python@v5
61
62
  with:
62
63
  python-version: 3.7
63
64
  architecture: x64
@@ -68,22 +69,35 @@ jobs:
68
69
  runs-on: ubuntu-latest
69
70
  name: "Python: 3.7-x64 on ubuntu-latest with Pyramid 1.9"
70
71
  steps:
71
- - uses: actions/checkout@v3
72
+ - uses: actions/checkout@v4
72
73
  - name: Setup python
73
- uses: actions/setup-python@v4
74
+ uses: actions/setup-python@v5
74
75
  with:
75
76
  python-version: 3.7
76
77
  architecture: x64
77
78
  - run: pip install tox
78
79
  - name: Running tox
79
80
  run: tox -e py37-pyramid19
81
+ test-sqlalchemy14:
82
+ runs-on: ubuntu-latest
83
+ name: "Python: 3.11-x64 on ubuntu-latest with SQLAlchemy 1.4"
84
+ steps:
85
+ - uses: actions/checkout@v4
86
+ - name: Setup python
87
+ uses: actions/setup-python@v5
88
+ with:
89
+ python-version: 3.11
90
+ architecture: x64
91
+ - run: pip install tox
92
+ - name: Running tox
93
+ run: tox -e py311-sqlalchemy14
80
94
  coverage:
81
95
  runs-on: ubuntu-latest
82
96
  name: Validate coverage
83
97
  steps:
84
- - uses: actions/checkout@v3
98
+ - uses: actions/checkout@v4
85
99
  - name: Setup python
86
- uses: actions/setup-python@v4
100
+ uses: actions/setup-python@v5
87
101
  with:
88
102
  python-version: 3.7
89
103
  architecture: x64
@@ -93,9 +107,9 @@ jobs:
93
107
  runs-on: ubuntu-latest
94
108
  name: Build the documentation
95
109
  steps:
96
- - uses: actions/checkout@v3
110
+ - uses: actions/checkout@v4
97
111
  - name: Setup python
98
- uses: actions/setup-python@v4
112
+ uses: actions/setup-python@v5
99
113
  with:
100
114
  python-version: 3.8
101
115
  architecture: x64
@@ -105,9 +119,9 @@ jobs:
105
119
  runs-on: ubuntu-latest
106
120
  name: Lint the package
107
121
  steps:
108
- - uses: actions/checkout@v3
122
+ - uses: actions/checkout@v4
109
123
  - name: Setup python
110
- uses: actions/setup-python@v4
124
+ uses: actions/setup-python@v5
111
125
  with:
112
126
  python-version: 3.8
113
127
  architecture: x64
@@ -0,0 +1,14 @@
1
+ # https://docs.readthedocs.io/en/stable/config-file/v2.html
2
+ version: 2
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: '3.11'
7
+ sphinx:
8
+ configuration: docs/conf.py
9
+ python:
10
+ install:
11
+ - method: pip
12
+ path: .
13
+ extra_requirements:
14
+ - docs
@@ -1,3 +1,29 @@
1
+ 4.12 (2024-02-03)
2
+ -----------------
3
+
4
+ - Remove dependency on setuptools / pkg_resources.
5
+ See https://github.com/Pylons/pyramid_debugtoolbar/pull/390
6
+
7
+ - Avoid triggering DeprecationWarnings when tracking values for
8
+ deprecated attributes in Pyramid like ``effective_principals``.
9
+ See https://github.com/Pylons/pyramid_debugtoolbar/pull/391
10
+
11
+ 4.11 (2024-01-27)
12
+ -----------------
13
+
14
+ - Drop support for SQLAlchemy < 1.4.
15
+ See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
16
+
17
+ - Add support for Python 3.12.
18
+
19
+ - Add support for SQLAlchemy 2.x.
20
+ See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
21
+
22
+ - Fix an issue where a long-running request might not appear in the toolbar UI
23
+ without refreshing the page.
24
+
25
+ - Use ``time.monotonic()`` when computing performance intervals.
26
+
1
27
  4.10 (2022-01-02)
2
28
  -----------------
3
29
 
@@ -125,3 +125,4 @@ Contributors
125
125
  - Marcin Lulek, 2018-02-19
126
126
  - Wim De Clercq, 2018-11-23
127
127
  - Holger Peters, 2020-02-06
128
+ - Nicholas Pilon, 2024-01-05
@@ -13,8 +13,15 @@ include contributing.md
13
13
  include RELEASING.txt
14
14
  include TODO.txt
15
15
 
16
- include .coveragerc .flake8 pytest.ini setup.cfg pyproject.toml
17
- include tox.ini rtd.txt
16
+ include setup.cfg
17
+ include pyproject.toml
18
+
19
+ include .coveragerc
20
+ include .flake8
21
+ include pytest.ini
22
+ include tox.ini
23
+ include .readthedocs.yaml
24
+
18
25
  graft .github
19
26
 
20
27
  recursive-exclude * __pycache__ *.py[cod]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyramid_debugtoolbar
3
- Version: 4.10
3
+ Version: 4.12
4
4
  Summary: A package which provides an interactive HTML debugger for Pyramid application development
5
5
  Home-page: https://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest/
6
6
  Author: Chris McDonough, Michael Merickel, Casey Duncan, Blaise Laflamme
@@ -15,14 +15,26 @@ Classifier: Programming Language :: Python :: 3.8
15
15
  Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
18
19
  Classifier: Framework :: Pyramid
19
20
  Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
20
21
  Classifier: License :: Repoze Public License
21
22
  Requires-Python: >=3.7
22
23
  Description-Content-Type: text/x-rst
24
+ License-File: LICENSE.txt
25
+ Requires-Dist: pyramid>=1.4
26
+ Requires-Dist: pyramid_mako>=0.3.1
27
+ Requires-Dist: Pygments
28
+ Requires-Dist: importlib-metadata; python_version < "3.8"
23
29
  Provides-Extra: testing
30
+ Requires-Dist: WebTest; extra == "testing"
31
+ Requires-Dist: pytest; extra == "testing"
32
+ Requires-Dist: pytest-cov; extra == "testing"
33
+ Requires-Dist: sqlalchemy; extra == "testing"
34
+ Requires-Dist: webob; extra == "testing"
24
35
  Provides-Extra: docs
25
- License-File: LICENSE.txt
36
+ Requires-Dist: Sphinx>=1.7.5; extra == "docs"
37
+ Requires-Dist: pylons-sphinx-themes>=0.3; extra == "docs"
26
38
 
27
39
  pyramid_debugtoolbar
28
40
  ====================
@@ -128,6 +140,32 @@ the docs, then build them.
128
140
  $ cd docs
129
141
  $ make clean html SPHINXBUILD=../env/bin/sphinx-build
130
142
 
143
+ 4.12 (2024-02-03)
144
+ -----------------
145
+
146
+ - Remove dependency on setuptools / pkg_resources.
147
+ See https://github.com/Pylons/pyramid_debugtoolbar/pull/390
148
+
149
+ - Avoid triggering DeprecationWarnings when tracking values for
150
+ deprecated attributes in Pyramid like ``effective_principals``.
151
+ See https://github.com/Pylons/pyramid_debugtoolbar/pull/391
152
+
153
+ 4.11 (2024-01-27)
154
+ -----------------
155
+
156
+ - Drop support for SQLAlchemy < 1.4.
157
+ See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
158
+
159
+ - Add support for Python 3.12.
160
+
161
+ - Add support for SQLAlchemy 2.x.
162
+ See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
163
+
164
+ - Fix an issue where a long-running request might not appear in the toolbar UI
165
+ without refreshing the page.
166
+
167
+ - Use ``time.monotonic()`` when computing performance intervals.
168
+
131
169
  4.10 (2022-01-02)
132
170
  -----------------
133
171
 
@@ -1,5 +1,5 @@
1
1
  Metadata-Version: 2.1
2
- Name: debugtoolbar-demo
2
+ Name: debugtoolbar_demo
3
3
  Version: 0.0
4
4
  Summary: A demo application for the debug toolbar
5
5
  Home-page: http://pylonsproject.org
@@ -13,6 +13,14 @@ Classifier: Framework :: Pylons
13
13
  Classifier: Topic :: Internet :: WWW/HTTP
14
14
  Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
15
15
  Classifier: License :: Repoze Public License
16
+ Requires-Dist: pyramid>=1.1.1dev
17
+ Requires-Dist: pyramid_debugtoolbar
18
+ Requires-Dist: pyramid_mako
19
+ Requires-Dist: pyramid_jinja2
20
+ Requires-Dist: pyramid_chameleon
21
+ Requires-Dist: selenium
22
+ Requires-Dist: SQLAlchemy
23
+ Requires-Dist: waitress
16
24
 
17
25
 
18
26
 
@@ -5,3 +5,4 @@ pyramid_jinja2
5
5
  pyramid_chameleon
6
6
  selenium
7
7
  SQLAlchemy
8
+ waitress
@@ -102,7 +102,7 @@ def make_app():
102
102
  settings['mako.directories'] = __name__ + ':templates'
103
103
  settings['mako.module_directory'] = __name__ + ':mako_modules'
104
104
  settings['debugtoolbar.reload_templates'] = True
105
- settings['debugtoolbar.hosts'] = ['127.0.0.1']
105
+ settings['debugtoolbar.hosts'] = ['::1', '127.0.0.1']
106
106
  settings['debugtoolbar.intercept_redirects'] = True
107
107
  settings['debugtoolbar.exclude_prefixes'] = ['/static', '/favicon.ico']
108
108
 
@@ -139,6 +139,5 @@ def make_app():
139
139
  app = make_app()
140
140
 
141
141
  if __name__ == '__main__':
142
- from wsgiref.simple_server import make_server
143
- httpd = make_server('', 8080, app)
144
- httpd.serve_forever()
142
+ from waitress import serve
143
+ serve(app, listen='localhost:8080')
@@ -31,6 +31,7 @@ install_requires=[
31
31
  'pyramid_chameleon',
32
32
  'selenium',
33
33
  'SQLAlchemy',
34
+ 'waitress',
34
35
  ]
35
36
 
36
37
  setup(name='debugtoolbar_demo',
@@ -1,7 +1,6 @@
1
1
  from pyramid.view import view_config
2
2
 
3
- from sqlalchemy import create_engine
4
- from sqlalchemy import MetaData
3
+ from sqlalchemy import MetaData, create_engine, text
5
4
  from sqlalchemy import Table, Column, Integer, String
6
5
  from sqlalchemy.pool import StaticPool
7
6
 
@@ -14,32 +13,32 @@ users_table = Table(
14
13
  )
15
14
 
16
15
  def initialize_sql(settings):
17
- engine = create_engine('sqlite://',
18
- connect_args={'check_same_thread':False},
19
- poolclass=StaticPool,
20
- echo=True)
16
+ engine = create_engine(
17
+ 'sqlite://',
18
+ connect_args={'check_same_thread':False},
19
+ poolclass=StaticPool,
20
+ echo=True,
21
+ )
21
22
  settings['engine'] = engine
22
-
23
- try:
24
- populate_db(engine)
25
- except:
26
- pass
23
+ populate_db(engine)
27
24
 
28
25
  def populate_db(engine):
29
26
  meta.create_all(bind=engine)
30
27
 
31
- users = ('blaflamme', 'mcdonc', 'mmerickel')
32
- try:
28
+ with engine.connect() as conn:
29
+ users = ('blaflamme', 'mcdonc', 'mmerickel')
33
30
  for i, user in enumerate(users):
34
- engine.execute('insert into users (id, name) values (:id, :name)',
35
- id=i, name=user)
36
- except:
37
- pass
31
+ conn.execute(
32
+ text('insert into users (id, name) values (:id, :name)'),
33
+ {'id': i, 'name': user},
34
+ )
35
+ conn.commit()
38
36
 
39
37
  @view_config(route_name='test_sqla', renderer='__main__:templates/sqla.mako')
40
38
  def test_sqla(request):
41
39
  engine = request.registry.settings['engine']
42
- users = engine.execute('select * from users')
40
+ with engine.connect() as conn:
41
+ users = conn.execute(text('select * from users')).all()
43
42
  return {
44
43
  'title':'Test SQLAlchemy logging',
45
44
  'users':users,
@@ -17,10 +17,14 @@
17
17
  #sys.path.append(os.path.abspath('some/directory'))
18
18
 
19
19
  import datetime
20
- import pkg_resources
21
20
  import pylons_sphinx_themes
22
21
  import sys, os
23
22
 
23
+ try:
24
+ import importlib.metadata as metadata
25
+ except ImportError:
26
+ import importlib_metadata as metadata
27
+
24
28
  # General configuration
25
29
  # ---------------------
26
30
 
@@ -54,7 +58,7 @@ copyright = '2012-%s, Agendaless Consulting' % thisyear
54
58
  # other places throughout the built documents.
55
59
  #
56
60
  # The short X.Y version.
57
- version = pkg_resources.get_distribution('pyramid_debugtoolbar').version
61
+ version = metadata.distribution('pyramid_debugtoolbar').version
58
62
 
59
63
  # The full version, including alpha/beta/rc tags.
60
64
  release = version
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = pyramid_debugtoolbar
3
- version = 4.10
3
+ version = 4.12
4
4
  author = Chris McDonough, Michael Merickel, Casey Duncan, Blaise Laflamme
5
5
  author_email = pylons-discuss@googlegroups.com
6
6
  description = A package which provides an interactive HTML debugger for Pyramid application development
@@ -24,6 +24,7 @@ classifiers =
24
24
  Programming Language :: Python :: 3.9
25
25
  Programming Language :: Python :: 3.10
26
26
  Programming Language :: Python :: 3.11
27
+ Programming Language :: Python :: 3.12
27
28
  Framework :: Pyramid
28
29
  Topic :: Internet :: WWW/HTTP :: WSGI
29
30
  License :: Repoze Public License
@@ -37,6 +38,7 @@ install_requires =
37
38
  pyramid>=1.4
38
39
  pyramid_mako>=0.3.1
39
40
  Pygments
41
+ importlib-metadata; python_version<"3.8"
40
42
  include_package_data = True
41
43
  python_requires = >=3.7
42
44
 
@@ -53,7 +55,6 @@ testing =
53
55
  docs =
54
56
  Sphinx >= 1.7.5
55
57
  pylons-sphinx-themes >= 0.3
56
- setuptools
57
58
 
58
59
  [egg_info]
59
60
  tag_build =
@@ -153,20 +153,11 @@ def _apply_parent_actions(parent_registry):
153
153
 
154
154
  toolbar_registry = toolbar_app.registry
155
155
 
156
- # inject the BeforeRender subscriber after the application is created
157
- # and all other subscribers are registered in hopes that this will be
158
- # the last subscriber in the chain and will be able to see the effects
159
- # of all previous subscribers on the event
160
156
  parent_config = Configurator(registry=parent_registry, introspection=False)
161
-
162
- parent_config.add_subscriber(
163
- 'pyramid_debugtoolbar.toolbar.beforerender_subscriber',
164
- 'pyramid.events.BeforeRender',
165
- )
166
-
167
157
  actions = toolbar_registry.queryUtility(IParentActions, default=[])
168
158
  for action in actions:
169
159
  action(parent_config)
160
+ parent_config.commit()
170
161
 
171
162
  # overwrite actions after they have been applied to avoid applying them
172
163
  # twice - but leave it as a new list incase someone adds more actions later
@@ -174,6 +165,14 @@ def _apply_parent_actions(parent_registry):
174
165
  # for tests that call config.make_wsgi_app() multiple times.
175
166
  toolbar_registry.registerUtility([], IParentActions)
176
167
 
168
+ # inject the BeforeRender subscriber after the application is created
169
+ # and all other subscribers are registered in hopes that this will be
170
+ # the last subscriber in the chain and will be able to see the effects
171
+ # of all previous subscribers on the event
172
+ parent_config.add_subscriber(
173
+ 'pyramid_debugtoolbar.toolbar.beforerender_subscriber',
174
+ 'pyramid.events.BeforeRender',
175
+ )
177
176
  parent_config.commit()
178
177
 
179
178
 
@@ -7,6 +7,7 @@
7
7
  :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
8
8
  :license: BSD.
9
9
  """
10
+
10
11
  import code
11
12
  import sys
12
13
  import threading
@@ -145,9 +145,9 @@ class DebugPanel(object):
145
145
 
146
146
  def wrap_handler(self, handler):
147
147
  def wrapper(request):
148
- start_time = time.time()
148
+ start_time = time.monotonic()
149
149
  response = handler(request)
150
- end_time = time.time()
150
+ end_time = time.monotonic()
151
151
  self.data['duration'] = end_time - start_time
152
152
  return response
153
153
  return wrapper
@@ -55,24 +55,24 @@ class PerformanceDebugPanel(DebugPanel):
55
55
  if self.has_resource:
56
56
 
57
57
  def resource_timer_handler(request):
58
- _start_time = time.time()
58
+ _start_time = time.monotonic()
59
59
  self._start_rusage = resource.getrusage(resource.RUSAGE_SELF)
60
60
  try:
61
61
  result = handler(request)
62
62
  finally:
63
63
  self._end_rusage = resource.getrusage(resource.RUSAGE_SELF)
64
- self.total_time = (time.time() - _start_time) * 1000
64
+ self.total_time = (time.monotonic() - _start_time) * 1000
65
65
 
66
66
  return result
67
67
 
68
68
  return resource_timer_handler
69
69
 
70
70
  def noresource_timer_handler(request):
71
- _start_time = time.time()
71
+ _start_time = time.monotonic()
72
72
  try:
73
73
  result = handler(request)
74
74
  finally:
75
- self.total_time = (time.time() - _start_time) * 1000
75
+ self.total_time = (time.monotonic() - _start_time) * 1000
76
76
  return result
77
77
 
78
78
  return noresource_timer_handler
@@ -1,10 +1,12 @@
1
1
  from pprint import saferepr
2
2
 
3
3
  from pyramid_debugtoolbar.panels import DebugPanel
4
- from pyramid_debugtoolbar.utils import dictrepr, wrap_load
4
+ from pyramid_debugtoolbar.utils import dictrepr, patch_attrs
5
5
 
6
6
  _ = lambda x: x
7
7
 
8
+ _marker = object()
9
+
8
10
  # extractable_request_attributes allow us to programmatically pull data
9
11
  # the format is (attr, is_dict)
10
12
  extractable_request_attributes = (
@@ -44,7 +46,7 @@ lazy_request_attributes = (
44
46
  # For example `request.current_url()` is essentially `request.url`
45
47
 
46
48
 
47
- def extract_request_attributes(request):
49
+ def extract_request_attributes(request, accessed_attrs):
48
50
  """
49
51
  Extracts useful request attributes from the ``request`` object into a dict.
50
52
  Data is serialized into a dict so that the original request is no longer
@@ -52,15 +54,23 @@ def extract_request_attributes(request):
52
54
  """
53
55
  extracted_attributes = {}
54
56
  for attr_, is_dict in extractable_request_attributes:
57
+ value = getattr(request, attr_, _marker)
55
58
  # earlier versions of pyramid may not have newer attrs
56
59
  # (ie, authenticated_userid)
57
- if not hasattr(request, attr_):
60
+ if value is _marker:
61
+ continue
62
+ if is_dict and value:
63
+ value = value.__dict__
64
+ extracted_attributes[attr_] = value
65
+
66
+ for attr_, is_dict in lazy_request_attributes:
67
+ if attr_ not in accessed_attrs:
68
+ continue
69
+ value = getattr(request, attr_, _marker)
70
+ if value is _marker:
58
71
  continue
59
- value = None
60
- if is_dict and getattr(request, attr_):
61
- value = getattr(request, attr_).__dict__
62
- else:
63
- value = getattr(request, attr_)
72
+ if is_dict and value:
73
+ value = value.__dict__
64
74
  extracted_attributes[attr_] = value
65
75
  return extracted_attributes
66
76
 
@@ -80,6 +90,7 @@ class RequestVarsDebugPanel(DebugPanel):
80
90
  def __init__(self, request):
81
91
  self.request = request
82
92
  self.data = data = {}
93
+ self.accessed_attrs = set()
83
94
  attrs = request.__dict__.copy()
84
95
  # environ is displayed separately
85
96
  del attrs['environ']
@@ -87,26 +98,11 @@ class RequestVarsDebugPanel(DebugPanel):
87
98
  if 'response' in attrs:
88
99
  attrs['response'] = repr(attrs['response'])
89
100
 
90
- if 'session' in attrs:
91
- self.process_session_attr(attrs['session'])
92
- del attrs['session']
93
- else:
94
- # only process the session if it's accessed
95
- wrap_load(
96
- request,
97
- 'session',
98
- self.process_session_attr,
99
- reify=True,
100
- )
101
-
102
- for attr_, is_dict in lazy_request_attributes:
103
- wrap_load(
104
- request,
105
- attr_,
106
- lambda v, attr_=attr_, is_dict=is_dict: self.process_lazy_attr(
107
- attr_, is_dict, v
108
- ),
109
- )
101
+ install_attribute_listener(request, self.track_attribute_access)
102
+ # check if it's been potentially accessed already
103
+ for attr_, _ in lazy_request_attributes:
104
+ if attr_ in attrs:
105
+ self.accessed_attrs.add(attr_)
110
106
 
111
107
  # safely displaying the POST information is a bit tedious
112
108
  post_variables = None
@@ -145,33 +141,32 @@ class RequestVarsDebugPanel(DebugPanel):
145
141
  'environ': dictrepr(request.environ),
146
142
  'extracted_attributes': {},
147
143
  'attrs': dictrepr(attrs),
148
- 'session': None,
149
144
  }
150
145
  )
151
146
 
152
- def process_session_attr(self, session):
153
- self.data.update(
154
- {
155
- 'session': dictrepr(session),
156
- }
157
- )
158
- return session
159
-
160
- def process_lazy_attr(self, attr, is_dict, val_):
161
- if is_dict:
162
- val = val_.__dict__
163
- else:
164
- val = val_
165
- self.data['extracted_attributes'][attr] = val
166
- return val_
167
-
168
147
  def process_response(self, response):
169
- extracted_attributes = extract_request_attributes(self.request)
148
+ extracted_attributes = extract_request_attributes(
149
+ self.request, self.accessed_attrs
150
+ )
170
151
  self.data['extracted_attributes'].update(extracted_attributes)
171
152
 
172
153
  # stop hanging onto the request after the response is processed
173
154
  del self.request
174
155
 
156
+ def track_attribute_access(self, item, value):
157
+ self.accessed_attrs.add(item)
158
+
159
+
160
+ def install_attribute_listener(target, cb):
161
+ orig_getattribute = target.__class__.__getattribute__
162
+
163
+ def patched_getattribute(self, item):
164
+ value = orig_getattribute(self, item)
165
+ cb(item, value)
166
+ return value
167
+
168
+ patch_attrs(target, {'__getattribute__': patched_getattribute})
169
+
175
170
 
176
171
  def includeme(config):
177
172
  config.add_debugtoolbar_panel(RequestVarsDebugPanel)