Hello community, here is the log from the commit of package python3-Markdown for openSUSE:Factory checked in at 2014-10-05 20:31:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-Markdown (Old) and /work/SRC/openSUSE:Factory/.python3-Markdown.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-Markdown" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-Markdown/python3-Markdown.changes 2014-09-19 15:45:44.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-Markdown.new/python3-Markdown.changes 2014-10-05 20:33:29.000000000 +0200 @@ -1,0 +2,5 @@ +Fri Oct 3 14:27:57 UTC 2014 - [email protected] + +- update to version 2.5.1: bugfix release + +------------------------------------------------------------------- Old: ---- Markdown-2.5.tar.gz New: ---- Markdown-2.5.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-Markdown.spec ++++++ --- /var/tmp/diff_new_pack.A8G4zq/_old 2014-10-05 20:33:30.000000000 +0200 +++ /var/tmp/diff_new_pack.A8G4zq/_new 2014-10-05 20:33:30.000000000 +0200 @@ -17,7 +17,7 @@ Name: python3-Markdown -Version: 2.5 +Version: 2.5.1 Release: 0 Summary: Python implementation of Markdown License: BSD-3-Clause ++++++ Markdown-2.5.tar.gz -> Markdown-2.5.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/MANIFEST new/Markdown-2.5.1/MANIFEST --- old/Markdown-2.5/MANIFEST 2014-09-13 02:40:56.000000000 +0200 +++ new/Markdown-2.5.1/MANIFEST 2014-09-27 00:40:18.000000000 +0200 @@ -238,6 +238,8 @@ tests/misc/em-around-links.txt tests/misc/em_strong.html tests/misc/em_strong.txt +tests/misc/em_strong_complex.html +tests/misc/em_strong_complex.txt tests/misc/email.html tests/misc/email.txt tests/misc/escaped_chars_in_js.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/PKG-INFO new/Markdown-2.5.1/PKG-INFO --- old/Markdown-2.5/PKG-INFO 2014-09-13 02:40:59.000000000 +0200 +++ new/Markdown-2.5.1/PKG-INFO 2014-09-27 00:40:21.000000000 +0200 @@ -1,12 +1,12 @@ Metadata-Version: 1.0 Name: Markdown -Version: 2.5 +Version: 2.5.1 Summary: Python implementation of Markdown. Home-page: https://pythonhosted.org/Markdown/ Author: Waylan Limberg Author-email: waylan [at] gmail.com License: BSD License -Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-2.5.tar.gz +Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-2.5.1.tar.gz Description: This is a Python implementation of John Gruber's Markdown_. It is almost completely compliant with the reference implementation, though there are a few known issues. See Features_ for information diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/docs/change_log.txt new/Markdown-2.5.1/docs/change_log.txt --- old/Markdown-2.5/docs/change_log.txt 2014-08-26 03:30:47.000000000 +0200 +++ new/Markdown-2.5.1/docs/change_log.txt 2014-09-27 00:33:46.000000000 +0200 @@ -7,9 +7,11 @@ Python-Markdown Changelog ========================= -[TBD]: Released version 2.5.0 ([Notes](release-2.5.html)) +Sept 26, 2014: Released version 2.5.1 (a bugfix release). -Feb 16, 2014: Released version 2.4.0 ([Notes](release-2.4.html)) +Sept 12, 2014: Released version 2.5.0 ([Notes](release-2.5.html)). + +Feb 16, 2014: Released version 2.4.0 ([Notes](release-2.4.html)). Mar 22, 2013: Released version 2.3.1 (a bugfix release). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/docs/release-2.5.txt new/Markdown-2.5.1/docs/release-2.5.txt --- old/Markdown-2.5/docs/release-2.5.txt 2014-09-13 02:32:11.000000000 +0200 +++ new/Markdown-2.5.1/docs/release-2.5.txt 2014-09-27 00:35:06.000000000 +0200 @@ -16,10 +16,7 @@ ------------------------------ * Python-Markdown no longer supports Python version 2.6. You must be using Python - versions 2.7, 3.2, 3.3, or 3.4. While Python-Markdown is no longer tested against - Python 2.6, you may be able to get it working if you install a copy of [importlib] - which has been backported for Python 2.6. However, the developers of Python-Markdown - offer no guarentees in that situation. + versions 2.7, 3.2, 3.3, or 3.4. [importlib]: https://pypi.python.org/pypi/importlib @@ -177,7 +174,7 @@ [JSON]: http://json.org/ [PyYAML]: http://pyyaml.org/ -* The [amonition extension][ae] is no longer considered "experimental." +* The [admonition extension][ae] is no longer considered "experimental." [ae]: extensions/admonition.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/markdown/__init__.py new/Markdown-2.5.1/markdown/__init__.py --- old/Markdown-2.5/markdown/__init__.py 2014-09-13 02:32:11.000000000 +0200 +++ new/Markdown-2.5.1/markdown/__init__.py 2014-09-26 04:31:04.000000000 +0200 @@ -221,6 +221,10 @@ # Assume string uses dot syntax (`path.to.some.module`) module = importlib.import_module(ext_name) logger.debug('Successfuly imported extension module "%s".' % ext_name) + # For backward compat (until deprecation) check that this is an extension + if '.' not in ext_name and not (hasattr(module, 'extendMarkdown') or (class_name and hasattr(module, class_name))): + # We have a name conflict (eg: extensions=['tables'] and PyTables is installed) + raise ImportError except ImportError: # Preppend `markdown.extensions.` to name module_name = '.'.join(['markdown.extensions', ext_name]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/markdown/__version__.py new/Markdown-2.5.1/markdown/__version__.py --- old/Markdown-2.5/markdown/__version__.py 2014-09-13 02:40:10.000000000 +0200 +++ new/Markdown-2.5.1/markdown/__version__.py 2014-09-27 00:31:53.000000000 +0200 @@ -5,7 +5,7 @@ # (major, minor, micro, alpha/beta/rc/final, #) # (1, 1, 2, 'alpha', 0) => "1.1.2.dev" # (1, 2, 0, 'beta', 2) => "1.2b2" -version_info = (2, 5, 0, 'final', 0) +version_info = (2, 5, 1, 'final', 0) def _get_version(): " Returns a PEP 386-compliant version number from version_info. " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/markdown/extensions/meta.py new/Markdown-2.5.1/markdown/extensions/meta.py --- old/Markdown-2.5/markdown/extensions/meta.py 2014-08-26 03:30:47.000000000 +0200 +++ new/Markdown-2.5.1/markdown/extensions/meta.py 2014-09-27 00:30:31.000000000 +0200 @@ -31,7 +31,7 @@ def extendMarkdown(self, md, md_globals): """ Add MetaPreprocessor to Markdown instance. """ - md.preprocessors.add("meta", MetaPreprocessor(md), "_begin") + md.preprocessors.add("meta", MetaPreprocessor(md), ">normalize_whitespace") class MetaPreprocessor(Preprocessor): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/markdown/extensions/toc.py new/Markdown-2.5.1/markdown/extensions/toc.py --- old/Markdown-2.5/markdown/extensions/toc.py 2014-08-26 03:30:47.000000000 +0200 +++ new/Markdown-2.5.1/markdown/extensions/toc.py 2014-09-26 04:31:04.000000000 +0200 @@ -216,9 +216,9 @@ "slugify" : [slugify, "Function to generate anchors based on header text - " "Defaults to the headerid ext's slugify function."], - "title" : [None, + "title" : ["", "Title to insert into TOC <div> - " - "Defaults to None"], + "Defaults to an empty string"], "anchorlink" : [0, "1 if header should be a self link - " "Defaults to 0"], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/markdown/inlinepatterns.py new/Markdown-2.5.1/markdown/inlinepatterns.py --- old/Markdown-2.5/markdown/inlinepatterns.py 2014-08-26 03:30:47.000000000 +0200 +++ new/Markdown-2.5.1/markdown/inlinepatterns.py 2014-09-27 00:30:31.000000000 +0200 @@ -75,7 +75,8 @@ inlinePatterns["html"] = HtmlPattern(HTML_RE, md_instance) inlinePatterns["entity"] = HtmlPattern(ENTITY_RE, md_instance) inlinePatterns["not_strong"] = SimpleTextPattern(NOT_STRONG_RE) - inlinePatterns["strong_em"] = DoubleTagPattern(STRONG_EM_RE, 'strong,em') + inlinePatterns["em_strong"] = DoubleTagPattern(EM_STRONG_RE, 'strong,em') + inlinePatterns["strong_em"] = DoubleTagPattern(STRONG_EM_RE, 'em,strong') inlinePatterns["strong"] = SimpleTagPattern(STRONG_RE, 'strong') inlinePatterns["emphasis"] = SimpleTagPattern(EMPHASIS_RE, 'em') if md_instance.smart_emphasis: @@ -100,7 +101,8 @@ ESCAPE_RE = r'\\(.)' # \< EMPHASIS_RE = r'(\*)([^\*]+)\2' # *emphasis* STRONG_RE = r'(\*{2}|_{2})(.+?)\2' # **strong** -STRONG_EM_RE = r'(\*{3}|_{3})(.+?)\2' # ***strong*** +EM_STRONG_RE = r'(\*|_){3}(.+?)\2(.*?)\2{2}' # ***strongem*** or ***em*strong** +STRONG_EM_RE = r'(\*|_){3}(.+?)\2{2}(.*?)\2' # ***strong**em* SMART_EMPHASIS_RE = r'(?<!\w)(_)(?!_)(.+?)(?<!_)\2(?!\w)' # _smart_emphasis_ EMPHASIS_2_RE = r'(_)(.+?)\2' # _emphasis_ LINK_RE = NOIMG + BRK + \ @@ -156,7 +158,7 @@ """ self.pattern = pattern - self.compiled_re = re.compile("^(.*?)%s(.*?)$" % pattern, + self.compiled_re = re.compile("^(.*?)%s(.*?)$" % pattern, re.DOTALL | re.UNICODE) # Api for Markdown to pass safe_mode into instance @@ -210,7 +212,7 @@ return value else: # An etree Element - return text content only - return ''.join(itertext(value)) + return ''.join(itertext(value)) return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text) @@ -228,7 +230,7 @@ if char in self.markdown.ESCAPED_CHARS: return '%s%s%s' % (util.STX, ord(char), util.ETX) else: - return None + return None class SimpleTagPattern(Pattern): @@ -276,6 +278,8 @@ el1 = util.etree.Element(tag1) el2 = util.etree.SubElement(el1, tag2) el2.text = m.group(3) + if len(m.groups())==5: + el2.tail = m.group(4) return el1 @@ -300,7 +304,7 @@ return self.markdown.serializer(value) except: return '\%s' % value - + return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text) @@ -320,7 +324,7 @@ el.set("href", "") if title: - title = dequote(self.unescape(title)) + title = dequote(self.unescape(title)) el.set("title", title) return el @@ -344,19 +348,19 @@ if not self.markdown.safeMode: # Return immediately bipassing parsing. return url - + try: scheme, netloc, path, params, query, fragment = url = urlparse(url) except ValueError: #pragma: no cover # Bad url - so bad it couldn't be parsed. return '' - + locless_schemes = ['', 'mailto', 'news'] allowed_schemes = locless_schemes + ['http', 'https', 'ftp', 'ftps'] if scheme not in allowed_schemes: # Not a known (allowed) scheme. Not safe. return '' - + if netloc == '' and scheme not in locless_schemes: #pragma: no cover # This should not happen. Treat as suspect. return '' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/markdown/treeprocessors.py new/Markdown-2.5.1/markdown/treeprocessors.py --- old/Markdown-2.5/markdown/treeprocessors.py 2014-09-13 02:32:11.000000000 +0200 +++ new/Markdown-2.5.1/markdown/treeprocessors.py 2014-09-27 00:30:31.000000000 +0200 @@ -34,8 +34,8 @@ def run(self, root): """ Subclasses of Treeprocessor should implement a `run` method, which - takes a root ElementTree. This method can return another ElementTree - object, and the existing root ElementTree will be replaced, or it can + takes a root ElementTree. This method can return another ElementTree + object, and the existing root ElementTree will be replaced, or it can modify the current tree and return None. """ pass #pragma: no cover @@ -71,7 +71,7 @@ * index: index, from which we start search Returns: placeholder id and string index, after the found placeholder. - + """ m = self.__placeholder_re.search(data, index) if m: @@ -129,11 +129,10 @@ text = subnode.tail subnode.tail = None - childResult = self.__processPlaceholders(text, subnode) + childResult = self.__processPlaceholders(text, subnode, isText) if not isText and node is not subnode: pos = list(node).index(subnode) - node.remove(subnode) else: pos = 0 @@ -141,7 +140,7 @@ for newChild in childResult: node.insert(pos, newChild) - def __processPlaceholders(self, data, parent): + def __processPlaceholders(self, data, parent, isText=True): """ Process string with placeholders and generate ElementTree tree. @@ -151,7 +150,7 @@ * parent: Element, which contains processing inline data Returns: list with ElementTree elements with applied inline patterns. - + """ def linkText(text): if text: @@ -160,6 +159,11 @@ result[-1].tail += text else: result[-1].tail = text + elif not isText: + if parent.tail: + parent.tail += text + else: + parent.tail = text else: if parent.text: parent.text += text @@ -183,7 +187,7 @@ for child in [node] + list(node): if child.tail: if child.tail.strip(): - self.__processElementText(node, child,False) + self.__processElementText(node, child, False) if child.text: if child.text.strip(): self.__processElementText(child, child) @@ -240,7 +244,7 @@ # We need to process current node too for child in [node] + list(node): if not isString(node): - if child.text: + if child.text: child.text = self.__handleInline(child.text, patternIndex + 1) if child.tail: @@ -288,11 +292,10 @@ if child.tail: tail = self.__handleInline(child.tail) dumby = util.etree.Element('d') - tailResult = self.__processPlaceholders(tail, dumby) - if dumby.text: - child.tail = dumby.text - else: - child.tail = None + child.tail = None + tailResult = self.__processPlaceholders(tail, dumby, False) + if dumby.tail: + child.tail = dumby.tail pos = list(currElement).index(child) + 1 tailResult.reverse() for newChild in tailResult: @@ -304,7 +307,7 @@ if self.markdown.enable_attributes: if element.text and isString(element.text): element.text = \ - inlinepatterns.handleAttributes(element.text, + inlinepatterns.handleAttributes(element.text, element) i = 0 for newChild in lst: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/tests/misc/em_strong_complex.html new/Markdown-2.5.1/tests/misc/em_strong_complex.html --- old/Markdown-2.5/tests/misc/em_strong_complex.html 1970-01-01 01:00:00.000000000 +0100 +++ new/Markdown-2.5.1/tests/misc/em_strong_complex.html 2014-09-27 00:30:31.000000000 +0200 @@ -0,0 +1,14 @@ +<p><em><strong>test test</strong> test test</em></p> +<p><strong><em>test test</em> test test</strong></p> +<p><strong><em>test</em></strong></p> +<p><strong>test</strong>_</p> +<p><strong><em>test</em> test</strong>_</p> +<p><strong><em>test</em> test</strong></p> +<p><em>test_test test_test</em></p> +<p><em><strong>test test</strong> test test</em></p> +<p><strong><em>test test</em> test test</strong></p> +<p>*<em>test</em></p> +<p><strong><em>test</em></strong></p> +<p><strong>test</strong>*</p> +<p><strong><em>test</em> test</strong></p> +<p><em>test</em>test test<em>test</em></p> \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/tests/misc/em_strong_complex.txt new/Markdown-2.5.1/tests/misc/em_strong_complex.txt --- old/Markdown-2.5/tests/misc/em_strong_complex.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/Markdown-2.5.1/tests/misc/em_strong_complex.txt 2014-09-27 00:30:31.000000000 +0200 @@ -0,0 +1,27 @@ +___test test__ test test_ + +___test test_ test test__ + +___test___ + +__test___ + +___test_ test___ + +___test_ test__ + +_test_test test_test_ + +***test test** test test* + +***test test* test test** + +**test* + +***test*** + +**test*** + +***test* test** + +*test*test test*test* \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5/tests/test_apis.py new/Markdown-2.5.1/tests/test_apis.py --- old/Markdown-2.5/tests/test_apis.py 2014-09-13 02:32:11.000000000 +0200 +++ new/Markdown-2.5.1/tests/test_apis.py 2014-09-27 00:30:31.000000000 +0200 @@ -289,25 +289,22 @@ def testLoadBadExtension(self): """ Test loading of an Extension with no makeExtension function. """ - _create_fake_extension(name='fake_a', has_factory_func=False) - self.assertRaises(AttributeError, markdown.Markdown, extensions=['fake_a']) + self.assertRaises(AttributeError, markdown.Markdown, extensions=['markdown.util']) def testNonExtension(self): """ Test loading a non Extension object as an extension. """ - _create_fake_extension(name='fake_b', is_wrong_type=True) - self.assertRaises(TypeError, markdown.Markdown, extensions=['fake_b']) + self.assertRaises(TypeError, markdown.Markdown, extensions=[object]) def testBaseExtention(self): """ Test that the base Extension class will raise NotImplemented. """ - _create_fake_extension(name='fake_c') self.assertRaises(NotImplementedError, - markdown.Markdown, extensions=['fake_c']) + markdown.Markdown, extensions=[markdown.extensions.Extension()]) def testMdxExtention(self): """ Test that appending mdx_ raises a PendingDeprecationWarning. """ - _create_fake_extension(name='fake_d', use_old_style=True) + _create_fake_extension(name='fake', use_old_style=True) self.assertRaises(PendingDeprecationWarning, - markdown.Markdown, extensions=['fake_d']) + markdown.Markdown, extensions=['fake']) def testShortNameExtention(self): """ Test that using a short name raises a PendingDeprecationWarning. """ @@ -383,6 +380,20 @@ '<!--foo-->\n') +class testElementTailTests(unittest.TestCase): + """ Element Tail Tests """ + def setUp(self): + self.pretty = markdown.treeprocessors.PrettifyTreeprocessor() + + def testBrTailNoNewline(self): + """ Test that last <br> in tree has a new line tail """ + root = markdown.util.etree.Element('root') + br = markdown.util.etree.SubElement(root, 'br') + self.assertEqual(br.tail, None) + self.pretty.run(root) + self.assertEqual(br.tail, "\n") + + class testSerializers(unittest.TestCase): """ Test the html and xhtml serializers. """ @@ -590,7 +601,7 @@ with os.fdopen(fd, 'w') as fp: fp.write(config) - def testExtensonConfigOption(self): + def testExtensionConfigOption(self): config = { 'markdown.extensions.wikilinks': { 'base_url': 'http://example.com/', @@ -606,6 +617,19 @@ self.default_options['extension_configs'] = config self.assertEqual(options, self.default_options) + def textBoolExtensionConfigOption(self): + config = { + 'markdown.extensions.toc': { + 'title': 'Some Title', + 'anchorlink': True, + 'permalink': True + } + } + self.create_config_file(config) + options, logging_level = parse_options(['-c', self.tempfile]) + self.default_options['extension_configs'] = config + self.assertEqual(options, self.default_options) + def testExtensonConfigOptionAsJSON(self): config = { 'markdown.extensions.wikilinks': { @@ -632,4 +656,4 @@ PLACE_MARKER= ~~~footnotes~~~ """ self.create_config_file(config) - self.assertRaises(yaml.YAMLError, parse_options, ['-c', self.tempfile]) \ No newline at end of file + self.assertRaises(yaml.YAMLError, parse_options, ['-c', self.tempfile]) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
