Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pyramid-debugtoolbar for 
openSUSE:Factory checked in at 2024-01-31 23:54:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyramid-debugtoolbar (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyramid-debugtoolbar.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyramid-debugtoolbar"

Wed Jan 31 23:54:18 2024 rev:6 rq:1142840 version:4.11

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pyramid-debugtoolbar/python-pyramid-debugtoolbar.changes
  2023-02-28 14:39:52.224461574 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pyramid-debugtoolbar.new.1815/python-pyramid-debugtoolbar.changes
        2024-01-31 23:54:32.442700844 +0100
@@ -1,0 +2,12 @@
+Tue Jan 30 18:03:35 UTC 2024 - Dirk Müller <dmuel...@suse.com>
+
+- update to 4.11:
+  * Drop support for SQLAlchemy < 1.4.
+  * Add support for Python 3.12.
+  * Add support for SQLAlchemy 2.x.
+  * Fix an issue where a long-running request might not appear in
+    the toolbar UI without refreshing the page.
+  * Use ``time.monotonic()`` when computing performance
+    intervals.
+
+-------------------------------------------------------------------

Old:
----
  pyramid_debugtoolbar-4.10.tar.gz

New:
----
  pyramid_debugtoolbar-4.11.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pyramid-debugtoolbar.spec ++++++
--- /var/tmp/diff_new_pack.KIfmR9/_old  2024-01-31 23:54:33.202728269 +0100
+++ /var/tmp/diff_new_pack.KIfmR9/_new  2024-01-31 23:54:33.202728269 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pyramid-debugtoolbar
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 # Copyright (c) 2015 LISA GmbH, Bingen, Germany.
 #
 # All modifications and additions to the file contributed by third parties
@@ -20,7 +20,7 @@
 # nothing provides python2-pyramid needed by python2-pyramid-mako
 %define skip_python2 1
 Name:           python-pyramid-debugtoolbar
-Version:        4.10
+Version:        4.11
 Release:        0
 Summary:        An interactive HTML debugger for Pyramid application 
development
 License:        BSD-4-Clause AND ZPL-2.1 AND MIT

++++++ pyramid_debugtoolbar-4.10.tar.gz -> pyramid_debugtoolbar-4.11.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/.github/workflows/ci-tests.yml 
new/pyramid_debugtoolbar-4.11/.github/workflows/ci-tests.yml
--- old/pyramid_debugtoolbar-4.10/.github/workflows/ci-tests.yml        
2023-01-03 03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/.github/workflows/ci-tests.yml        
2024-01-27 22:19:51.000000000 +0100
@@ -20,6 +20,7 @@
                     - "3.9"
                     - "3.10"
                     - "3.11"
+                    - "3.12"
                     - "pypy-3.8"
                 os:
                     - "ubuntu-latest"
@@ -42,9 +43,9 @@
         name: "Python: ${{ matrix.py }}-${{ matrix.architecture }} on ${{ 
matrix.os }}"
         runs-on: ${{ matrix.os }}
         steps:
-            - uses: actions/checkout@v3
+            - uses: actions/checkout@v4
             - name: Setup python
-              uses: actions/setup-python@v4
+              uses: actions/setup-python@v5
               with:
                   python-version: ${{ matrix.py }}
                   architecture: ${{ matrix.architecture }}
@@ -55,9 +56,9 @@
       runs-on: ubuntu-latest
       name: "Python: 3.7-x64 on ubuntu-latest with Pyramid 1.4"
       steps:
-            - uses: actions/checkout@v3
+            - uses: actions/checkout@v4
             - name: Setup python
-              uses: actions/setup-python@v4
+              uses: actions/setup-python@v5
               with:
                   python-version: 3.7
                   architecture: x64
@@ -68,22 +69,35 @@
       runs-on: ubuntu-latest
       name: "Python: 3.7-x64 on ubuntu-latest with Pyramid 1.9"
       steps:
-            - uses: actions/checkout@v3
+            - uses: actions/checkout@v4
             - name: Setup python
-              uses: actions/setup-python@v4
+              uses: actions/setup-python@v5
               with:
                   python-version: 3.7
                   architecture: x64
             - run: pip install tox
             - name: Running tox
               run: tox -e py37-pyramid19
+    test-sqlalchemy14:
+      runs-on: ubuntu-latest
+      name: "Python: 3.11-x64 on ubuntu-latest with SQLAlchemy 1.4"
+      steps:
+            - uses: actions/checkout@v4
+            - name: Setup python
+              uses: actions/setup-python@v4
+              with:
+                  python-version: 3.11
+                  architecture: x64
+            - run: pip install tox
+            - name: Running tox
+              run: tox -e py311-sqlalchemy14
     coverage:
         runs-on: ubuntu-latest
         name: Validate coverage
         steps:
