From bfba4c4400e4897bb2db98a5e7b0f08e15c7208e Mon Sep 17 00:00:00 2001 From: Gerhard Schmidt Date: Mon, 15 Mar 2021 08:47:54 +0100 Subject: [PATCH 1/4] Changed the category of the venusian callback to 'pyramid' as pyramid 2.0 only calls callbacks with category='pyramid' by default. --- pyramid_layout/layout.py | 2 +- pyramid_layout/panel.py | 2 +- pyramid_layout/tests/test_layout.py | 2 +- pyramid_layout/tests/test_panel.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyramid_layout/layout.py b/pyramid_layout/layout.py index 318739f..85b570d 100644 --- a/pyramid_layout/layout.py +++ b/pyramid_layout/layout.py @@ -109,7 +109,7 @@ def callback(context, name, ob): config = context.config.with_package(info.module) config.add_layout(layout=ob, **settings) - info = venusian.attach(wrapped, callback, category='pyramid_layout') + info = venusian.attach(wrapped, callback, category='pyramid') settings['_info'] = info.codeinfo # fbo "action_method" return wrapped diff --git a/pyramid_layout/panel.py b/pyramid_layout/panel.py index 17a31a1..213e576 100644 --- a/pyramid_layout/panel.py +++ b/pyramid_layout/panel.py @@ -33,7 +33,7 @@ def callback(context, name, ob): config = context.config.with_package(info.module) config.add_panel(panel=ob, **settings) - info = venusian.attach(wrapped, callback, category='pyramid_layout') + info = venusian.attach(wrapped, callback, category='pyramid') if info.scope == 'class': # if the decorator was attached to a method in a class, or diff --git a/pyramid_layout/tests/test_layout.py b/pyramid_layout/tests/test_layout.py index c2828d4..31ec76e 100644 --- a/pyramid_layout/tests/test_layout.py +++ b/pyramid_layout/tests/test_layout.py @@ -128,7 +128,7 @@ def test_it(self, venusian): self.assertEqual(decorator('wrapped'), 'wrapped') info = venusian.attach.return_value args, kwargs = venusian.attach.call_args - self.assertEqual(kwargs, {'category': 'pyramid_layout'}) + self.assertEqual(kwargs, {'category': 'pyramid'}) wrapped, callback = args self.assertEqual(wrapped, 'wrapped') context = mock.Mock() diff --git a/pyramid_layout/tests/test_panel.py b/pyramid_layout/tests/test_panel.py index 81eecf3..89e39f9 100644 --- a/pyramid_layout/tests/test_panel.py +++ b/pyramid_layout/tests/test_panel.py @@ -22,7 +22,7 @@ def test_it(self, venusian): decorator = fut(name='howdy') self.assertEqual(decorator(panel), panel) args, kw = venusian.attach.call_args - self.assertEqual(kw, {'category': 'pyramid_layout'}) + self.assertEqual(kw, {'category': 'pyramid'}) venusian_wrapped, callback = args self.assertEqual(venusian_wrapped, panel) config_context = mock.Mock() @@ -48,7 +48,7 @@ def test_it_w_method(self, venusian): decorator = fut() self.assertEqual(decorator(panel), panel) args, kw = venusian.attach.call_args - self.assertEqual(kw, {'category': 'pyramid_layout'}) + self.assertEqual(kw, {'category': 'pyramid'}) venusian_wrapped, callback = args self.assertEqual(venusian_wrapped, panel) config_context = mock.Mock() From a05db9e336c21c249cad5ef88464ce047bf3b99d Mon Sep 17 00:00:00 2001 From: Gerhard Schmidt Date: Wed, 12 Feb 2025 07:30:55 +0100 Subject: [PATCH 2/4] Update tox.ini to newer python versions --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2e2aada..830e02f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py27,py36,py37,py38,py39,pypy27,pypy3,coverage + py311,py312,py313,coverage [testenv] extras = From 979cc2e071fd668ae68db575eac1f9e7329cf9ac Mon Sep 17 00:00:00 2001 From: Gerhard Schmidt Date: Wed, 12 Feb 2025 07:32:51 +0100 Subject: [PATCH 3/4] Update ci-tests.yml --- .github/workflows/ci-tests.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 542c516..0db43e3 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -14,13 +14,10 @@ jobs: strategy: matrix: py: - - "2.7" - - "3.6" - - "3.7" - - "3.8" - - "3.9" - - "pypy-2.7" - - "pypy3" + - "3.10" + - "3.11" + - "3.12" + - "3.13" os: - "ubuntu-latest" architecture: From ea619ed239cde00eaa2338d674660840f4344f13 Mon Sep 17 00:00:00 2001 From: Gerhard Schmidt Date: Wed, 12 Feb 2025 07:35:24 +0100 Subject: [PATCH 4/4] Update ci-tests.yml --- .github/workflows/ci-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 0db43e3..c4f74ae 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -40,14 +40,14 @@ jobs: name: Validate coverage steps: - uses: actions/checkout@v2 - - name: Setup python 3.9 + - name: Setup python 3.13 uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.13 architecture: x64 - run: pip install tox - - run: tox -e py27,py39,coverage + - run: tox -e py313,coverage # docs: # runs-on: ubuntu-latest # name: Build the documentation