Hello community, here is the log from the commit of package python-pyramid for openSUSE:Factory checked in at 2015-02-06 22:38:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyramid (Old) and /work/SRC/openSUSE:Factory/.python-pyramid.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyramid" Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyramid/python-pyramid.changes 2014-02-02 22:21:38.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-pyramid.new/python-pyramid.changes 2015-02-06 22:38:21.000000000 +0100 @@ -1,0 +2,522 @@ +Fri Feb 6 16:31:11 UTC 2015 - [email protected] + +- fix python-venusian version: 1.0a3 is greater than 1.0 unfortunately + +------------------------------------------------------------------- +Tue Feb 3 17:45:55 UTC 2015 - [email protected] + +- Update year +- Implement update-alternatives for compatibility with an unpcoming + python 3 version +- Removed dependencies that are not longer needed. + +------------------------------------------------------------------- +Fri Dec 12 20:20:57 UTC 2014 - [email protected] + +- Update to version 1.5.2 + - ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise + ``ValueError`` when accidentally passed ``None``. + See https://github.com/Pylons/pyramid/pull/1320 + - Work around a bug introduced in Python 2.7.7 on Windows where + ``mimetypes.guess_type`` returns Unicode rather than str for the content + type, unlike any previous version of Python. See + https://github.com/Pylons/pyramid/issues/1360 for more information. + - Update scaffold generating machinery to return the version of pyramid and + pyramid docs for use in scaffolds. Updated starter, alchemy and zodb + templates to have links to correctly versioned documentation and reflect + which pyramid was used to generate the scaffold. + - Fix an issue whereby predicates would be resolved as maybe_dotted in the + introspectable but not when passed for registration. This would mean that + ``add_route_predicate`` for example can not take a string and turn it into + the actual callable function. + See https://github.com/Pylons/pyramid/pull/1306 + - Fix ``pyramid.testing.setUp`` to return a ``Configurator`` with a proper + package. Previously it was not possible to do package-relative includes + using the returned ``Configurator`` during testing. There is now a + ``package`` argument that can override this behavior as well. + See https://github.com/Pylons/pyramid/pull/1322 + - Removed non-ascii copyright symbol from templates, as this was + causing the scaffolds to fail for project generation on some systems. + - Fix an issue where a ``pyramid.response.FileResponse`` may apply a charset + where it does not belong. See https://github.com/Pylons/pyramid/pull/1251 + - Avoid crash in ``pserve --reload`` under Py3k, when iterating over possibly + mutated ``sys.modules``. + - ``UnencryptedCookieSessionFactoryConfig`` failed if the secret contained + higher order characters. See https://github.com/Pylons/pyramid/issues/1246 + - Fixed a bug in ``UnencryptedCookieSessionFactoryConfig`` and + ``SignedCookieSessionFactory`` where ``timeout=None`` would cause a new + session to always be created. Also in ``SignedCookieSessionFactory`` a + ``reissue_time=None`` would cause an exception when modifying the session. + See https://github.com/Pylons/pyramid/issues/1247 + - Updated docs and scaffolds to keep in step with new 2.0 release of + ``Lingua``. This included removing all ``setup.cfg`` files from scaffolds + and documentation environments. + - We no longer eagerly clear ``request.exception`` and ``request.exc_info`` in + the exception view tween. This makes it possible to inspect exception + information within a finished callback. See + https://github.com/Pylons/pyramid/issues/1223. + - Updated scaffolds with new theme, fixed documentation and sample project. + - Depend on a newer version of WebOb so that we pull in some crucial bug-fixes + that were showstoppers for functionality in Pyramid. + - Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax + errors for old IE versions. See https://github.com/Pylons/pyramid/pull/1205 + - Fix a memory leak when the configurator's ``set_request_property`` method was + used or when the configurator's ``add_request_method`` method was used with + the ``property=True`` attribute. See + https://github.com/Pylons/pyramid/issues/1212 . + - An authorization API has been added as a method of the + request: ``request.has_permission``. + ``request.has_permission`` is a method-based alternative to the + ``pyramid.security.has_permission`` API and works exactly the same. The + older API is now deprecated. + - Property API attributes have been added to the request for easier access to + authentication data: ``request.authenticated_userid``, + ``request.unauthenticated_userid``, and ``request.effective_principals``. + These are analogues, respectively, of + ``pyramid.security.authenticated_userid``, + ``pyramid.security.unauthenticated_userid``, and + ``pyramid.security.effective_principals``. They operate exactly the same, + except they are attributes of the request instead of functions accepting a + request. They are properties, so they cannot be assigned to. The older + function-based APIs are now deprecated. + - Pyramid's console scripts (``pserve``, ``pviews``, etc) can now be run + directly, allowing custom arguments to be sent to the python interpreter + at runtime. For example:: + python -3 -m pyramid.scripts.pserve development.ini + - Added a specific subclass of ``HTTPBadRequest`` named + ``pyramid.exceptions.BadCSRFToken`` which will now be raised in response + to failures in ``check_csrf_token``. + See https://github.com/Pylons/pyramid/pull/1149 + - Added a new ``SignedCookieSessionFactory`` which is very similar to the + ``UnencryptedCookieSessionFactoryConfig`` but with a clearer focus on signing + content. The custom serializer arguments to this function should only focus + on serializing, unlike its predecessor which required the serializer to also + perform signing. See https://github.com/Pylons/pyramid/pull/1142 . Note + that cookies generated using ``SignedCookieSessionFactory`` are not + compatible with cookies generated using ``UnencryptedCookieSessionFactory``, + so existing user session data will be destroyed if you switch to it. + - Added a new ``BaseCookieSessionFactory`` which acts as a generic cookie + factory that can be used by framework implementors to create their own + session implementations. It provides a reusable API which focuses strictly + on providing a dictionary-like object that properly handles renewals, + timeouts, and conformance with the ``ISession`` API. + See https://github.com/Pylons/pyramid/pull/1142 + - The anchor argument to ``pyramid.request.Request.route_url`` and + ``pyramid.request.Request.resource_url`` and their derivatives will now be + escaped via URL quoting to ensure minimal conformance. See + https://github.com/Pylons/pyramid/pull/1183 + - Allow sending of ``_query`` and ``_anchor`` options to + ``pyramid.request.Request.static_url`` when an external URL is being + generated. + See https://github.com/Pylons/pyramid/pull/1183 + - You can now send a string as the ``_query`` argument to + ``pyramid.request.Request.route_url`` and + ``pyramid.request.Request.resource_url`` and their derivatives. When a + string is sent instead of a list or dictionary. it is URL-quoted however it + does not need to be in ``k=v`` form. This is useful if you want to be able + to use a different query string format than ``x-www-form-urlencoded``. See + https://github.com/Pylons/pyramid/pull/1183 + - ``pyramid.testing.DummyRequest`` now has a ``domain`` attribute to match the + new WebOb 1.3 API. Its value is ``example.com``. + - Fix the ``pcreate`` script so that when the target directory name ends with a + slash it does not produce a non-working project directory structure. + Previously saying ``pcreate -s starter /foo/bar/`` produced different output + than saying ``pcreate -s starter /foo/bar``. The former did not work + properly. + - Fix the ``principals_allowed_by_permission`` method of + ``ACLAuthorizationPolicy`` so it anticipates a callable ``__acl__`` + on resources. Previously it did not try to call the ``__acl__`` + if it was callable. + - The ``pviews`` script did not work when a url required custom request + methods in order to perform traversal. Custom methods and descriptors added + via ``pyramid.config.Configurator.add_request_method`` will now be present, + allowing traversal to continue. + See https://github.com/Pylons/pyramid/issues/1104 + - Remove unused ``renderer`` argument from ``Configurator.add_route``. + - Allow the ``BasicAuthenticationPolicy`` to work with non-ascii usernames + and passwords. The charset is not passed as part of the header and different + browsers alternate between UTF-8 and Latin-1, so the policy now attempts + to decode with UTF-8 first, and will fallback to Latin-1. + See https://github.com/Pylons/pyramid/pull/1170 + - The ``@view_defaults`` now apply to notfound and forbidden views + that are defined as methods of a decorated class. + See https://github.com/Pylons/pyramid/issues/1173 + - The key/values in the ``_query`` parameter of ``request.route_url`` and the + ``query`` parameter of ``request.resource_url`` (and their variants), used + to encode a value of ``None`` as the string ``'None'``, leaving the resulting + query string to be ``a=b&key=None``. The value is now dropped in this + situation, leaving a query string of ``a=b&key=``. + See https://github.com/Pylons/pyramid/issues/1119 + - Deprecate the ``pyramid.interfaces.ITemplateRenderer`` interface. It was + ill-defined and became unused when Mako and Chameleon template bindings were + split into their own packages. + - The ``pyramid.session.UnencryptedCookieSessionFactoryConfig`` API has been + deprecated and is superseded by the + ``pyramid.session.SignedCookieSessionFactory``. Note that while the cookies + generated by the ``UnencryptedCookieSessionFactoryConfig`` + are compatible with cookies generated by old releases, cookies generated by + the SignedCookieSessionFactory are not. See + https://github.com/Pylons/pyramid/pull/1142 + - The ``pyramid.security.has_permission`` API is now deprecated. Instead, use + the newly-added ``has_permission`` method of the request object. + - The ``pyramid.security.effective_principals`` API is now deprecated. + Instead, use the newly-added ``effective_principals`` attribute of the + request object. + - The ``pyramid.security.authenticated_userid`` API is now deprecated. + Instead, use the newly-added ``authenticated_userid`` attribute of the + request object. + - The ``pyramid.security.unauthenticated_userid`` API is now deprecated. + Instead, use the newly-added ``unauthenticated_userid`` attribute of the + request object. + - Pyramid now depends on WebOb>=1.3 (it uses ``webob.cookies.CookieProfile`` + from 1.3+). + - Users can now provide dotted Python names to as the ``factory`` argument + the Configurator methods named ``add_{view,route,subscriber}_predicate`` + (instead of passing the predicate factory directly, you can pass a + dotted name which refers to the factory). + - Fix an exception in ``pyramid.path.package_name`` when resolving the package + name for namespace packages that had no ``__file__`` attribute. + - Pyramid no longer depends on or configures the Mako and Chameleon templating + system renderers by default. Disincluding these templating systems by + default means that the Pyramid core has fewer dependencies and can run on + future platforms without immediate concern for the compatibility of its + templating add-ons. It also makes maintenance slightly more effective, as + different people can maintain the templating system add-ons that they + understand and care about without needing commit access to the Pyramid core, + and it allows users who just don't want to see any packages they don't use + come along for the ride when they install Pyramid. + This means that upon upgrading to Pyramid 1.5a2+, projects that use either + of these templating systems will see a traceback that ends something like + this when their application attempts to render a Chameleon or Mako template:: + ValueError: No such renderer factory .pt + Or:: + ValueError: No such renderer factory .mako + Or:: + ValueError: No such renderer factory .mak + Support for Mako templating has been moved into an add-on package named + ``pyramid_mako``, and support for Chameleon templating has been moved into ++++ 325 more lines (skipped) ++++ between /work/SRC/openSUSE:Factory/python-pyramid/python-pyramid.changes ++++ and /work/SRC/openSUSE:Factory/.python-pyramid.new/python-pyramid.changes Old: ---- pyramid-1.4.5.tar.gz New: ---- fix_mimetype_tests.patch pyramid-1.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyramid.spec ++++++ --- /var/tmp/diff_new_pack.nUzNDL/_old 2015-02-06 22:38:22.000000000 +0100 +++ /var/tmp/diff_new_pack.nUzNDL/_new 2015-02-06 22:38:22.000000000 +0100 @@ -1,8 +1,8 @@ # # spec file for package python-pyramid # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. -# Copyright (c) 2013 LISA GmbH, Bingen, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,31 +18,28 @@ Name: python-pyramid -Version: 1.4.5 +Version: 1.5.2 Release: 0 Url: http://pylonsproject.org Summary: The Pyramid web application development framework, a Pylons project License: BSD-4-Clause and ZPL-2.1 and MIT Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/p/pyramid/pyramid-%{version}.tar.gz -Requires: python-Chameleon >= 1.2.3 -Requires: python-Mako >= 0.3.6 +Patch1: fix_mimetype_tests.patch Requires: python-PasteDeploy >= 1.5.0 -Requires: python-WebOb >= 1.2b3 +Requires: python-WebOb >= 1.3.1 Requires: python-repoze.lru >= 0.4 Requires: python-translationstring >= 0.4 -Requires: python-venusian >= 1.0a3 +Requires: python-venusian >= 1.0 Requires: python-zope.deprecation >= 3.5.0 Requires: python-zope.interface >= 3.8.0 BuildRequires: fdupes -BuildRequires: python-Chameleon >= 1.2.3 -BuildRequires: python-Mako >= 0.3.6 BuildRequires: python-PasteDeploy >= 1.5.0 -BuildRequires: python-WebOb >= 1.2b3 +BuildRequires: python-WebOb >= 1.3.1 BuildRequires: python-repoze.lru >= 0.4 BuildRequires: python-setuptools BuildRequires: python-translationstring >= 0.4 -BuildRequires: python-venusian >= 1.0a3 +BuildRequires: python-venusian >= 1.0 BuildRequires: python-zope.deprecation >= 3.5.0 BuildRequires: python-zope.interface >= 3.8.0 # Documentation requirements: @@ -56,7 +53,8 @@ BuildRequires: python-nose BuildRequires: python-zope.component >= 3.11.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build - +Requires(post): update-alternatives +Requires(postun): update-alternatives %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()")} BuildRequires: python-ordereddict @@ -85,6 +83,7 @@ %prep %setup -q -n pyramid-%{version} +%patch1 -p1 %build python setup.py build @@ -95,20 +94,81 @@ rm -rf %{buildroot}%{python_sitelib}/pyramid/tests # Big, hidden files, fdupes -> don't package %fdupes %{buildroot}%{python_sitelib} +# move executables to python-specific names +mv %{buildroot}%{_bindir}/pcreate %{buildroot}%{_bindir}/pcreate-%{py_ver} +mv %{buildroot}%{_bindir}/pdistreport %{buildroot}%{_bindir}/pdistreport-%{py_ver} +mv %{buildroot}%{_bindir}/prequest %{buildroot}%{_bindir}/prequest-%{py_ver} +mv %{buildroot}%{_bindir}/proutes %{buildroot}%{_bindir}/proutes-%{py_ver} +mv %{buildroot}%{_bindir}/pserve %{buildroot}%{_bindir}/pserve-%{py_ver} +mv %{buildroot}%{_bindir}/pshell %{buildroot}%{_bindir}/pshell-%{py_ver} +mv %{buildroot}%{_bindir}/ptweens %{buildroot}%{_bindir}/ptweens-%{py_ver} +mv %{buildroot}%{_bindir}/pviews %{buildroot}%{_bindir}/pviews-%{py_ver} + +# Prepare for update-alternatives usage +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +touch %{buildroot}%{_sysconfdir}/alternatives/pcreate +touch %{buildroot}%{_sysconfdir}/alternatives/pdistreport +touch %{buildroot}%{_sysconfdir}/alternatives/prequest +touch %{buildroot}%{_sysconfdir}/alternatives/proutes +touch %{buildroot}%{_sysconfdir}/alternatives/pserve +touch %{buildroot}%{_sysconfdir}/alternatives/pshell +touch %{buildroot}%{_sysconfdir}/alternatives/ptweens +touch %{buildroot}%{_sysconfdir}/alternatives/pviews +ln -s -f %{_sysconfdir}/alternatives/pcreate %{buildroot}%{_bindir}/pcreate +ln -s -f %{_sysconfdir}/alternatives/pdistreport %{buildroot}%{_bindir}/pdistreport +ln -s -f %{_sysconfdir}/alternatives/prequest %{buildroot}%{_bindir}/prequest +ln -s -f %{_sysconfdir}/alternatives/proutes %{buildroot}%{_bindir}/proutes +ln -s -f %{_sysconfdir}/alternatives/pserve %{buildroot}%{_bindir}/pserve +ln -s -f %{_sysconfdir}/alternatives/pshell %{buildroot}%{_bindir}/pshell +ln -s -f %{_sysconfdir}/alternatives/ptweens %{buildroot}%{_bindir}/ptweens +ln -s -f %{_sysconfdir}/alternatives/pviews %{buildroot}%{_bindir}/pviews + %check -python setup.py nosetests --with-coverage +LANG=en_US.UTF-8 python setup.py nosetests --with-coverage -vvv + +%post +update-alternatives \ + --install %{_bindir}/pcreate pcreate %{_bindir}/pcreate-%{py_ver} 30 \ + --slave %{_bindir}/pdistreport pdistreport %{_bindir}/pdistreport-%{py_ver} \ + --slave %{_bindir}/prequest prequest %{_bindir}/prequest-%{py_ver} \ + --slave %{_bindir}/proutes proutes %{_bindir}/proutes-%{py_ver} \ + --slave %{_bindir}/pserve pserve %{_bindir}/pserve-%{py_ver} \ + --slave %{_bindir}/pshell pshell %{_bindir}/pshell-%{py_ver} \ + --slave %{_bindir}/ptweens ptweens %{_bindir}/ptweens-%{py_ver} \ + --slave %{_bindir}/pviews pviews %{_bindir}/pviews-%{py_ver} + +%preun +if [ $1 -eq 0 ] ; then + update-alternatives --remove pcreate %{_bindir}/pcreate-%{py_ver} +fi %files %defattr(-,root,root,-) %doc *.txt *.rst -%{_bindir}/bfg2pyramid %{_bindir}/pcreate +%{_bindir}/pdistreport %{_bindir}/prequest %{_bindir}/proutes %{_bindir}/pserve %{_bindir}/pshell %{_bindir}/ptweens %{_bindir}/pviews +%{_bindir}/pcreate-%{py_ver} +%{_bindir}/pdistreport-%{py_ver} +%{_bindir}/prequest-%{py_ver} +%{_bindir}/proutes-%{py_ver} +%{_bindir}/pserve-%{py_ver} +%{_bindir}/pshell-%{py_ver} +%{_bindir}/ptweens-%{py_ver} +%{_bindir}/pviews-%{py_ver} +%ghost %{_sysconfdir}/alternatives/pcreate +%ghost %{_sysconfdir}/alternatives/pdistreport +%ghost %{_sysconfdir}/alternatives/prequest +%ghost %{_sysconfdir}/alternatives/proutes +%ghost %{_sysconfdir}/alternatives/pserve +%ghost %{_sysconfdir}/alternatives/pshell +%ghost %{_sysconfdir}/alternatives/ptweens +%ghost %{_sysconfdir}/alternatives/pviews %{python_sitelib}/* %files doc ++++++ fix_mimetype_tests.patch ++++++ commit 7a76cd0b183d5080ec863a7d494008e65469f683 Author: Domen Kožar <[email protected]> Date: Tue Nov 11 08:02:09 2014 +0100 fixes #1405 diff --git a/pyramid/tests/test_response.py b/pyramid/tests/test_response.py index a16eb8d..84ec577 100644 --- a/pyramid/tests/test_response.py +++ b/pyramid/tests/test_response.py @@ -1,4 +1,5 @@ import io +import mimetypes import os import unittest from pyramid import testing @@ -51,15 +52,11 @@ class TestFileResponse(unittest.TestCase): r.app_iter.close() def test_without_content_type(self): - for suffix, content_type in ( - ('txt', 'text/plain; charset=UTF-8'), - ('xml', 'application/xml; charset=UTF-8'), - ('pdf', 'application/pdf') - ): + for suffix in ('txt', 'xml', 'pdf'): path = self._getPath(suffix) r = self._makeOne(path) - self.assertEqual(r.content_type, content_type.split(';')[0]) - self.assertEqual(r.headers['content-type'], content_type) + self.assertEqual(r.headers['content-type'].split(';')[0], + mimetypes.guess_type(path, strict=False)[0]) r.app_iter.close() def test_python_277_bug_15207(self): ++++++ pyramid-1.4.5.tar.gz -> pyramid-1.5.2.tar.gz ++++++ ++++ 48380 lines of diff (skipped) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