-            - uses: actions/checkout@v3
+            - uses: actions/checkout@v4
             - name: Setup python
-              uses: actions/setup-python@v4
+              uses: actions/setup-python@v5
               with:
                   python-version: 3.7
                   architecture: x64
@@ -93,9 +107,9 @@
         runs-on: ubuntu-latest
         name: Build the documentation
         steps:
-            - uses: actions/checkout@v3
+            - uses: actions/checkout@v4
             - name: Setup python
-              uses: actions/setup-python@v4
+              uses: actions/setup-python@v5
               with:
                   python-version: 3.8
                   architecture: x64
@@ -105,9 +119,9 @@
         runs-on: ubuntu-latest
         name: Lint the package
         steps:
-            - uses: actions/checkout@v3
+            - uses: actions/checkout@v4
             - name: Setup python
-              uses: actions/setup-python@v4
+              uses: actions/setup-python@v5
               with:
                   python-version: 3.8
                   architecture: x64
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/.readthedocs.yaml 
new/pyramid_debugtoolbar-4.11/.readthedocs.yaml
--- old/pyramid_debugtoolbar-4.10/.readthedocs.yaml     1970-01-01 
01:00:00.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/.readthedocs.yaml     2024-01-27 
22:19:51.000000000 +0100
@@ -0,0 +1,14 @@
+# https://docs.readthedocs.io/en/stable/config-file/v2.html
+version: 2
+build:
+  os: ubuntu-22.04
+  tools:
+    python: '3.11'
+sphinx:
+  configuration: docs/conf.py
+python:
+  install:
+    - method: pip
+      path: .
+      extra_requirements:
+        - docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/CHANGES.txt 
new/pyramid_debugtoolbar-4.11/CHANGES.txt
--- old/pyramid_debugtoolbar-4.10/CHANGES.txt   2023-01-03 03:34:30.000000000 
+0100
+++ new/pyramid_debugtoolbar-4.11/CHANGES.txt   2024-01-27 23:35:19.000000000 
+0100
@@ -1,3 +1,19 @@
+4.11 (2024-01-27)
+-----------------
+
+- Drop support for SQLAlchemy < 1.4.
+  See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
+
+- Add support for Python 3.12.
+
+- Add support for SQLAlchemy 2.x.
+  See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
+
+- Fix an issue where a long-running request might not appear in the toolbar UI
+  without refreshing the page.
+
+- Use ``time.monotonic()`` when computing performance intervals.
+
 4.10 (2022-01-02)
 -----------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/CONTRIBUTORS.txt 
new/pyramid_debugtoolbar-4.11/CONTRIBUTORS.txt
--- old/pyramid_debugtoolbar-4.10/CONTRIBUTORS.txt      2020-10-22 
09:09:38.000000000 +0200
+++ new/pyramid_debugtoolbar-4.11/CONTRIBUTORS.txt      2024-01-27 
22:19:51.000000000 +0100
@@ -125,3 +125,4 @@
 - Marcin Lulek, 2018-02-19
 - Wim De Clercq, 2018-11-23
 - Holger Peters, 2020-02-06
+- Nicholas Pilon, 2024-01-05
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/MANIFEST.in 
new/pyramid_debugtoolbar-4.11/MANIFEST.in
--- old/pyramid_debugtoolbar-4.10/MANIFEST.in   2023-01-03 03:34:30.000000000 
+0100
+++ new/pyramid_debugtoolbar-4.11/MANIFEST.in   2024-01-27 22:19:51.000000000 
+0100
@@ -13,8 +13,15 @@
 include RELEASING.txt
 include TODO.txt
 
-include .coveragerc .flake8 pytest.ini setup.cfg pyproject.toml
-include tox.ini rtd.txt
+include setup.cfg
+include pyproject.toml
+
+include .coveragerc
+include .flake8
+include pytest.ini
+include tox.ini
+include .readthedocs.yaml
+
 graft .github
 
 recursive-exclude * __pycache__ *.py[cod]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/PKG-INFO 
new/pyramid_debugtoolbar-4.11/PKG-INFO
--- old/pyramid_debugtoolbar-4.10/PKG-INFO      2023-01-03 03:35:55.694579000 
+0100
+++ new/pyramid_debugtoolbar-4.11/PKG-INFO      2024-01-27 23:38:55.527248100 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pyramid_debugtoolbar
-Version: 4.10
+Version: 4.11
 Summary: A package which provides an interactive HTML debugger for Pyramid 
