--- pylons-0.9.5.orig/debian/changelog +++ pylons-0.9.5/debian/changelog @@ -0,0 +1,98 @@ +pylons (0.9.5-6) unstable; urgency=low + + * debian/control: Added a dependency on dpatch. + * debian/rules: Added rules to handle source patching at build-time using + dpatch. + * debian/patches/01-validate_unicode.dpatch: To fix a unicode validation + problem added a patch provided by "Dwayne C. Litzenberger" + (Closes: #427672). + + -- Oleksandr Moskalenko Tue, 05 Jun 2007 13:07:05 -0600 + +pylons (0.9.5-5) unstable; urgency=low + + * debian/control: Added python-mako to depends (Closes: #425332). + + -- Oleksandr Moskalenko Mon, 21 May 2007 13:10:30 -0600 + +pylons (0.9.5-4) unstable; urgency=low + + * Updated rules and control for new python-support with automated .egg.info + rename (Closes: #423793). + + -- Oleksandr Moskalenko Mon, 14 May 2007 09:26:54 -0600 + +pylons (0.9.5-3) unstable; urgency=low + + * Upload into unstable now that python-decorator is through the NEW queue. + * debian/control: Added a dependency on python-decorator. + + -- Oleksandr Moskalenko Mon, 07 May 2007 15:38:33 -0600 + +pylons (0.9.5-2) experimental; urgency=low + + * debian/control: Temporarily removed the dependency on python-decorator. I + suppose having pylons uninstallable won't help people to see the README + about the decorator package. + + -- Oleksandr Moskalenko Fri, 13 Apr 2007 19:31:07 -0600 + +pylons (0.9.5-1) experimental; urgency=low + + * New upstream release. + * README.Debian: Added a readme about where to obtain python-decorator + package needed by this pylons release. + * debian/control: Added a dependency on python-decorator. Pylons is not + going to be installable until decorator gets through the NEW queue, so I"m + uploading it to the experimental and making python-decorator available + separately. See README.Debian for complete information. + + -- Oleksandr Moskalenko Fri, 13 Apr 2007 12:28:12 -0600 + +pylons (0.9.4.1-4) unstable; urgency=low + + * Etch is released. Upload into unstable. + + -- Oleksandr Moskalenko Tue, 10 Apr 2007 12:32:29 -0600 + +pylons (0.9.4.1-3) experimental; urgency=low + + * Updated package dependencies (Closes: #413514). + + -- Oleksandr Moskalenko Mon, 5 Mar 2007 10:13:47 -0700 + +pylons (0.9.4.1-2) experimental; urgency=low + + * debian/control: + - Added XS-Vcs-Svn and XS-Vcs-Browser control fields. + + -- Oleksandr Moskalenko Mon, 29 Jan 2007 18:29:13 -0700 + +pylons (0.9.4.1-1) experimental; urgency=low + + * New upstream version bugfix release. + + -- Oleksandr Moskalenko Mon, 22 Jan 2007 10:32:11 -0700 + +pylons (0.9.4-1) experimental; urgency=low + + * New upstream version (Closes: #406649). + * debian/control: + - Updated version dependencies that changed with 0.9.4. + - I joined the Debian Python Modules Team, so added + to Uploaders. + + -- Oleksandr Moskalenko Fri, 12 Jan 2007 10:23:16 -0700 + +pylons (0.9.3-2) unstable; urgency=low + + * Fix a typo in package description (Closes: #402518). + + -- Oleksandr Moskalenko Thu, 14 Dec 2006 08:12:28 -0700 + +pylons (0.9.3-1) unstable; urgency=low + + * Initial release (Closes: #392482). + + -- Oleksandr Moskalenko Sun, 12 Nov 2006 21:44:37 -0700 + --- pylons-0.9.5.orig/debian/control +++ pylons-0.9.5/debian/control @@ -0,0 +1,22 @@ +Source: pylons +Section: web +Priority: optional +Maintainer: Oleksandr Moskalenko +Uploaders: Debian Python Modules Team +Build-Depends: debhelper (>= 5), python (>= 2.3.3), python-all-dev, python-support (>= 0.6.4), python-setuptools (>= 0.6b3-1), dpatch +Standards-Version: 3.7.2 +XS-Python-Version: all +XS-Vcs-Svn: svn://svn.debian.org/python-modules/packages/pylons/trunk/ +XS-Vcs-Browser: http://svn.debian.org/wsvn/python-modules/packages/pylons/trunk/?op=log + +Package: python-pylons +Architecture: all +Depends: ${python:Depends}, python, python-routes ( >= 1.6.2), python-myghty ( >= 1.1 ), python-paste ( >= 1.1.1 ), python-pastedeploy ( >= 1.0 ), python-pastescript ( >= 1.0 ), python-formencode ( >= 0.6 ), python-simplejson ( >= 1.4 ), python-webhelpers ( >= 0.2.2 ), python-nose ( >= 0.9.1 ), python-beaker ( >= 0.6.2 ), python-decorator, python-mako +Recommends: python-sqlalchemy | python-sqlobject +XB-Python-Version: ${python:Versions} +Description: Python web framework emphasizing flexibility and rapid development + Pylons combines the very best ideas from the worlds of Ruby, Python and Perl, + providing a structured but extremely flexible Python web framework. It's also + one of the first projects to leverage the emerging WSGI standard, which allows + extensive re-use and flexibility, but only if you need it. Out of the box, + Pylons aims to make web development fast, flexible and easy. --- pylons-0.9.5.orig/debian/dirs +++ pylons-0.9.5/debian/dirs @@ -0,0 +1 @@ +usr/share/python-support/python-pylons --- pylons-0.9.5.orig/debian/compat +++ pylons-0.9.5/debian/compat @@ -0,0 +1 @@ +5 --- pylons-0.9.5.orig/debian/watch +++ pylons-0.9.5/debian/watch @@ -0,0 +1,4 @@ +# Compulsory line, this is a version 3 file +version=3 + +http://cheeseshop.python.org/packages/source/P/Pylons/Pylons-(.*)\.tar\.gz --- pylons-0.9.5.orig/debian/patches/00list +++ pylons-0.9.5/debian/patches/00list @@ -0,0 +1 @@ +01_validate_unicode.dpatch --- pylons-0.9.5.orig/debian/patches/01_validate_unicode.dpatch +++ pylons-0.9.5/debian/patches/01_validate_unicode.dpatch @@ -0,0 +1,145 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_validate_unicode.dpatch by Oleksandr Moskalenko +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Patch to fix a unicode issue + +@DPATCH@ + +diff -ruN pylons-0.9.5/CHANGELOG pylons-0.9.5/CHANGELOG +--- pylons-0.9.5/CHANGELOG 2007-04-12 17:27:57.000000000 -0600 ++++ pylons-0.9.5/CHANGELOG 2007-06-05 11:29:11.000000000 -0600 +@@ -1,6 +1,15 @@ + Pylons Changelog + ================= + ++Backported from SVN repository (Jun 5th, 2007 - Debian) ++* Fixed the validate decorator triggering the following error with ++ FormEncode>=0.7 and non-ascii rendered form content: ++ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ++ ordinal not in range(128) the form was passed in as an encoded string, but ++ some data or error messages were unicode strings; the form should be passed ++ in as a unicode string ++ Reported by Christoph Haas. ++ + 0.9.5 (Apr 11th, 2007) + * Fixed a Python 2.3 incompatibility with paster shell, causing the + Exception: +diff -ruN pylons-0.9.5/pylons/decorators/__init__.py pylons-0.9.5/pylons/decorators/__init__.py +--- pylons-0.9.5/pylons/decorators/__init__.py 2007-04-12 17:17:54.000000000 -0600 ++++ pylons-0.9.5/pylons/decorators/__init__.py 2007-06-05 11:29:11.000000000 -0600 +@@ -1,7 +1,7 @@ + """Pylons Decorators: ``jsonify``, ``validate``, REST, and Cache decorators""" + import simplejson as json + import sys +-from paste.util.multidict import UnicodeMultiDict ++from paste.util.multidict import MultiDict + + from decorator import decorator + +@@ -95,17 +95,35 @@ + pylons.request.environ['pylons.routes_dict']['action'] = form + response = self._dispatch_call() + form_content = ''.join(response.content) +- if isinstance(params, UnicodeMultiDict) and \ +- not isinstance(form_content, unicode): ++ if isinstance(params, MultiDict): ++ # Passing raw string form values to htmlfill: Ensure ++ # form_content and FormEncode's errors dict are also raw ++ # strings so htmlfill can safely combine them ++ encoding = determine_response_charset(response) ++ # WSGIResponse's content may (unlikely) be unicode ++ if isinstance(form_content, unicode): ++ form_content = form_content.encode(encoding) ++ # FormEncode>=0.7 error strings are unicode (due to being ++ # localized via ugettext) ++ for key, value in errors.iteritems(): ++ if isinstance(value, unicode): ++ errors[key] = value.encode(encoding) ++ elif not isinstance(form_content, unicode): + # Passing unicode form values to htmlfill: decode the response + # to unicode so htmlfill can safely combine the two +- encoding = response.determine_charset() +- if encoding is None: +- encoding = sys.getdefaultencoding() ++ encoding = determine_response_charset(response) + form_content = form_content.decode(encoding, response.errors) + response.content = [htmlfill.render(form_content, params, errors)] + return response + return func(self, *args, **kwargs) + return decorator(wrapper) + ++def determine_response_charset(response): ++ """Determine the charset of the specified Response object, returning the ++ default system encoding when none is set""" ++ charset = response.determine_charset() ++ if charset is None: ++ charset = sys.getdefaultencoding() ++ return charset ++ + __all__ = ['jsonify', 'validate'] +diff -ruN pylons-0.9.5/tests/test_units/test_decorator_validate.py pylons-0.9.5/tests/test_units/test_decorator_validate.py +--- pylons-0.9.5/tests/test_units/test_decorator_validate.py 1969-12-31 18:00:00.000000000 -0600 ++++ pylons-0.9.5/tests/test_units/test_decorator_validate.py 2007-06-05 11:29:11.000000000 -0600 +@@ -0,0 +1,61 @@ ++# -*- coding: utf-8 -*- ++from paste.fixture import TestApp ++from paste.registry import RegistryManager ++ ++from pylons import Response ++from pylons.decorators import validate ++ ++from pylons.controllers import WSGIController ++ ++from __init__ import ControllerWrap, SetupCacheGlobal, TestWSGIController ++ ++import formencode ++ ++class DhcpZoneForm(formencode.Schema): ++ allow_extra_fields = True ++ filter_extra_fields = True ++ new_network = formencode.validators.URL(not_empty=True) ++ ++class ValidatingController(WSGIController): ++ def new(self): ++ return Response(""" ++ ++
++ ++ ++ ++ ++ ++
Network ++ ++
++ ++
++ ++ """) ++ ++ def test_str_params_unicode_fe_errors(self): ++ return Response('Your network is: %s' % ++ self.form_result.get('new_network')) ++ test_str_params_unicode_fe_errors = \ ++ validate(schema=DhcpZoneForm, form='new')(test_str_params_unicode_fe_errors) ++ ++class TestValidateDecorator(TestWSGIController): ++ def setUp(self): ++ TestWSGIController.setUp(self) ++ app = SetupCacheGlobal(ControllerWrap(ValidatingController), ++ self.environ, setup_cache=False) ++ app = RegistryManager(app) ++ self.app = TestApp(app) ++ ++ def test_validated(self): ++ response = self.post_response(action='test_str_params_unicode_fe_errors', ++ new_network='http://pylonshq.com/') ++ assert 'Your network is: http://pylonshq.com/' in response ++ ++ def test_failed_validation_non_ascii(self): ++ response = self.post_response(action='test_str_params_unicode_fe_errors', ++ new_network='РПссО́я') ++ print response ++ assert 'That is not a valid URL' in response ++ assert 'РПссО́я' in response --- pylons-0.9.5.orig/debian/README.Debian +++ pylons-0.9.5/debian/README.Debian @@ -0,0 +1,9 @@ +python-pylons +------------- + +I don't want to make pylons uninstallable while decorator is sitting in the +NEW queue, so I'm uploading pylons into experimental and making the required +python-decorator package available from my own web space at +http://debian.tagancha.org/download/python-decorator_2.0.1-1_all.deb Use "dget +http://debian.tagancha.org/download/decorator_2.0.1-1.dsc" if you'd like to +get the source and build the package on your own. --- pylons-0.9.5.orig/debian/copyright +++ pylons-0.9.5/debian/copyright @@ -0,0 +1,79 @@ +This package was debianized by Oleksandr Moskalenko on +Fri, 13 Oct 2006 01:17:01 -0600. + +It was downloaded from + +Upstream Authors: Ben Bangert and James Gardner +. + +Copyright: Copyright (c) 2005 Ben Bangert, James Gardner + + All rights reserved. + +License: + + This package is licensed under the 3-clause BSD License. + + On Debian GNU/Linux systems, the complete text of the BSD license can be + found in `/usr/share/common-licenses/BSD'. + + + pylons/i18n/msgfmt.py and pylons/i18n/pygettext.py are are from the Python + 2.4 source distribution which is released under the open source PSF license + at http://www.python.org/download/releases/2.4.4/license/. + + PSF LICENSE AGREEMENT FOR PYTHON 2.4 + ------------------------------------ + + 1. This LICENSE AGREEMENT is between the Python Software Foundation + ("PSF"), and the Individual or Organization ("Licensee") accessing and + otherwise using Python 2.4 software in source or binary form and its + associated documentation. + + 2. Subject to the terms and conditions of this License Agreement, PSF + hereby grants Licensee a nonexclusive, royalty-free, world-wide + license to reproduce, analyze, test, perform and/or display publicly, + prepare derivative works, distribute, and otherwise use Python 2.4 + alone or in any derivative version, provided, however, that PSF's + License Agreement and PSF's notice of copyright, i.e., "Copyright (c) + 2001, 2002, 2003, 2004 Python Software Foundation; All Rights Reserved" + are retained in Python 2.4 alone or in any derivative version prepared + by Licensee. + + 3. In the event Licensee prepares a derivative work that is based on + or incorporates Python 2.4 or any part thereof, and wants to make + the derivative work available to others as provided herein, then + Licensee hereby agrees to include in any such work a brief summary of + the changes made to Python 2.4. + + 4. PSF is making Python 2.4 available to Licensee on an "AS IS" + basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR + IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND + DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS + FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.4 WILL NOT + INFRINGE ANY THIRD PARTY RIGHTS. + + 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON + 2.4 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS + A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.4, + OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + + 6. This License Agreement will automatically terminate upon a material + breach of its terms and conditions. + + 7. Nothing in this License Agreement shall be deemed to create any + relationship of agency, partnership, or joint venture between PSF and + Licensee. This License Agreement does not grant permission to use PSF + trademarks or trade name in a trademark sense to endorse or promote + products or services of Licensee, or any third party. + + 8. By copying, installing or otherwise using Python 2.4, Licensee + agrees to be bound by the terms and conditions of this License + Agreement. + + + Debian packaging: + + The Debian packaging is (C) 2006, Oleksandr Moskalenko and + is licensed under the GPL. On Debian GNU/Linux systems, the complete text of + the GPL license can be found in `/usr/share/common-licenses/GPL'. --- pylons-0.9.5.orig/debian/rules +++ pylons-0.9.5/debian/rules @@ -0,0 +1,61 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 +package=python-pylons + +unpatch: + dpatch deapply-all + rm -rf patch-stamp debian/patched + +clean: unpatch + rm -f build-* + dh_testdir + dh_testroot + python setup.py clean + rm -rf build + find . -name *\.py[co] -exec rm -f {} \; + dh_clean + +build-stamp: + dh_testdir + python setup.py build + touch $@ + +patch-stamp: + dpatch apply-all + touch patch-stamp + +build: patch-stamp build-stamp + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + python setup.py install \ + --no-compile \ + --single-version-externally-managed \ + --root $(CURDIR)/debian/$(package) + +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_strip + dh_compress -X.py + dh_fixperms + dh_pysupport + chmod 644 `find debian/$(package) -type f -perm 755` + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure