[Python-modules-commits] r16693 - in packages/pubtal/trunk/debian (6 files)
rodrigo at users.alioth.debian.org
rodrigo at users.alioth.debian.org
Fri Apr 22 03:25:09 UTC 2011
Date: Friday, April 22, 2011 @ 03:25:02
Author: rodrigo
Revision: 16693
Stop encoding text sent to Textile. Closes: #619531.
Since this involves adding a patch, move to source format 3.0.
Added:
packages/pubtal/trunk/debian/patches/
packages/pubtal/trunk/debian/patches/series
packages/pubtal/trunk/debian/patches/textile_plugin_update
Modified:
packages/pubtal/trunk/debian/changelog
packages/pubtal/trunk/debian/control
packages/pubtal/trunk/debian/source/format
Modified: packages/pubtal/trunk/debian/changelog
===================================================================
--- packages/pubtal/trunk/debian/changelog 2011-04-21 21:03:51 UTC (rev 16692)
+++ packages/pubtal/trunk/debian/changelog 2011-04-22 03:25:02 UTC (rev 16693)
@@ -1,3 +1,9 @@
+pubtal (3.3-3~1) UNRELEASED; urgency=low
+
+ * Stop encoding text sent to Textile. Closes: #619531.
+
+ -- Luis Rodrigo Gallardo Cruz <rodrigo at debian.org> Thu, 21 Apr 2011 19:59:07 -0700
+
pubtal (3.3-2) unstable; urgency=low
* prepare for the upcoming Python 2.6 transition, fixing the FTBFS when it'll
Modified: packages/pubtal/trunk/debian/control
===================================================================
--- packages/pubtal/trunk/debian/control 2011-04-21 21:03:51 UTC (rev 16692)
+++ packages/pubtal/trunk/debian/control 2011-04-22 03:25:02 UTC (rev 16693)
@@ -15,7 +15,7 @@
Architecture: all
XB-Python-Version: ${python:Versions}
Depends: ${python:Depends}, python-simpletal (>=4.1-6)
-Suggests: python-textile
+Suggests: python-textile (>=1:2.1.4)
Description: A template driven web site builder for small sites
PubTal uses the ZPT language from ZOPE and input plugins to
generate a web site, maintaining content separate from presentation.
Added: packages/pubtal/trunk/debian/patches/series
===================================================================
--- packages/pubtal/trunk/debian/patches/series (rev 0)
+++ packages/pubtal/trunk/debian/patches/series 2011-04-22 03:25:02 UTC (rev 16693)
@@ -0,0 +1 @@
+textile_plugin_update
Added: packages/pubtal/trunk/debian/patches/textile_plugin_update
===================================================================
--- packages/pubtal/trunk/debian/patches/textile_plugin_update (rev 0)
+++ packages/pubtal/trunk/debian/patches/textile_plugin_update 2011-04-22 03:25:02 UTC (rev 16693)
@@ -0,0 +1,50 @@
+Subject: Update the textile plugin to newer versions of textile
+Author: Rodrigo Gallardo <rodrigo at debian.org>
+Bug-Debian: http://bugs.debian.org/619531
+Forwarded: By private email to upstream author
+
+Since version 2.1.4 python-textile stopped doing character set
+conversion in the input or output texts. This means that the textile
+plugin can also stop doing conversions, and can instead simply hand
+off unicode to textile and get unicode back.
+
+Index: pubtal-3.3/optional-plugins/textileContent.py
+===================================================================
+--- pubtal-3.3.orig/optional-plugins/textileContent.py
++++ pubtal-3.3/optional-plugins/textileContent.py
+@@ -74,29 +74,13 @@
+
+ def getPageContext (self, page, template):
+ pageMap = SitePublisher.ContentPublisher.getPageContext (self, page, template)
+-
+- # We need to preserve the original character set because Textile does it's own conversion.
+- headers, rawContent = self.readHeadersAndContent(page, preserveCharacterSet = 1)
+- pageCharSet = page.getOption ('character-set', None)
+- if (pageCharSet is None):
+- pageCharSet = self.characterSet
+- pageCharSetDecoder = codecs.lookup (pageCharSet)[1]
+-
+- # Pass in the encoding of the file, and get output in utf-16
+- content = textile.textile (rawContent, encoding=pageCharSet, output="utf16")
+- # Now convert the body from utf16 back to Unicode
+- content = utf16Decoder (content)[0]
+- # Now convert al l the headers (would normally have been done in readHeadersAndContent)
+- convHeaders = {}
+- for headerName, headerValue in headers.items():
+- convHeaders [pageCharSetDecoder(headerName)[0]] = pageCharSetDecoder (headerValue)[0]
+-
++ headers, rawContent = self.readHeadersAndContent (page)
++ content = textile.textile (rawContent)
+ actualHeaders = pageMap ['headers']
+- actualHeaders.update (convHeaders)
++ actualHeaders.update (headers)
+ pageMap ['headers'] = actualHeaders
+ pageMap ['content'] = content
+- # Raw content wasn't converted
+- pageMap ['rawContent'] = pageCharSetDecoder (rawContent)[0]
++ pageMap ['rawContent'] = rawContent
+
+ return pageMap
+-
+\ No newline at end of file
++
Modified: packages/pubtal/trunk/debian/source/format
===================================================================
--- packages/pubtal/trunk/debian/source/format 2011-04-21 21:03:51 UTC (rev 16692)
+++ packages/pubtal/trunk/debian/source/format 2011-04-22 03:25:02 UTC (rev 16693)
@@ -1 +1 @@
-1.0
+3.0 (quilt)
More information about the Python-modules-commits
mailing list