application development
 Home-page: 
https://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest/
 Author: Chris McDonough, Michael Merickel, Casey Duncan, Blaise Laflamme
@@ -15,14 +15,26 @@
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
 Classifier: Framework :: Pyramid
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
 Classifier: License :: Repoze Public License
 Requires-Python: >=3.7
 Description-Content-Type: text/x-rst
+License-File: LICENSE.txt
+Requires-Dist: pyramid>=1.4
+Requires-Dist: pyramid_mako>=0.3.1
+Requires-Dist: Pygments
 Provides-Extra: testing
+Requires-Dist: WebTest; extra == "testing"
+Requires-Dist: pytest; extra == "testing"
+Requires-Dist: pytest-cov; extra == "testing"
+Requires-Dist: sqlalchemy; extra == "testing"
+Requires-Dist: webob; extra == "testing"
 Provides-Extra: docs
-License-File: LICENSE.txt
+Requires-Dist: Sphinx>=1.7.5; extra == "docs"
+Requires-Dist: pylons-sphinx-themes>=0.3; extra == "docs"
+Requires-Dist: setuptools; extra == "docs"
 
 pyramid_debugtoolbar
 ====================
@@ -128,6 +140,22 @@
     $ cd docs
     $ make clean html SPHINXBUILD=../env/bin/sphinx-build
 
+4.11 (2024-01-27)
+-----------------
+
+- Drop support for SQLAlchemy < 1.4.
+  See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
+
+- Add support for Python 3.12.
+
+- Add support for SQLAlchemy 2.x.
+  See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
+
+- Fix an issue where a long-running request might not appear in the toolbar UI
+  without refreshing the page.
+
+- Use ``time.monotonic()`` when computing performance intervals.
+
 4.10 (2022-01-02)
 -----------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/demo/debugtoolbar_demo.egg-info/PKG-INFO 
new/pyramid_debugtoolbar-4.11/demo/debugtoolbar_demo.egg-info/PKG-INFO
--- old/pyramid_debugtoolbar-4.10/demo/debugtoolbar_demo.egg-info/PKG-INFO      
2022-12-31 18:00:09.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/demo/debugtoolbar_demo.egg-info/PKG-INFO      
2024-01-27 21:26:38.000000000 +0100
@@ -1,5 +1,5 @@
 Metadata-Version: 2.1
-Name: debugtoolbar-demo
+Name: debugtoolbar_demo
 Version: 0.0
 Summary: A demo application for the debug toolbar
 Home-page: http://pylonsproject.org
@@ -13,6 +13,14 @@
 Classifier: Topic :: Internet :: WWW/HTTP
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
 Classifier: License :: Repoze Public License
+Requires-Dist: pyramid>=1.1.1dev
+Requires-Dist: pyramid_debugtoolbar
+Requires-Dist: pyramid_mako
+Requires-Dist: pyramid_jinja2
+Requires-Dist: pyramid_chameleon
+Requires-Dist: selenium
+Requires-Dist: SQLAlchemy
+Requires-Dist: waitress
 
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/demo/debugtoolbar_demo.egg-info/requires.txt 
new/pyramid_debugtoolbar-4.11/demo/debugtoolbar_demo.egg-info/requires.txt
--- old/pyramid_debugtoolbar-4.10/demo/debugtoolbar_demo.egg-info/requires.txt  
2022-12-31 18:00:09.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/demo/debugtoolbar_demo.egg-info/requires.txt  
2024-01-27 21:26:38.000000000 +0100
@@ -5,3 +5,4 @@
 pyramid_chameleon
 selenium
 SQLAlchemy
+waitress
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/demo/demo.py 
new/pyramid_debugtoolbar-4.11/demo/demo.py
--- old/pyramid_debugtoolbar-4.10/demo/demo.py  2023-01-03 03:34:30.000000000 
+0100
+++ new/pyramid_debugtoolbar-4.11/demo/demo.py  2024-01-27 23:24:37.000000000 
+0100
@@ -102,7 +102,7 @@
     settings['mako.directories'] = __name__ + ':templates'
     settings['mako.module_directory'] = __name__ + ':mako_modules'
     settings['debugtoolbar.reload_templates'] = True
-    settings['debugtoolbar.hosts'] = ['127.0.0.1']
+    settings['debugtoolbar.hosts'] = ['::1', '127.0.0.1']
     settings['debugtoolbar.intercept_redirects'] = True
     settings['debugtoolbar.exclude_prefixes'] = ['/static', '/favicon.ico']
 
