Hello community, here is the log from the commit of package python-pecan for openSUSE:Factory checked in at 2017-08-28 15:14:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pecan (Old) and /work/SRC/openSUSE:Factory/.python-pecan.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-pecan" Mon Aug 28 15:14:54 2017 rev:21 rq:518559 version:1.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pecan/python-pecan.changes 2016-04-22 16:23:37.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-pecan.new/python-pecan.changes 2017-08-28 15:16:25.374984471 +0200 @@ -1,0 +2,21 @@ +Thu Aug 24 15:31:13 UTC 2017 - tbechtold@suse.com + +- Add pull-request-91.patch . That fixes the tests for python3.6 + +------------------------------------------------------------------- +Wed Jul 12 06:00:37 UTC 2017 - tbechtold@suse.com + +- Only require python-singledispatch on python2 + +------------------------------------------------------------------- +Thu Jun 29 16:40:00 UTC 2017 - tbechtold@suse.com + +- convert to singlespec +- fix Source url + +------------------------------------------------------------------- +Tue Nov 15 11:01:05 UTC 2016 - dmueller@suse.com + +- update to 1.2.1 + +------------------------------------------------------------------- Old: ---- pecan-1.0.5.tar.gz New: ---- pecan-1.2.1.tar.gz pull-request-91.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pecan.spec ++++++ --- /var/tmp/diff_new_pack.CjYXbP/_old 2017-08-28 15:16:26.934765302 +0200 +++ /var/tmp/diff_new_pack.CjYXbP/_new 2017-08-28 15:16:26.938764740 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pecan # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,39 +16,42 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pecan -Version: 1.0.5 +Version: 1.2.1 Release: 0 Summary: A WSGI object-dispatching web framework, designed to be lean and fast License: BSD-3-Clause Group: Development/Languages/Python Url: http://github.com/dreamhost/pecan -Source: https://pypi.python.org/packages/source/p/pecan/pecan-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +Source: https://files.pythonhosted.org/packages/source/p/pecan/pecan-%{version}.tar.gz +# # PATCH-FIX-UPSTREAM pull-request-91.patch -- https://github.com/pecan/pecan/pull/91 +Patch1: pull-request-91.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros # Test requirements: %if 0%{?suse_version} >= 1230 && 0%{?suse_version} != 1315 -BuildRequires: python-Genshi -BuildRequires: python-Jinja2 -BuildRequires: python-Kajiki -BuildRequires: python-Mako >= 0.4.0 -BuildRequires: python-SQLAlchemy -BuildRequires: python-WebTest >= 1.3.1 -BuildRequires: python-gunicorn -BuildRequires: python-logutils -BuildRequires: python-mock -BuildRequires: python-singledispatch -BuildRequires: python-virtualenv -%endif -BuildRequires: python-six -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -Requires: python-ordereddict +BuildRequires: %{python_module Genshi} +BuildRequires: %{python_module Jinja2} +BuildRequires: %{python_module Kajiki} +BuildRequires: %{python_module Mako >= 0.4.0} +BuildRequires: %{python_module SQLAlchemy} +BuildRequires: %{python_module WebTest >= 1.3.1} +BuildRequires: %{python_module gunicorn} +BuildRequires: %{python_module logutils} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module virtualenv} +BuildRequires: python2-singledispatch %endif +BuildRequires: %{python_module six} Requires: python-Mako >= 0.4.0 Requires: python-WebOb >= 1.2dev Requires: python-WebTest >= 1.3.1 Requires: python-logutils >= 0.3 +%ifpython2 Requires: python-singledispatch +%endif Requires: python-six %if 0%{?suse_version} Suggests: python-Jinja2 @@ -56,11 +59,11 @@ Suggests: python-gunicorn %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch -%endif + +%python_subpackages %description A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies. @@ -69,23 +72,34 @@ %setup -q -n pecan-%{version} # Let's not depend on Kajiki, a Genshi clone. Genshi should be enough: sed -i "/'Kajiki',/d" setup.py +%patch1 -p1 %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_clone -a %{buildroot}%{_bindir}/pecan +%python_clone -a %{buildroot}%{_bindir}/gunicorn_pecan %if 0%{?suse_version} >= 1230 && 0%{?suse_version} != 1315 %check -python setup.py test +%python_exec setup.py test %endif -%files +%post +%python_install_alternative pecan +%python_install_alternative gunicorn_pecan + +%postun +%python_uninstall_alternative pecan +%python_uninstall_alternative gunicorn_pecan + +%files %{python_files} %defattr(-,root,root,-) %doc LICENSE README.rst -%{_bindir}/pecan -%{_bindir}/gunicorn_pecan +%python_alternative %{_bindir}/pecan +%python_alternative %{_bindir}/gunicorn_pecan %{python_sitelib}/* %changelog ++++++ pecan-1.0.5.tar.gz -> pecan-1.2.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/PKG-INFO new/pecan-1.2.1/PKG-INFO --- old/pecan-1.0.5/PKG-INFO 2016-03-16 17:52:22.000000000 +0100 +++ new/pecan-1.2.1/PKG-INFO 2016-09-27 02:09:24.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pecan -Version: 1.0.5 +Version: 1.2.1 Summary: A WSGI object-dispatching web framework, designed to be lean and fast, with few dependencies. Home-page: http://github.com/pecan/pecan Author: Jonathan LaCour @@ -25,6 +25,7 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Internet :: WWW/HTTP :: WSGI Classifier: Topic :: Software Development :: Libraries :: Application Frameworks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/README.rst new/pecan-1.2.1/README.rst --- old/pecan-1.0.5/README.rst 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/README.rst 2016-09-27 02:05:11.000000000 +0200 @@ -33,7 +33,7 @@ Viewing Documentation --------------------- -`Available online http://pecan.readthedocs.org`_, or to build manually:: +`Available online https://pecan.readthedocs.io`_, or to build manually:: $ cd docs && make html $ open docs/build/html/index.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/compat/__init__.py new/pecan-1.2.1/pecan/compat/__init__.py --- old/pecan-1.0.5/pecan/compat/__init__.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/compat/__init__.py 2016-09-27 02:05:11.000000000 +0200 @@ -18,3 +18,15 @@ def is_bound_method(ob): return inspect.ismethod(ob) and six.get_method_self(ob) is not None + + +def getargspec(func): + import sys + if sys.version_info < (3, 5): + return inspect.getargspec(func) + + from collections import namedtuple + ArgSpec = namedtuple('ArgSpec', 'args varargs keywords defaults') + args, varargs, keywords, defaults = inspect.getfullargspec(func)[:4] + return ArgSpec(args=args, varargs=varargs, keywords=keywords, + defaults=defaults) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/core.py new/pecan-1.2.1/pecan/core.py --- old/pecan-1.0.5/pecan/core.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/core.py 2016-09-27 02:05:33.000000000 +0200 @@ -1,7 +1,3 @@ -try: - from simplejson import dumps, loads -except ImportError: # pragma: no cover - from json import dumps, loads # noqa from inspect import Arguments from itertools import chain, tee from mimetypes import guess_type, add_type @@ -18,6 +14,7 @@ from webob.multidict import NestedMultiDict from .compat import urlparse, izip +from .jsonify import encode as dumps from .secure import handle_security from .templating import RendererFactory from .routing import lookup_controller, NonCanonicalPath @@ -415,6 +412,11 @@ renderer_name, self.template_path ) + if renderer is None: + raise RuntimeError( + 'support for "%s" was not found; ' % renderer_name + + 'supported template engines are %s' % self.renderers.keys() + ) else: renderer = self.renderers.get( self.default_renderer, @@ -668,6 +670,9 @@ } controller = None + # track internal redirects + internal_redirect = False + # handle the request try: # add context and environment to the request @@ -697,9 +702,12 @@ state.response.content_type = best_match environ['pecan.original_exception'] = e + # note if this is an internal redirect + internal_redirect = isinstance(e, ForwardRequestException) + # if this is not an internal redirect, run error hooks on_error_result = None - if not isinstance(e, ForwardRequestException): + if not internal_redirect: on_error_result = self.handle_hooks( self.determine_hooks(state.controller), 'on_error', @@ -720,10 +728,13 @@ if allowed_methods: state.response.allow = sorted(allowed_methods) finally: - # handle "after" hooks - self.handle_hooks( - self.determine_hooks(state.controller), 'after', state - ) + # if this is not an internal redirect, run "after" hooks + if not internal_redirect: + self.handle_hooks( + self.determine_hooks(state.controller), + 'after', + state + ) self._handle_empty_response_body(state) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/decorators.py new/pecan-1.2.1/pecan/decorators.py --- old/pecan-1.0.5/pecan/decorators.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/decorators.py 2016-09-27 02:05:11.000000000 +0200 @@ -11,7 +11,7 @@ def when_for(controller): - def when(method=None, **kw): + def when(method, **kw): def decorate(f): _cfg(f)['generic_handler'] = True controller._pecan['generic_handlers'][method.upper()] = f @@ -32,7 +32,9 @@ access via HTTP, and to configure that access. :param template: The path to a template, relative to the base template - directory. + directory. Can also be passed a string representing + a special or custom renderer, such as ``'json'`` for + :ref:`expose_json`. :param content_type: The content-type to use for this template. :param generic: A boolean which flags this as a "generic" controller, which uses generic functions based upon diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/middleware/debug.py new/pecan-1.2.1/pecan/middleware/debug.py --- old/pecan-1.0.5/pecan/middleware/debug.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/middleware/debug.py 2016-09-27 02:05:11.000000000 +0200 @@ -2,7 +2,7 @@ <div class="traceback"> <b>To disable this interface, set </b> https://pecan.readthedocs.org/en/latest/deployment.html#disabling-debug-mode"> + href="https://pecan.readthedocs.io/en/latest/deployment.html#disabling-debug-mode"> <pre>conf.app.debug = False</pre> </a> </div> @@ -10,20 +10,22 @@ try: import re + from six import b from backlash.debug import DebuggedApplication class DebugMiddleware(DebuggedApplication): - body_re = re.compile('(
]*>)', re.I) + body_re = re.compile(b('(]*>)'), re.I) def debug_application(self, environ, start_response): for part in super(DebugMiddleware, self).debug_application( environ, start_response ): - yield self.body_re.sub('\g<1>%s' % __CONFIG_HELP__, part) + yield self.body_re.sub(b('\g<1>%s' % __CONFIG_HELP__), part) except ImportError: + import logging from traceback import print_exc from pprint import pformat @@ -32,6 +34,8 @@ from webob import Response from webob.exc import HTTPException + LOG = logging.getLogger(__file__) + debug_template_raw = '''<html> <head> <title>Pecan - Application Error</title> @@ -76,6 +80,7 @@ # get a formatted exception out = StringIO() print_exc(file=out) + LOG.exception(exc) # get formatted WSGI environment formatted_environ = pformat(environ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/scaffolds/base/+package+/controllers/root.py new/pecan-1.2.1/pecan/scaffolds/base/+package+/controllers/root.py --- old/pecan-1.0.5/pecan/scaffolds/base/+package+/controllers/root.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/scaffolds/base/+package+/controllers/root.py 2016-09-27 02:05:11.000000000 +0200 @@ -10,7 +10,7 @@ @index.when(method='POST') def index_post(self, q): - redirect('http://pecan.readthedocs.org/en/latest/search.html?q=%s' % q) + redirect('https://pecan.readthedocs.io/en/latest/search.html?q=%s' % q) @expose('error.html') def error(self, status): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/scaffolds/base/+package+/model/__init__.py new/pecan-1.2.1/pecan/scaffolds/base/+package+/model/__init__.py --- old/pecan-1.0.5/pecan/scaffolds/base/+package+/model/__init__.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/scaffolds/base/+package+/model/__init__.py 2016-09-27 02:05:11.000000000 +0200 @@ -10,6 +10,6 @@ recommended place to do it. For more information working with databases, and some common recipes, - see http://pecan.readthedocs.org/en/latest/databases.html + see https://pecan.readthedocs.io/en/latest/databases.html """ pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/scaffolds/base/+package+/templates/layout.html new/pecan-1.2.1/pecan/scaffolds/base/+package+/templates/layout.html --- old/pecan-1.0.5/pecan/scaffolds/base/+package+/templates/layout.html 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/scaffolds/base/+package+/templates/layout.html 2016-09-27 02:05:11.000000000 +0200 @@ -18,5 +18,5 @@ %def> <%def name="javascript()"> - <script language="text/javascript" src="/javascript/shared.js"></script> + <script type="text/javascript" src="/javascript/shared.js"></script> %def> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/scaffolds/base/+package+/tests/test_functional.py_tmpl new/pecan-1.2.1/pecan/scaffolds/base/+package+/tests/test_functional.py_tmpl --- old/pecan-1.0.5/pecan/scaffolds/base/+package+/tests/test_functional.py_tmpl 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/scaffolds/base/+package+/tests/test_functional.py_tmpl 2016-09-27 02:05:11.000000000 +0200 @@ -13,7 +13,7 @@ response = self.app.post('/', params={'q': 'RestController'}) assert response.status_int == 302 assert response.headers['Location'] == ( - 'http://pecan.readthedocs.org/en/latest/search.html' + 'https://pecan.readthedocs.io/en/latest/search.html' '?q=RestController' ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/scaffolds/rest-api/+package+/model/__init__.py new/pecan-1.2.1/pecan/scaffolds/rest-api/+package+/model/__init__.py --- old/pecan-1.0.5/pecan/scaffolds/rest-api/+package+/model/__init__.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/scaffolds/rest-api/+package+/model/__init__.py 2016-09-27 02:05:11.000000000 +0200 @@ -10,6 +10,6 @@ recommended place to do it. For more information working with databases, and some common recipes, - see http://pecan.readthedocs.org/en/latest/databases.html + see https://pecan.readthedocs.io/en/latest/databases.html """ pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/templating.py new/pecan-1.2.1/pecan/templating.py --- old/pecan-1.0.5/pecan/templating.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/templating.py 2016-09-27 02:05:11.000000000 +0200 @@ -285,3 +285,6 @@ else: self._renderers[name] = cls(template_path, self.extra_vars) return self._renderers[name] + + def keys(self, *args, **kwargs): + return self._renderer_classes.keys(*args, **kwargs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/tests/test_base.py new/pecan-1.2.1/pecan/tests/test_base.py --- old/pecan-1.0.5/pecan/tests/test_base.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/tests/test_base.py 2016-09-27 02:05:33.000000000 +0200 @@ -20,7 +20,7 @@ abort, make_app, override_template, render, route ) from pecan.templating import ( - _builtin_renderers as builtin_renderers, error_formatters + _builtin_renderers as builtin_renderers, error_formatters, MakoRenderer ) from pecan.decorators import accept_noncanonical from pecan.tests import PecanTestCase @@ -1898,6 +1898,23 @@ break assert error_msg is not None + def test_renderer_not_found(self): + + class RootController(object): + @expose('mako3:mako.html') + def index(self, name='Jonathan'): + return dict(name=name) + + app = TestApp( + Pecan(RootController(), template_path=self.template_path) + ) + try: + r = app.get('/') + except Exception as e: + expected = e + + assert 'support for "mako3" was not found;' in str(expected) + def test_json(self): try: from simplejson import loads @@ -1920,6 +1937,36 @@ result = dict(loads(r.body.decode())) assert result == expected_result + def test_custom_renderer(self): + + class RootController(object): + @expose('backwards:mako.html') + def index(self, name='Joe'): + return dict(name=name) + + class BackwardsRenderer(MakoRenderer): + # Custom renderer that reverses all string namespace values + def render(self, template_path, namespace): + namespace = dict( + (k, v[::-1]) + for k, v in namespace.items() + ) + return super(BackwardsRenderer, self).render(template_path, + namespace) + + app = TestApp(Pecan( + RootController(), + template_path=self.template_path, + custom_renderers={'backwards': BackwardsRenderer} + )) + r = app.get('/') + assert r.status_int == 200 + assert b_("<h1>Hello, eoJ!</h1>") in r.body + + r = app.get('/index.html?name=Tim') + assert r.status_int == 200 + assert b_("<h1>Hello, miT!</h1>") in r.body + def test_override_template(self): class RootController(object): @expose('foo.html') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/tests/test_hooks.py new/pecan-1.2.1/pecan/tests/test_hooks.py --- old/pecan-1.0.5/pecan/tests/test_hooks.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/tests/test_hooks.py 2016-09-27 02:05:11.000000000 +0200 @@ -416,6 +416,28 @@ # for each different instance of the Hook in the two Controllers assert run_hook[3] == 'last - before hook', run_hook[3] + def test_internal_redirect_with_after_hook(self): + run_hook = [] + + class RootController(object): + @expose() + def internal(self): + redirect('/testing', internal=True) + + @expose() + def testing(self): + return 'it worked!' + + class SimpleHook(PecanHook): + def after(self, state): + run_hook.append('after') + + app = TestApp(make_app(RootController(), hooks=[SimpleHook()])) + response = app.get('/internal') + assert response.body == b_('it worked!') + + assert len(run_hook) == 1 + class TestStateAccess(PecanTestCase): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/tests/test_util.py new/pecan-1.2.1/pecan/tests/test_util.py --- old/pecan-1.0.5/pecan/tests/test_util.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/tests/test_util.py 2016-09-27 02:05:11.000000000 +0200 @@ -1,9 +1,9 @@ import functools -import inspect import unittest from pecan import expose from pecan import util +from pecan.compat import getargspec class TestArgSpec(unittest.TestCase): @@ -25,11 +25,11 @@ return RootController() def test_no_decorator(self): - expected = inspect.getargspec(self.controller.index.__func__) + expected = getargspec(self.controller.index.__func__) actual = util.getargspec(self.controller.index.__func__) assert expected == actual - expected = inspect.getargspec(self.controller.static_index) + expected = getargspec(self.controller.static_index) actual = util.getargspec(self.controller.static_index) assert expected == actual @@ -37,11 +37,11 @@ def dec(f): return f - expected = inspect.getargspec(self.controller.index.__func__) + expected = getargspec(self.controller.index.__func__) actual = util.getargspec(dec(self.controller.index.__func__)) assert expected == actual - expected = inspect.getargspec(self.controller.static_index) + expected = getargspec(self.controller.static_index) actual = util.getargspec(dec(self.controller.static_index)) assert expected == actual @@ -52,11 +52,11 @@ return f(*a, **kw) return wrapped - expected = inspect.getargspec(self.controller.index.__func__) + expected = getargspec(self.controller.index.__func__) actual = util.getargspec(dec(self.controller.index.__func__)) assert expected == actual - expected = inspect.getargspec(self.controller.static_index) + expected = getargspec(self.controller.static_index) actual = util.getargspec(dec(self.controller.static_index)) assert expected == actual @@ -67,11 +67,11 @@ return f(*a, **kw) return wrapped - expected = inspect.getargspec(self.controller.index.__func__) + expected = getargspec(self.controller.index.__func__) actual = util.getargspec(dec(dec(dec(self.controller.index.__func__)))) assert expected == actual - expected = inspect.getargspec(self.controller.static_index) + expected = getargspec(self.controller.static_index) actual = util.getargspec(dec(dec(dec( self.controller.static_index)))) assert expected == actual @@ -85,11 +85,11 @@ return wrapped return inner - expected = inspect.getargspec(self.controller.index.__func__) + expected = getargspec(self.controller.index.__func__) actual = util.getargspec(dec(True)(self.controller.index.__func__)) assert expected == actual - expected = inspect.getargspec(self.controller.static_index) + expected = getargspec(self.controller.static_index) actual = util.getargspec(dec(True)( self.controller.static_index)) assert expected == actual diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan/util.py new/pecan-1.2.1/pecan/util.py --- old/pecan-1.0.5/pecan/util.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/pecan/util.py 2016-09-27 02:05:11.000000000 +0200 @@ -1,8 +1,9 @@ -import inspect import sys import six +from pecan.compat import getargspec as _getargspec + def iscontroller(obj): return getattr(obj, 'exposed', False) @@ -14,7 +15,7 @@ for a method. """ - argspec = inspect.getargspec(method) + argspec = _getargspec(method) args = argspec[0] if args and args[0] == 'self': return argspec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/pecan.egg-info/PKG-INFO new/pecan-1.2.1/pecan.egg-info/PKG-INFO --- old/pecan-1.0.5/pecan.egg-info/PKG-INFO 2016-03-16 17:52:21.000000000 +0100 +++ new/pecan-1.2.1/pecan.egg-info/PKG-INFO 2016-09-27 02:09:24.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pecan -Version: 1.0.5 +Version: 1.2.1 Summary: A WSGI object-dispatching web framework, designed to be lean and fast, with few dependencies. Home-page: http://github.com/pecan/pecan Author: Jonathan LaCour @@ -25,6 +25,7 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Internet :: WWW/HTTP :: WSGI Classifier: Topic :: Software Development :: Libraries :: Application Frameworks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pecan-1.0.5/setup.py new/pecan-1.2.1/setup.py --- old/pecan-1.0.5/setup.py 2016-03-16 17:50:58.000000000 +0100 +++ new/pecan-1.2.1/setup.py 2016-09-27 02:06:12.000000000 +0200 @@ -3,7 +3,7 @@ from setuptools import setup, find_packages -version = '1.0.5' +version = '1.2.1' # # determine requirements @@ -91,6 +91,7 @@ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Internet :: WWW/HTTP :: WSGI', 'Topic :: Software Development :: Libraries :: Application Frameworks' ++++++ pull-request-91.patch ++++++From b45975931bba9808fe88f6931fcdeeb3d201cda8 Mon Sep 17 00:00:00 2001 From: Ryan Petrello
Date: Mon, 7 Aug 2017 22:19:49 -0400 Subject: [PATCH] fix broken py36 tests
--- .travis.yml | 6 ++++-- pecan/tests/test_conf.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) Index: pecan-1.2.1/pecan/tests/test_conf.py =================================================================== --- pecan-1.2.1.orig/pecan/tests/test_conf.py +++ pecan-1.2.1/pecan/tests/test_conf.py @@ -157,7 +157,7 @@ class TestConf(PecanTestCase): try: configuration.conf_from_file(f.name) - except (ValueError, SystemError) as e: + except (ValueError, SystemError, ImportError) as e: assert 'relative import' in str(e) else: raise AssertionError(