[Python-modules-commits] r22471 - in packages/python-markdown/trunk/debian (7 files)

mitya57-guest at users.alioth.debian.org mitya57-guest at users.alioth.debian.org
Sun Jul 29 10:15:15 UTC 2012


    Date: Sunday, July 29, 2012 @ 10:15:14
  Author: mitya57-guest
Revision: 22471

* New upstream release
* Adjust to upstream documentation changes
* Don't compress text files that go with the documentation
* git_fix_inline_html.patch: dropped, applied in the new release
* git_fix_tests.patch: patch from upstream git to fix test suite failures

Added:
  packages/python-markdown/trunk/debian/patches/git_fix_tests.patch
Modified:
  packages/python-markdown/trunk/debian/changelog
  packages/python-markdown/trunk/debian/patches/series
  packages/python-markdown/trunk/debian/python-markdown-doc.doc-base
  packages/python-markdown/trunk/debian/python-markdown-doc.docs
  packages/python-markdown/trunk/debian/rules
Deleted:
  packages/python-markdown/trunk/debian/patches/git_fix_inline_html.patch

Modified: packages/python-markdown/trunk/debian/changelog
===================================================================
--- packages/python-markdown/trunk/debian/changelog	2012-07-28 19:15:43 UTC (rev 22470)
+++ packages/python-markdown/trunk/debian/changelog	2012-07-29 10:15:14 UTC (rev 22471)
@@ -1,6 +1,11 @@
-python-markdown (2.1.1-4) UNRELEASED; urgency=low
+python-markdown (2.2.0-1) UNRELEASED; urgency=low
 
+  * New upstream release
   * Recommend python[3]-pygments packages (needed for codehilite extension)
+  * Adjust to upstream documentation changes
+  * Don't compress text files that go with the documentation
+  * git_fix_inline_html.patch: dropped, applied in the new release
+  * git_fix_tests.patch: patch from upstream git to fix test suite failures
 
  -- Dmitry Shachnev <mitya57 at gmail.com>  Thu, 21 Jun 2012 15:09:08 +0400
 

Deleted: packages/python-markdown/trunk/debian/patches/git_fix_inline_html.patch
===================================================================
--- packages/python-markdown/trunk/debian/patches/git_fix_inline_html.patch	2012-07-28 19:15:43 UTC (rev 22470)
+++ packages/python-markdown/trunk/debian/patches/git_fix_inline_html.patch	2012-07-29 10:15:14 UTC (rev 22471)
@@ -1,18 +0,0 @@
-Description: Properly identify right tags in raw html
-Origin: https://github.com/waylan/Python-Markdown/commit/07f2057734
-Bug: https://github.com/waylan/Python-Markdown/issues/75
-Bug-Debian: http://bugs.debian.org/646552
-
-diff --git a/markdown/preprocessors.py b/markdown/preprocessors.py
-index c0f0034..f20f040 100644
---- a/markdown/preprocessors.py
-+++ b/markdown/preprocessors.py
-@@ -116,7 +116,7 @@ class HtmlBlockPreprocessor(Preprocessor):
-         if (right_tag == "--" and left_tag == "--"):
-             return True
-         elif left_tag == right_tag[1:] \
--            and right_tag[0] != "<":
-+            and right_tag[0] == "/":
-             return True
-         else:
-             return False