@@ -139,6 +139,5 @@
 app = make_app()
 
 if __name__ == '__main__':
-    from wsgiref.simple_server import make_server
-    httpd = make_server('', 8080, app)
-    httpd.serve_forever()
+    from waitress import serve
+    serve(app, listen='localhost:8080')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/demo/setup.py 
new/pyramid_debugtoolbar-4.11/demo/setup.py
--- old/pyramid_debugtoolbar-4.10/demo/setup.py 2017-04-21 09:25:40.000000000 
+0200
+++ new/pyramid_debugtoolbar-4.11/demo/setup.py 2024-01-27 22:51:13.000000000 
+0100
@@ -31,6 +31,7 @@
     'pyramid_chameleon',
     'selenium',
     'SQLAlchemy',
+    'waitress',
     ]
 
 setup(name='debugtoolbar_demo',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/demo/sqla.py 
new/pyramid_debugtoolbar-4.11/demo/sqla.py
--- old/pyramid_debugtoolbar-4.10/demo/sqla.py  2017-04-21 09:25:40.000000000 
+0200
+++ new/pyramid_debugtoolbar-4.11/demo/sqla.py  2024-01-27 22:19:51.000000000 
+0100
@@ -1,7 +1,6 @@
 from pyramid.view import view_config
 
-from sqlalchemy import create_engine
-from sqlalchemy import MetaData
+from sqlalchemy import MetaData, create_engine, text
 from sqlalchemy import Table, Column, Integer, String
 from sqlalchemy.pool import StaticPool
 
@@ -14,32 +13,32 @@
 )
 
 def initialize_sql(settings):
-    engine = create_engine('sqlite://',
-            connect_args={'check_same_thread':False},
-            poolclass=StaticPool,
-            echo=True)
+    engine = create_engine(
+        'sqlite://',
+        connect_args={'check_same_thread':False},
+        poolclass=StaticPool,
+        echo=True,
+    )
     settings['engine'] = engine
-
-    try:
-        populate_db(engine)
-    except:
-        pass
+    populate_db(engine)
 
 def populate_db(engine):
     meta.create_all(bind=engine)
 
-    users = ('blaflamme', 'mcdonc', 'mmerickel')
-    try:
+    with engine.connect() as conn:
+        users = ('blaflamme', 'mcdonc', 'mmerickel')
         for i, user in enumerate(users):
-            engine.execute('insert into users (id, name) values (:id, :name)',
-                    id=i, name=user)
-    except:
-        pass
+            conn.execute(
+                text('insert into users (id, name) values (:id, :name)'),
+                {'id': i, 'name': user},
+            )
+        conn.commit()
 
 @view_config(route_name='test_sqla', renderer='__main__:templates/sqla.mako')
 def test_sqla(request):
     engine = request.registry.settings['engine']
