Control: tags 782952 + patch
Control: tags 782952 + pending

Dear maintainer,

I've prepared an NMU for python-pyramid-zcml (versioned as 1.0.0-1.1) and
uploaded it to DELAYED/5. Please feel free to tell me if I
should delay it longer.

Regards.


-- 
WBR, wRAR
diff -Nru python-pyramid-zcml-1.0.0/debian/changelog python-pyramid-zcml-1.0.0/debian/changelog
--- python-pyramid-zcml-1.0.0/debian/changelog	2013-06-06 15:06:42.000000000 +0600
+++ python-pyramid-zcml-1.0.0/debian/changelog	2019-09-17 22:37:08.000000000 +0500
@@ -1,3 +1,14 @@
+python-pyramid-zcml (1.0.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Switch from Python 2 to Python 3 (Closes: #782952).
+  * Add support for Python 3.7.
+  * Add support for Pyramid 1.8 and other modern libs.
+  * Disable tests using mako as pyramid_mako is not packaged.
+  * Update the priority from extra to optional.
+
+ -- Andrey Rahmatullin <w...@debian.org>  Tue, 17 Sep 2019 22:37:08 +0500
+
 python-pyramid-zcml (1.0.0-1) unstable; urgency=low
 
   * New upstream release
diff -Nru python-pyramid-zcml-1.0.0/debian/control python-pyramid-zcml-1.0.0/debian/control
--- python-pyramid-zcml-1.0.0/debian/control	2012-05-03 19:35:31.000000000 +0600
+++ python-pyramid-zcml-1.0.0/debian/control	2019-09-17 22:36:13.000000000 +0500
@@ -1,14 +1,18 @@
 Source: python-pyramid-zcml
 Section: python
-Priority: extra
+Priority: optional
 Maintainer: Free Ekanayaka <fr...@debian.org>
-Build-Depends: debhelper (>= 7.0.50~), python-setuptools, python-all (>= 2.6.6-3)
+Build-Depends: debhelper (>= 7.0.50~), dh-python, python3-all,
+  python3-setuptools,
+  python3-pyramid,
+  python3-webtest,
+  python3-zope.configuration,
 Standards-Version: 3.9.3
 Homepage: http://pypi.python.org/pypi/pyramid_zcml
 
-Package: python-pyramid-zcml
+Package: python3-pyramid-zcml
 Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
+Depends: ${python3:Depends}, ${misc:Depends}
 Description: Declarative configuration for the Pyramid web framework
  The pyramid_zcml package provides ZCML (Zope Configuration Markup Language)
  directives for all "configurator" methods available in the Pyramid web
diff -Nru python-pyramid-zcml-1.0.0/debian/patches/fix-authkit.patch python-pyramid-zcml-1.0.0/debian/patches/fix-authkit.patch
--- python-pyramid-zcml-1.0.0/debian/patches/fix-authkit.patch	1970-01-01 05:00:00.000000000 +0500
+++ python-pyramid-zcml-1.0.0/debian/patches/fix-authkit.patch	2019-09-17 22:01:00.000000000 +0500
@@ -0,0 +1,24 @@
+From d041694f77215dcb692b65d33ab0ad64b07135f0 Mon Sep 17 00:00:00 2001
+From: Tres Seaver <tsea...@palladion.com>
+Date: Wed, 4 Feb 2015 12:25:02 -0500
+Subject: [PATCH] Accomodate updated AuthTkt.
+
+---
+ pyramid_zcml/tests/test_units.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pyramid_zcml/tests/test_units.py b/pyramid_zcml/tests/test_units.py
+index a53d398..24b8941 100644
+--- a/pyramid_zcml/tests/test_units.py
++++ b/pyramid_zcml/tests/test_units.py
+@@ -372,8 +372,8 @@ def callback(identity, request):
+         reg.registerUtility(object(), IAuthorizationPolicy)
+         _execute_actions(actions)
+         policy = reg.getUtility(IAuthenticationPolicy)
+-        self.assertEqual(policy.cookie.path, '/sub/')
+-        self.assertEqual(policy.cookie.http_only, True)
++        self.assertEqual(policy.cookie.cookie_profile.path, '/sub/')
++        self.assertEqual(policy.cookie.cookie_profile.httponly, True)
+         self.assertEqual(policy.cookie.secret, 'sosecret')
+         self.assertEqual(policy.callback, callback)
+ 
diff -Nru python-pyramid-zcml-1.0.0/debian/patches/fix-path.patch python-pyramid-zcml-1.0.0/debian/patches/fix-path.patch
--- python-pyramid-zcml-1.0.0/debian/patches/fix-path.patch	1970-01-01 05:00:00.000000000 +0500
+++ python-pyramid-zcml-1.0.0/debian/patches/fix-path.patch	2019-09-17 22:35:35.000000000 +0500
@@ -0,0 +1,23 @@
+From c32e7ee71c631a68206989055d027cee91a5021f Mon Sep 17 00:00:00 2001
+From: Tres Seaver <tsea...@palladion.com>
+Date: Tue, 8 Jan 2019 14:14:08 -0500
+Subject: [PATCH] Module's '__path__' is supposed to be a list ot strings, or
+ None.
+
+---
+ pyramid_zcml/tests/test_units.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pyramid_zcml/tests/test_units.py b/pyramid_zcml/tests/test_units.py
+index 2048aa1..7f1e438 100644
+--- a/pyramid_zcml/tests/test_units.py
++++ b/pyramid_zcml/tests/test_units.py
+@@ -1227,7 +1227,7 @@ def __call__(self):
+         """ """
+         
+ class DummyModule:
+-    __path__ = "foo"
++    __path__ = ["foo"]
+     __name__ = "dummy"
+     __file__ = ''
+     scanned = False
diff -Nru python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8-2.patch python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8-2.patch
--- python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8-2.patch	1970-01-01 05:00:00.000000000 +0500
+++ python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8-2.patch	2019-09-17 22:05:24.000000000 +0500
@@ -0,0 +1,86 @@
+From 7357d01b7d5815d2451b44ff3d03ef251d652e92 Mon Sep 17 00:00:00 2001
+From: Florian Schulze <florian.schu...@gmx.net>
+Date: Tue, 24 Jan 2017 10:43:06 +0100
+Subject: [PATCH] Use IExceptionViewClassifier for compatibility with Pyramid
+ 1.8.
+
+---
+ pyramid_zcml/tests/test_units.py | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/pyramid_zcml/tests/test_units.py b/pyramid_zcml/tests/test_units.py
+index c6e8603..2048aa1 100644
+--- a/pyramid_zcml/tests/test_units.py
++++ b/pyramid_zcml/tests/test_units.py
+@@ -130,7 +130,7 @@ def test_it(self):
+         from zope.interface import implementedBy
+         from pyramid.interfaces import IRequest
+         from pyramid.interfaces import IView
+-        from pyramid.interfaces import IViewClassifier
++        from pyramid.interfaces import IExceptionViewClassifier
+         from pyramid.exceptions import NotFound
+         from pyramid.registry import undefer
+ 
+@@ -147,7 +147,7 @@ def view(request):
+         register = actions[0]['callable']
+         register()
+         derived_view = reg.adapters.lookup(
+-            (IViewClassifier, IRequest, implementedBy(NotFound)),
++            (IExceptionViewClassifier, IRequest, implementedBy(NotFound)),
+             IView, default=None)
+ 
+         self.assertNotEqual(derived_view, None)
+@@ -158,7 +158,7 @@ def test_it_with_dotted_renderer(self):
+         from zope.interface import implementedBy
+         from pyramid.interfaces import IRequest
+         from pyramid.interfaces import IView
+-        from pyramid.interfaces import IViewClassifier
++        from pyramid.interfaces import IExceptionViewClassifier
+         from pyramid.exceptions import NotFound
+         from pyramid.config import Configurator
+         from pyramid.registry import undefer
+@@ -179,7 +179,7 @@ def view(request):
+         register = regadapt['callable']
+         register()
+         derived_view = reg.adapters.lookup(
+-            (IViewClassifier, IRequest, implementedBy(NotFound)),
++            (IExceptionViewClassifier, IRequest, implementedBy(NotFound)),
+             IView, default=None)
+         self.assertNotEqual(derived_view, None)
+         self.assertEqual(derived_view(None, None).body, b('OK'))
+@@ -200,7 +200,7 @@ def test_it(self):
+         from zope.interface import implementedBy
+         from pyramid.interfaces import IRequest
+         from pyramid.interfaces import IView
+-        from pyramid.interfaces import IViewClassifier
++        from pyramid.interfaces import IExceptionViewClassifier
+         from pyramid.exceptions import Forbidden
+         from pyramid.registry import undefer
+         reg = self.config.registry
+@@ -217,7 +217,7 @@ def view(request):
+         register = actions[0]['callable']
+         register()
+         derived_view = reg.adapters.lookup(
+-            (IViewClassifier, IRequest, implementedBy(Forbidden)),
++            (IExceptionViewClassifier, IRequest, implementedBy(Forbidden)),
+             IView, default=None)
+ 
+         self.assertNotEqual(derived_view, None)
+@@ -228,7 +228,7 @@ def test_it_with_dotted_renderer(self):
+         from zope.interface import implementedBy
+         from pyramid.interfaces import IRequest
+         from pyramid.interfaces import IView
+-        from pyramid.interfaces import IViewClassifier
++        from pyramid.interfaces import IExceptionViewClassifier
+         from pyramid.exceptions import Forbidden
+         from pyramid.config import Configurator
+         from pyramid.registry import undefer
+@@ -249,7 +249,7 @@ def view(request):
+         register = regadapt['callable']
+         register()
+         derived_view = reg.adapters.lookup(
+-            (IViewClassifier, IRequest, implementedBy(Forbidden)),
++            (IExceptionViewClassifier, IRequest, implementedBy(Forbidden)),
+             IView, default=None)
+         self.assertNotEqual(derived_view, None)
+         self.assertEqual(derived_view(None, None).body, b('OK'))
diff -Nru python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8-3.patch python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8-3.patch
--- python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8-3.patch	1970-01-01 05:00:00.000000000 +0500
+++ python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8-3.patch	2019-09-17 22:23:31.000000000 +0500
@@ -0,0 +1,43 @@
+From 863fb926cd6880371e3f24b9dc98903b5758e8dc Mon Sep 17 00:00:00 2001
+From: Bert JW Regeer <ber...@regeer.org>
+Date: Tue, 19 Jan 2016 23:29:05 -0700
+Subject: [PATCH] Fix TestAssetDirective test
+
+This test is using internal API within Pyramid that was changed in
+Pyramid 1.6 (the default installed because it was released). This test
+fixes the test to verify correctness, but because it is using internal
+API the test is extremely brittle.
+---
+ pyramid_zcml/tests/test_units.py | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/pyramid_zcml/tests/test_units.py b/pyramid_zcml/tests/test_units.py
+index c146dae..ed1ff95 100644
+--- a/pyramid_zcml/tests/test_units.py
++++ b/pyramid_zcml/tests/test_units.py
+@@ -632,6 +632,10 @@ def _callFUT(self, *arg, **kw):
+         return asset(*arg, **kw)
+ 
+     def test_it(self):
++        # This test is extremely fragile because it depends on internal API of
++        # the Pyramid asset_override function. This means that any changes in
++        # that API may cause this test to fail.
++        from pyramid.config.assets import PackageAssetSource
+         from pyramid.registry import undefer
+         import pyramid_zcml.tests
+         context = DummyZCMLContext(self.config)
+@@ -647,10 +651,11 @@ def dummy_override(*arg):
+         discrim = undefer(actions[0]['discriminator'])
+         self.assertEqual(action['discriminator'], None)
+         action['callable']()
++        L = list(L[0])
+         self.assertEqual(
+-            L,
+-            [(pyramid_zcml.tests, 'fixtures/', pyramid_zcml.tests,
+-              'fixtureapp/')])
++            L[:2],
++            [pyramid_zcml.tests, 'fixtures/'])
++        self.assertTrue(isinstance(L[2], PackageAssetSource))
+ 
+ 
+ class TestRendererDirective(unittest.TestCase):
diff -Nru python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8.patch python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8.patch
--- python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8.patch	1970-01-01 05:00:00.000000000 +0500
+++ python-pyramid-zcml-1.0.0/debian/patches/fix-pyramid-1.8.patch	2019-09-17 22:26:54.000000000 +0500
@@ -0,0 +1,24 @@
+# adapted from 29b459a5629524e7401c9de00a190936151cdbe5
+
+Index: python-pyramid-zcml-1.0.0/pyramid_zcml/__init__.py
+===================================================================
+--- python-pyramid-zcml-1.0.0.orig/pyramid_zcml/__init__.py
++++ python-pyramid-zcml-1.0.0/pyramid_zcml/__init__.py
+@@ -23,7 +23,7 @@ from pyramid.authentication import Repoz
+ from pyramid.authorization import ACLAuthorizationPolicy
+ from pyramid.config import Configurator
+ from pyramid.exceptions import ConfigurationError
+-from pyramid.asset import asset_spec_from_abspath
++from pyramid.asset import asset_spec_from_abspath, resolve_asset_spec
+ from pyramid.threadlocal import get_current_registry
+ 
+ from zope.configuration import xmlconfig
+@@ -819,7 +819,7 @@ def load_zcml(self, spec='configure.zcml
+     absolute filename, a relative filename, or a :term:`asset
+     specification`, defaulting to ``configure.zcml`` (relative to
+     the package of the method's caller)."""
+-    package_name, filename = self._split_spec(spec)
++    package_name, filename = resolve_asset_spec(spec, self.package_name)
+     if package_name is None: # absolute filename
+         package = self.package
+     else:
diff -Nru python-pyramid-zcml-1.0.0/debian/patches/fix-venusian.patch python-pyramid-zcml-1.0.0/debian/patches/fix-venusian.patch
--- python-pyramid-zcml-1.0.0/debian/patches/fix-venusian.patch	1970-01-01 05:00:00.000000000 +0500
+++ python-pyramid-zcml-1.0.0/debian/patches/fix-venusian.patch	2019-09-17 22:33:48.000000000 +0500
@@ -0,0 +1,32 @@
+From 5dc4ca1d27fbbd34c0adde068001d37b2ae388f5 Mon Sep 17 00:00:00 2001
+From: Tres Seaver <tsea...@palladion.com>
+Date: Wed, 4 Feb 2015 12:41:19 -0500
+Subject: [PATCH] Accomodate recent Venusian.
+
+---
+ pyramid_zcml/tests/test_units.py | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/pyramid_zcml/tests/test_units.py b/pyramid_zcml/tests/test_units.py
+index 24b8941..693dd82 100644
+--- a/pyramid_zcml/tests/test_units.py
++++ b/pyramid_zcml/tests/test_units.py
+@@ -733,14 +733,15 @@ def _callFUT(self, context, package):
+ 
+     def test_it(self):
+         class DummyVenusianCategories(dict):
+-            def attached_to(self, ob):
++            def attached_to(self, mod_name, name, ob):
+                 return True
+         dummy_module = DummyModule()
+         def foo(): pass
+         def bar(scanner, name, ob):
+             dummy_module.scanned = True
+-        foo.__venusian_callbacks__ = DummyVenusianCategories(
+-                                         {'pyramid':[(bar, 'dummy')]})
++        vcb = DummyVenusianCategories(
++            {'pyramid':[(bar, 'dummy', 'foo None', 'function call')]})
++        foo.__venusian_callbacks__ = vcb
+         dummy_module.foo = foo
+         
+         context = DummyZCMLContext(self.config)
diff -Nru python-pyramid-zcml-1.0.0/debian/patches/remove-mako-tests.patch python-pyramid-zcml-1.0.0/debian/patches/remove-mako-tests.patch
--- python-pyramid-zcml-1.0.0/debian/patches/remove-mako-tests.patch	1970-01-01 05:00:00.000000000 +0500
+++ python-pyramid-zcml-1.0.0/debian/patches/remove-mako-tests.patch	2019-09-17 22:28:17.000000000 +0500
@@ -0,0 +1,30 @@
+Index: python-pyramid-zcml-1.0.0/pyramid_zcml/tests/test_integration.py
+===================================================================
+--- python-pyramid-zcml-1.0.0.orig/pyramid_zcml/tests/test_integration.py
++++ python-pyramid-zcml-1.0.0/pyramid_zcml/tests/test_integration.py
+@@ -101,25 +101,6 @@ class TestRestBugApp(IntegrationBase):
+         res = self.testapp.get('/pet', status=200)
+         self.assertEqual(res.body, b'gotten')
+ 
+-class TestViewDecoratorApp(IntegrationBase):
+-    config = 'pyramid_zcml.tests.viewdecoratorapp:configure.zcml'
+-    def _configure_mako(self):
+-        tmpldir = os.path.join(os.path.dirname(__file__), 'viewdecoratorapp',
+-                               'views')
+-        self.config.registry.settings['mako.directories'] = tmpldir
+-
+-    def test_first(self):
+-        # we use mako here instead of chameleon because it works on Jython
+-        self._configure_mako()
+-        res = self.testapp.get('/first', status=200)
+-        self.assertTrue(b'OK' in res.body)
+-
+-    def test_second(self):
+-        # we use mako here instead of chameleon because it works on Jython
+-        self._configure_mako()
+-        res = self.testapp.get('/second', status=200)
+-        self.assertTrue(b'OK2' in res.body)
+-
+ class TestViewPermissionBug(IntegrationBase):
+     # view_execution_permitted bug as reported by Shane at http://lists.repoze.org/pipermail/repoze-dev/2010-October/003603.html
+     config = 'pyramid_zcml.tests.permbugapp:configure.zcml'
diff -Nru python-pyramid-zcml-1.0.0/debian/patches/series python-pyramid-zcml-1.0.0/debian/patches/series
--- python-pyramid-zcml-1.0.0/debian/patches/series	1970-01-01 05:00:00.000000000 +0500
+++ python-pyramid-zcml-1.0.0/debian/patches/series	2019-09-17 22:35:35.000000000 +0500
@@ -0,0 +1,7 @@
+fix-pyramid-1.8.patch
+fix-authkit.patch
+fix-pyramid-1.8-2.patch
+fix-pyramid-1.8-3.patch
+remove-mako-tests.patch
+fix-venusian.patch
+fix-path.patch
diff -Nru python-pyramid-zcml-1.0.0/debian/rules python-pyramid-zcml-1.0.0/debian/rules
--- python-pyramid-zcml-1.0.0/debian/rules	2012-04-12 18:16:52.000000000 +0600
+++ python-pyramid-zcml-1.0.0/debian/rules	2019-09-17 21:28:54.000000000 +0500
@@ -1,4 +1,4 @@
 #!/usr/bin/make -f
 
 %:
-	dh $@ --with python2
+	dh $@ --with python3 --buildsystem=pybuild

Attachment: signature.asc
Description: PGP signature

Reply via email to