summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/markdown/files/markdown-2.2.0-tests.patch
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/markdown/files/markdown-2.2.0-tests.patch')
-rw-r--r--dev-python/markdown/files/markdown-2.2.0-tests.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/dev-python/markdown/files/markdown-2.2.0-tests.patch b/dev-python/markdown/files/markdown-2.2.0-tests.patch
new file mode 100644
index 000000000000..ef05702c643b
--- /dev/null
+++ b/dev-python/markdown/files/markdown-2.2.0-tests.patch
@@ -0,0 +1,80 @@
+https://github.com/waylan/Python-Markdown/issues/112
+https://github.com/waylan/Python-Markdown/commit/5b3e724fb78da73ab87fb34e4ac9d9299773cfed
+
+--- markdown/__init__.py
++++ markdown/__init__.py
+@@ -37,6 +37,7 @@
+ 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 @@
+ 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 @@
+ 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 """
+--- tests/test_apis.py
++++ tests/test_apis.py
+@@ -245,18 +245,18 @@
+
+ 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. """