-    users = engine.execute('select * from users')
+    with engine.connect() as conn:
+        users = conn.execute(text('select * from users')).all()
     return {
         'title':'Test SQLAlchemy logging',
         'users':users,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/rtd.txt 
new/pyramid_debugtoolbar-4.11/rtd.txt
--- old/pyramid_debugtoolbar-4.10/rtd.txt       2017-04-21 09:22:55.000000000 
+0200
+++ new/pyramid_debugtoolbar-4.11/rtd.txt       1970-01-01 01:00:00.000000000 
+0100
@@ -1 +0,0 @@
--e .[docs]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/setup.cfg 
new/pyramid_debugtoolbar-4.11/setup.cfg
--- old/pyramid_debugtoolbar-4.10/setup.cfg     2023-01-03 03:35:55.695277500 
+0100
+++ new/pyramid_debugtoolbar-4.11/setup.cfg     2024-01-27 23:38:55.528408500 
+0100
@@ -1,6 +1,6 @@
 [metadata]
 name = pyramid_debugtoolbar
-version = 4.10
+version = 4.11
 author = Chris McDonough, Michael Merickel, Casey Duncan, Blaise Laflamme
 author_email = pylons-disc...@googlegroups.com
 description = A package which provides an interactive HTML debugger for 
Pyramid application development
@@ -24,6 +24,7 @@
        Programming Language :: Python :: 3.9
        Programming Language :: Python :: 3.10
        Programming Language :: Python :: 3.11
+       Programming Language :: Python :: 3.12
        Framework :: Pyramid
        Topic :: Internet :: WWW/HTTP :: WSGI
        License :: Repoze Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/console.py 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/console.py
--- old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/console.py   
2023-01-03 03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/console.py   
2024-01-27 22:19:51.000000000 +0100
@@ -7,6 +7,7 @@
     :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
     :license: BSD.
 """
+
 import code
 import sys
 import threading
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/panels/__init__.py 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/panels/__init__.py
--- old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/panels/__init__.py   
2020-10-22 09:09:39.000000000 +0200
+++ new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/panels/__init__.py   
2024-01-27 23:31:27.000000000 +0100
@@ -145,9 +145,9 @@
 
            def wrap_handler(self, handler):
                def wrapper(request):
-                   start_time = time.time()
+                   start_time = time.monotonic()
                    response = handler(request)
-                   end_time = time.time()
+                   end_time = time.monotonic()
                    self.data['duration'] = end_time - start_time
                    return response
                return wrapper
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/panels/performance.py 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/panels/performance.py
--- 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/panels/performance.py    
    2020-10-22 09:09:39.000000000 +0200
+++ 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/panels/performance.py    
    2024-01-27 23:31:57.000000000 +0100
@@ -55,24 +55,24 @@
         if self.has_resource:
 
             def resource_timer_handler(request):
-                _start_time = time.time()
+                _start_time = time.monotonic()
                 self._start_rusage = resource.getrusage(resource.RUSAGE_SELF)
                 try:
                     result = handler(request)
                 finally:
                     self._end_rusage = resource.getrusage(resource.RUSAGE_SELF)
-                    self.total_time = (time.time() - _start_time) * 1000
+                    self.total_time = (time.monotonic() - _start_time) * 1000
 
                 return result
 
             return resource_timer_handler
 
         def noresource_timer_handler(request):
-            _start_time = time.time()
+            _start_time = time.monotonic()
             try:
                 result = handler(request)
             finally:
-                self.total_time = (time.time() - _start_time) * 1000
+                self.total_time = (time.monotonic() - _start_time) * 1000
             return result
 
         return noresource_timer_handler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/panels/sqla.py 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/panels/sqla.py
--- old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/panels/sqla.py       
2023-01-03 03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/panels/sqla.py       
2024-01-27 23:32:20.000000000 +0100
@@ -18,11 +18,11 @@
 
     @event.listens_for(Engine, "before_cursor_execute")
     def _before_cursor_execute(conn, cursor, stmt, params, context, execmany):
-        conn.pdtb_start_timer = time.time()
+        conn.pdtb_start_timer = time.monotonic()
 
     @event.listens_for(Engine, "after_cursor_execute")
     def _after_cursor_execute(conn, cursor, stmt, params, context, execmany):
-        stop_timer = time.time()
+        stop_timer = time.monotonic()
         request = get_current_request()
         if request is not None and hasattr(request, 'pdtb_sqla_queries'):
             with lock:
@@ -229,14 +229,15 @@
 
         engines = self.request.registry.parent_registry.pdtb_sqla_engines
         engine = engines[int(engine_id)]()
-        result = engine.execute(stmt, params)
+        with engine.connect() as conn:
+            result = conn.exec_driver_sql(stmt, params)
 
-        return {
-            'result': result.fetchall(),
-            'headers': result.keys(),
-            'sql': format_sql(stmt),
-            'duration': float(query_dict['duration']),
-        }
+            return {
+                'result': result.all(),
+                'headers': result.keys(),
+                'sql': format_sql(stmt),
+                'duration': float(query_dict['duration']),
+            }
 
     @view_config(
         route_name='debugtoolbar.sql_explain',
@@ -261,15 +262,16 @@
         else:
             query = 'EXPLAIN %s' % stmt
 
-        result = engine.execute(query, params)
+        with engine.connect() as conn:
+            result = conn.exec_driver_sql(query, params)
 
-        return {
-            'result': result.fetchall(),
-            'headers': result.keys(),
-            'sql': format_sql(stmt),
-            'str': str,
-            'duration': float(query_dict['duration']),
-        }
+            return {
+                'result': result.all(),
+                'headers': result.keys(),
+                'sql': format_sql(stmt),
+                'str': str,
+                'duration': float(query_dict['duration']),
+            }
 
 
 def includeme(config):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/repr.py 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/repr.py
--- old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/repr.py      
2023-01-03 03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/repr.py      
2024-01-27 22:19:51.000000000 +0100
@@ -12,6 +12,7 @@
     :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
     :license: BSD.
 """
+
 import re
 import sys
 from traceback import format_exception_only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/tbtools.py 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/tbtools.py
--- old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/tbtools.py   
2023-01-03 03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/tbtools.py   
2024-01-27 22:19:51.000000000 +0100
@@ -7,6 +7,7 @@
     :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
     :license: BSD.
 """
+
 import codecs
 import inspect
 import os
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/templates/history_tab.dbtmako
 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/templates/history_tab.dbtmako
--- 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/templates/history_tab.dbtmako
        2017-07-15 03:06:55.000000000 +0200
+++ 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/templates/history_tab.dbtmako
        2024-01-27 22:57:33.000000000 +0100
@@ -17,7 +17,7 @@
           <li class="pDebugButton">DEBUG</li>
           % endif
           % if request_id and not panels:
-          <p>Warning: The request has been lost due to an application 
reset.</p>
+          <p>Warning: The request has been lost either due to an application 
reset or it is older than the max_request_history setting.</p>
           % endif
           % for panel in panels:
           <% _css_class = 'disabled' if not panel.has_content else '' %>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/toolbar.py 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/toolbar.py
--- old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/toolbar.py   
2023-01-03 03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/toolbar.py   
2024-01-27 23:31:00.000000000 +0100
@@ -4,6 +4,7 @@
 from pyramid.interfaces import Interface
 from pyramid.threadlocal import get_current_request
 import sys
+import time
 from urllib.parse import unquote
 import warnings
 
@@ -60,6 +61,7 @@
         self.status_int = 200
         self.default_active_panels = default_active_panels
         self.visible = False
+        self.visible_at = 0
 
         # Panels can be be activated (more features) (e.g. Performance panel)
         # toolbar.js controls this cookie with the following concepts:
@@ -107,6 +109,7 @@
             panel.process_response(response)
 
         self.response = response
+        self.visible_at = time.monotonic()
         self.visible = True
 
     def inject(self, request, response):
@@ -224,7 +227,8 @@
                 'this message, and you think it is incorrect, please open an '
                 'issue with more details including the proxy you\'re using and 
'
                 'the format of the REMOTE_ADDR at '
-                'https://github.com/Pylons/pyramid_debugtoolbar/issues/'
+                'https://github.com/Pylons/pyramid_debugtoolbar/issues/',
+                stacklevel=1,
             )
 
         if (
@@ -241,7 +245,8 @@
                 'pyramid_debugtoolbar has detected that the application is '
                 'being served by a forking / multiprocess web server. The '
                 'toolbar relies on global state to work and is not compatible '
-                'with this environment. The toolbar will be disabled.'
+                'with this environment. The toolbar will be disabled.',
+                stacklevel=1,
             )
             return handler(request)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/toolbar_app.py 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/toolbar_app.py
--- old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar/toolbar_app.py       
2023-01-03 03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar/toolbar_app.py       
2024-01-27 23:34:21.000000000 +0100
@@ -195,26 +195,36 @@
     response.text = U_BLANK
 
     active_request_id = request.GET.get('request_id')
-    client_last_request_id = request.headers.get('Last-Event-Id', '0')
+    client_last_visible_at = request.headers.get('Last-Event-Id', '0')
+    try:
+        client_last_visible_at = float(client_last_visible_at)
+    except Exception:
+        client_last_visible_at = 0
 
     max_visible_requests = get_setting(
         request.registry.settings, 'max_visible_requests'
     )
     if history:
-        last_request_pair = history.last(1)[0]
-        last_request_id = last_request_pair[0]
-        if not last_request_id == client_last_request_id:
+        # we will return new results if last_visible_at is newer than
+        # the value from the client, otherwise they are already up to date
+        toolbars = history.last(max_visible_requests)
+        last_visible_at = (
+            max(tb.visible_at for _, tb in toolbars if tb.visible)
+            if toolbars
+            else 0
+        )
+        if client_last_visible_at < last_visible_at:
             data = [
                 [
                     _id,
                     toolbar.json,
                     'active' if active_request_id == _id else '',
                 ]
-                for _id, toolbar in history.last(max_visible_requests)
+                for _id, toolbar in toolbars
                 if toolbar.visible
             ]
             if data:
                 response.text = U_SSE_PAYLOAD.format(
-                    last_request_id, json.dumps(data)
+                    last_visible_at, json.dumps(data)
                 )
     return response
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar.egg-info/PKG-INFO 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar.egg-info/PKG-INFO
--- old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar.egg-info/PKG-INFO    
2023-01-03 03:35:55.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar.egg-info/PKG-INFO    
2024-01-27 23:38:55.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
-Name: pyramid-debugtoolbar
-Version: 4.10
+Name: pyramid_debugtoolbar
+Version: 4.11
 Summary: A package which provides an interactive HTML debugger for Pyramid 
application development
 Home-page: 
https://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest/
 Author: Chris McDonough, Michael Merickel, Casey Duncan, Blaise Laflamme
@@ -15,14 +15,26 @@
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
 Classifier: Framework :: Pyramid
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
 Classifier: License :: Repoze Public License
 Requires-Python: >=3.7
 Description-Content-Type: text/x-rst
+License-File: LICENSE.txt
+Requires-Dist: pyramid>=1.4
+Requires-Dist: pyramid_mako>=0.3.1
+Requires-Dist: Pygments
 Provides-Extra: testing
+Requires-Dist: WebTest; extra == "testing"
+Requires-Dist: pytest; extra == "testing"
+Requires-Dist: pytest-cov; extra == "testing"
+Requires-Dist: sqlalchemy; extra == "testing"
+Requires-Dist: webob; extra == "testing"
 Provides-Extra: docs
-License-File: LICENSE.txt
+Requires-Dist: Sphinx>=1.7.5; extra == "docs"
+Requires-Dist: pylons-sphinx-themes>=0.3; extra == "docs"
+Requires-Dist: setuptools; extra == "docs"
 
 pyramid_debugtoolbar
 ====================
@@ -128,6 +140,22 @@
     $ cd docs
     $ make clean html SPHINXBUILD=../env/bin/sphinx-build
 
+4.11 (2024-01-27)
+-----------------
+
+- Drop support for SQLAlchemy < 1.4.
+  See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
+
+- Add support for Python 3.12.
+
+- Add support for SQLAlchemy 2.x.
+  See https://github.com/Pylons/pyramid_debugtoolbar/pull/388
+
+- Fix an issue where a long-running request might not appear in the toolbar UI
+  without refreshing the page.
+
+- Use ``time.monotonic()`` when computing performance intervals.
+
 4.10 (2022-01-02)
 -----------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar.egg-info/SOURCES.txt 
new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar.egg-info/SOURCES.txt
--- old/pyramid_debugtoolbar-4.10/src/pyramid_debugtoolbar.egg-info/SOURCES.txt 
2023-01-03 03:35:55.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/src/pyramid_debugtoolbar.egg-info/SOURCES.txt 
2024-01-27 23:38:55.000000000 +0100
@@ -1,5 +1,6 @@
 .coveragerc
 .flake8
+.readthedocs.yaml
 CHANGES.txt
 CONTRIBUTORS.txt
 LICENSE.txt
@@ -10,7 +11,6 @@
 contributing.md
 pyproject.toml
 pytest.ini
-rtd.txt
 setup.cfg
 setup.py
 tox.ini
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/tests/test_debug.py 
new/pyramid_debugtoolbar-4.11/tests/test_debug.py
--- old/pyramid_debugtoolbar-4.10/tests/test_debug.py   2023-01-03 
03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/tests/test_debug.py   2024-01-27 
22:19:51.000000000 +0100
@@ -5,6 +5,7 @@
     :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
     :license: BSD license.
 """
+
 import re
 import sys
 import unittest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/tests/test_panels/_utils.py 
new/pyramid_debugtoolbar-4.11/tests/test_panels/_utils.py
--- old/pyramid_debugtoolbar-4.10/tests/test_panels/_utils.py   2020-11-25 
06:21:49.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/tests/test_panels/_utils.py   2024-01-27 
22:19:51.000000000 +0100
@@ -18,7 +18,6 @@
 
 
 class _TestDebugtoolbarPanel(unittest.TestCase):
-
     re_toolbar_link = re_toolbar_link
 
     def setUp(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/tests/test_panels/test_request_vars.py 
new/pyramid_debugtoolbar-4.11/tests/test_panels/test_request_vars.py
--- old/pyramid_debugtoolbar-4.10/tests/test_panels/test_request_vars.py        
2023-01-03 03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/tests/test_panels/test_request_vars.py        
2024-01-27 22:19:51.000000000 +0100
@@ -35,7 +35,6 @@
 
 class _TestPanel_RequestVars(_TestDebugtoolbarPanel):
     def _makeOne(self, query_args=None, post_body=None, content_type=None):
-
         # make a request
         query_args = ("?=%s" % urlencode(query_args)) if query_args else ""
         kwargs = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyramid_debugtoolbar-4.10/tests/test_panels/test_sqla.py 
new/pyramid_debugtoolbar-4.11/tests/test_panels/test_sqla.py
--- old/pyramid_debugtoolbar-4.10/tests/test_panels/test_sqla.py        
2023-01-03 03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/tests/test_panels/test_sqla.py        
2024-01-27 22:19:51.000000000 +0100
@@ -138,9 +138,9 @@
 
     def _sqlalchemy_view(self, context, request):
         engine = sqlalchemy.create_engine("sqlite://", isolation_level=None)
-        conn = engine.connect()
-        stmt = sqla_text("SELECT NULL;")
-        conn.execute(stmt)  # noqa
+        with engine.begin() as conn:
+            stmt = sqla_text("SELECT NULL;")
+            conn.execute(stmt)  # noqa
         return ok_response_factory()
 
     def test_panel(self):
@@ -157,8 +157,7 @@
 
     def _sqlalchemy_view(self, context, request):
         engine = sqlalchemy.create_engine("sqlite://", isolation_level=None)
-        conn = engine.connect()
-        with conn.begin():
+        with engine.begin() as conn:
             stmt = sqla_text("SELECT NULL;")
             conn.execute(stmt)  # noqa
         return ok_response_factory()
@@ -174,9 +173,8 @@
 class TestTransactionRollback(_TestSQLAlchemyPanel):
     def _sqlalchemy_view(self, context, request):
         engine = sqlalchemy.create_engine("sqlite://", isolation_level=None)
-        conn = engine.connect()
         try:
-            with conn.begin():
+            with engine.begin() as conn:
                 stmt = sqla_text("SELECT NULL;")
                 conn.execute(stmt)  # noqa
                 raise ValueError("EXPECTED")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/tests/test_toolbar.py 
new/pyramid_debugtoolbar-4.11/tests/test_toolbar.py
--- old/pyramid_debugtoolbar-4.10/tests/test_toolbar.py 2023-01-03 
03:34:30.000000000 +0100
+++ new/pyramid_debugtoolbar-4.11/tests/test_toolbar.py 2024-01-27 
22:19:51.000000000 +0100
@@ -76,9 +76,9 @@
 
         self.config.add_static_view('_debugtoolbar/static', STATIC_PATH)
         self.config.add_route('debugtoolbar', '/_debugtoolbar/*subpath')
-        self.config.registry.settings[
-            'debugtoolbar.button_style'
-        ] = 'top:120px;zoom:50%'
+        self.config.registry.settings['debugtoolbar.button_style'] = (
+            'top:120px;zoom:50%'
+        )
         response = Response('<body></body>')
         response.content_type = 'text/html'
         request = Request.blank('/')
@@ -364,9 +364,9 @@
     def test_it_intercept_redirect_nonredirect_code(self):
         request = Request.blank('/')
         request.remote_addr = '127.0.0.1'
-        self.config.registry.settings[
-            'debugtoolbar.intercept_redirects'
-        ] = True
+        self.config.registry.settings['debugtoolbar.intercept_redirects'] = (
+            True
+        )
         request.registry = self.config.registry
         result = self._callFUT(request)
         self.assertTrue(result is self.response)
@@ -382,9 +382,9 @@
         request = Request.blank('/')
         request.remote_addr = '127.0.0.1'
         request.registry = self.config.registry
-        self.config.registry.settings[
-            'debugtoolbar.intercept_redirects'
-        ] = True
+        self.config.registry.settings['debugtoolbar.intercept_redirects'] = (
+            True
+        )
         dispatch = self._makeRedirectDispatcher()
         result = self._callFUT(request, handler, _dispatch=dispatch)
         self.assertTrue(result is response)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyramid_debugtoolbar-4.10/tox.ini 
new/pyramid_debugtoolbar-4.11/tox.ini
--- old/pyramid_debugtoolbar-4.10/tox.ini       2023-01-03 03:34:30.000000000 
+0100
+++ new/pyramid_debugtoolbar-4.11/tox.ini       2024-01-27 22:19:51.000000000 
+0100
@@ -1,7 +1,7 @@
 [tox]
 envlist =
     lint,
-    py37,py38,py39,py310,py311,pypy3,
+    py37,py38,py39,py310,py311,py312,pypy3,
     py37-pyramid14,
     py37-pyramid{18,19},
     coverage,
@@ -16,6 +16,8 @@
     pyramid18: pyramid <= 1.8.99
     pyramid19: pyramid <= 1.9.99
     pyramid110: pyramid <= 1.10.99
+    sqlalchemy14: sqlalchemy < 2.0
+    sqlalchemy20: sqlalchemy >= 2.0, <2.1
 
 commands =
     py.test --cov --cov-report= {posargs:}

Reply via email to