Added: packages/python-markdown/trunk/debian/patches/git_fix_tests.patch
===================================================================
--- packages/python-markdown/trunk/debian/patches/git_fix_tests.patch	                        (rev 0)
+++ packages/python-markdown/trunk/debian/patches/git_fix_tests.patch	2012-07-29 10:15:14 UTC (rev 22471)
@@ -0,0 +1,81 @@
+diff --git a/markdown/__init__.py b/markdown/__init__.py
+index 64686c8..149ec30 100644
+--- a/markdown/__init__.py
++++ b/markdown/__init__.py
+@@ -37,6 +37,7 @@ import re
+ import codecs
+ import sys
+ import logging
++import warnings
+ import util
+ from preprocessors import build_preprocessors
+ from blockprocessors import build_block_parser
+@@ -163,10 +164,10 @@ class Markdown:
+             if isinstance(ext, basestring):
+                 ext = self.build_extension(ext, configs.get(ext, []))
+             if isinstance(ext, Extension):
+-                # might raise NotImplementedError, but that's the extension author's problem
+                 ext.extendMarkdown(self, globals())
+             elif ext is not None:
+-                raise ValueError('Extension "%s.%s" must be of type: "markdown.Extension".' \
++                raise TypeError(
++                    'Extension "%s.%s" must be of type: "markdown.Extension"'
+                     % (ext.__class__.__module__, ext.__class__.__name__))
+ 
+         return self
+@@ -200,19 +201,22 @@ class Markdown:
+             module_name_old_style = '_'.join(['mdx', ext_name])
+             try: # Old style (mdx_<extension>)
+                 module = __import__(module_name_old_style)
+-            except ImportError:
+-                logger.warn("Failed loading extension '%s' from '%s' or '%s'"
+-                    % (ext_name, module_name, module_name_old_style))
+-                # Return None so we don't try to initiate none-existant extension
+-                return None
++            except ImportError, e:
++                message = "Failed loading extension '%s' from '%s' or '%s'" \
++                    % (ext_name, module_name, module_name_old_style)
++                e.args = (message,) + e.args[1:]
++                raise
+ 
+         # If the module is loaded successfully, we expect it to define a
+         # function called makeExtension()
+         try:
+             return module.makeExtension(configs.items())
+         except AttributeError, e:
+-            logger.warn("Failed to initiate extension '%s': %s" % (ext_name, e))
+-            return None
++            message = e.args[0]
++            message = "Failed to initiate extension " \
++                      "'%s': %s" % (ext_name, message)
++            e.args = (message,) + e.args[1:]
++            raise
+ 
+     def registerExtension(self, extension):
+         """ This gets called by the extension """
+diff --git a/tests/test_apis.py b/tests/test_apis.py
+index 0296f27..31a60e1 100644
+--- a/tests/test_apis.py
++++ b/tests/test_apis.py
+@@ -245,18 +245,18 @@ class TestErrors(unittest.TestCase):
+ 
+     def testLoadExtensionFailure(self):
+         """ Test failure of an extension to load. """
+-        self.assertRaises(ValueError, 
++        self.assertRaises(ImportError, 
+                         markdown.Markdown, extensions=['non_existant_ext']) 
+ 
+     def testLoadBadExtension(self):
+         """ Test loading of an Extension with no makeExtension function. """
+         _create_fake_extension(name='fake', has_factory_func=False)
+-        self.assertRaises(ValueError, markdown.Markdown, extensions=['fake'])
++        self.assertRaises(AttributeError, markdown.Markdown, extensions=['fake'])
+ 
+     def testNonExtension(self):
+         """ Test loading a non Extension object as an extension. """
+         _create_fake_extension(name='fake', is_wrong_type=True)
+-        self.assertRaises(ValueError, markdown.Markdown, extensions=['fake'])
++        self.assertRaises(TypeError, markdown.Markdown, extensions=['fake'])
+ 
+     def testBaseExtention(self):
+         """ Test that the base Extension class will raise NotImplemented. """

Modified: packages/python-markdown/trunk/debian/patches/series
===================================================================
--- packages/python-markdown/trunk/debian/patches/series	2012-07-28 19:15:43 UTC (rev 22470)
+++ packages/python-markdown/trunk/debian/patches/series	2012-07-29 10:15:14 UTC (rev 22471)
@@ -1 +1 @@
-git_fix_inline_html.patch
+git_fix_tests.patch

Modified: packages/python-markdown/trunk/debian/python-markdown-doc.doc-base
===================================================================
--- packages/python-markdown/trunk/debian/python-markdown-doc.doc-base	2012-07-28 19:15:43 UTC (rev 22470)
+++ packages/python-markdown/trunk/debian/python-markdown-doc.doc-base	2012-07-29 10:15:14 UTC (rev 22471)
@@ -6,5 +6,5 @@
 Section: Programming/Python
 
 Format: HTML
-Index: /usr/share/doc/python-markdown-doc/index.html
-Files: /usr/share/doc/python-markdown-doc/*.html /usr/share/doc/python-markdown-doc/extensions/*.html
+Index: /usr/share/doc/python-markdown-doc/docs/index.html
+Files: /usr/share/doc/python-markdown-doc/docs/*.html /usr/share/doc/python-markdown-doc/docs/extensions/*.html

Modified: packages/python-markdown/trunk/debian/python-markdown-doc.docs
===================================================================
--- packages/python-markdown/trunk/debian/python-markdown-doc.docs	2012-07-28 19:15:43 UTC (rev 22470)
+++ packages/python-markdown/trunk/debian/python-markdown-doc.docs	2012-07-29 10:15:14 UTC (rev 22471)
@@ -1,4 +1 @@
-build/docs/AUTHORS
-build/docs/*.html
-build/docs/*.css
-build/docs/extensions
+build/docs/

Modified: packages/python-markdown/trunk/debian/rules
===================================================================
--- packages/python-markdown/trunk/debian/rules	2012-07-28 19:15:43 UTC (rev 22470)
+++ packages/python-markdown/trunk/debian/rules	2012-07-29 10:15:14 UTC (rev 22471)
@@ -29,7 +29,7 @@
 		$$python run-tests.py; \
 	done
 	cp -a tests build/lib/tests
-	2to3 -w build/lib/tests
+	2to3 -w --no-diffs build/lib/tests
 	set -ex; for pyversion in $(shell py3versions -vr); do \
 		nosetests-$$pyversion -w $(CURDIR)/build/lib/tests; \
 	done
@@ -37,11 +37,8 @@
 	dh_auto_test
 endif
 
-override_dh_installdocs:
-	dh_installdocs -XCHANGELOG
+override_dh_compress:
+	dh_compress -X.txt
 
-override_dh_installchangelogs:
-	dh_installchangelogs docs/CHANGE_LOG
-
 .PHONY: override_dh_auto_clean override_dh_auto_install override_dh_auto_test \
-override_dh_installdocs override_dh_installchangelogs
+override_dh_compress




More information about the Python-modules-commits mailing list