Hello community,

here is the log from the commit of package python3-Markdown for 
openSUSE:Factory checked in at 2016-03-26 15:29:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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        
2015-11-26 17:04:27.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-Markdown.new/python3-Markdown.changes   
2016-03-26 18:13:27.000000000 +0100
@@ -1,0 +2,5 @@
+Wed Mar 23 21:16:04 UTC 2016 - [email protected]
+
+- update to version 2.6.6: no upstream changelog
+
+-------------------------------------------------------------------

Old:
----
  Markdown-2.6.5.tar.gz

New:
----
  Markdown-2.6.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-Markdown.spec ++++++
--- /var/tmp/diff_new_pack.pbAMhd/_old  2016-03-26 18:13:28.000000000 +0100
+++ /var/tmp/diff_new_pack.pbAMhd/_new  2016-03-26 18:13:28.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python3-Markdown
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python3-Markdown
-Version:        2.6.5
+Version:        2.6.6
 Release:        0
 Summary:        Python implementation of Markdown
 License:        BSD-3-Clause

++++++ Markdown-2.6.5.tar.gz -> Markdown-2.6.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6.5/PKG-INFO new/Markdown-2.6.6/PKG-INFO
--- old/Markdown-2.6.5/PKG-INFO 2015-11-25 01:08:48.000000000 +0100
+++ new/Markdown-2.6.6/PKG-INFO 2016-03-21 02:01:39.000000000 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: Markdown
-Version: 2.6.5
+Version: 2.6.6
 Summary: Python implementation of Markdown.
 Home-page: https://pythonhosted.org/Markdown/
 Author: Waylan Limberg
 Author-email: waylan.limberg [at] icloud.com
 License: BSD License
-Download-URL: 
http://pypi.python.org/packages/source/M/Markdown/Markdown-2.6.5.tar.gz
+Download-URL: 
http://pypi.python.org/packages/source/M/Markdown/Markdown-2.6.6.tar.gz
 Description: 
         This is a Python implementation of John Gruber's Markdown_.
         It is almost completely compliant with the reference implementation,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6.5/README.md new/Markdown-2.6.6/README.md
--- old/Markdown-2.6.5/README.md        2015-08-28 05:42:04.000000000 +0200
+++ new/Markdown-2.6.6/README.md        2016-03-11 23:52:18.000000000 +0100
@@ -6,6 +6,7 @@
 
[![Downloads](http://img.shields.io/pypi/dm/Markdown.svg)](https://pypi.python.org/pypi/Markdown#downloads)
 [![Latest 
Version](http://img.shields.io/pypi/v/Markdown.svg)](http://pypi.python.org/pypi/Markdown)
 [![BSD 
License](http://img.shields.io/badge/license-BSD-yellow.svg)](http://opensource.org/licenses/BSD-3-Clause)
+[![Issue 
Stats](http://issuestats.com/github/waylan/Python-Markdown/badge/issue?style=flat)](http://issuestats.com/github/waylan/Python-Markdown)
 
 This is a Python implementation of John Gruber's [Markdown][]. 
 It is almost completely compliant with the reference implementation,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6.5/docs/change_log.txt 
new/Markdown-2.6.6/docs/change_log.txt
--- old/Markdown-2.6.5/docs/change_log.txt      2015-11-06 23:41:20.000000000 
+0100
+++ new/Markdown-2.6.6/docs/change_log.txt      2016-03-11 23:52:18.000000000 
+0100
@@ -7,6 +7,8 @@
 Python-Markdown Change Log
 =========================
 
+Nov 24, 2015: Released version 2.6.5 (a bug-fix release).
+
 Nov 6, 2015: Released version 2.6.4 (a bug-fix release).
 
 Oct 26, 2015: Released version 2.6.3 (a bug-fix release).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6.5/markdown/__version__.py 
new/Markdown-2.6.6/markdown/__version__.py
--- old/Markdown-2.6.5/markdown/__version__.py  2015-11-25 01:00:04.000000000 
+0100
+++ new/Markdown-2.6.6/markdown/__version__.py  2016-03-21 01:59:12.000000000 
+0100
@@ -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, 6, 5, 'final', 0)
+version_info = (2, 6, 6, 'final', 0)
 
 
 def _get_version():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6.5/markdown/extensions/toc.py 
new/Markdown-2.6.6/markdown/extensions/toc.py
--- old/Markdown-2.6.5/markdown/extensions/toc.py       2015-08-28 
05:42:04.000000000 +0200
+++ new/Markdown-2.6.6/markdown/extensions/toc.py       2016-03-21 
01:58:20.000000000 +0100
@@ -180,7 +180,8 @@
         c.text = ""
         for elem in c:
             anchor.append(elem)
-            c.remove(elem)
+        while c:
+            c.remove(c[0])
         c.append(anchor)
 
     def add_permalink(self, c, elem_id):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6.5/markdown/postprocessors.py 
new/Markdown-2.6.6/markdown/postprocessors.py
--- old/Markdown-2.6.5/markdown/postprocessors.py       2015-08-28 
05:42:04.000000000 +0200
+++ new/Markdown-2.6.6/markdown/postprocessors.py       2016-03-12 
00:20:36.000000000 +0100
@@ -10,6 +10,7 @@
 
 from __future__ import absolute_import
 from __future__ import unicode_literals
+from collections import OrderedDict
 from . import util
 from . import odict
 import re
@@ -50,6 +51,7 @@
 
     def run(self, text):
         """ Iterate over html stash and restore "safe" html. """
+        replacements = OrderedDict()
         for i in range(self.markdown.htmlStash.html_counter):
             html, safe = self.markdown.htmlStash.rawHtmlBlocks[i]
             if self.markdown.safeMode and not safe:
@@ -61,14 +63,15 @@
                     html = self.markdown.html_replacement_text
             if (self.isblocklevel(html) and
                (safe or not self.markdown.safeMode)):
-                text = text.replace(
-                    "<p>%s</p>" %
-                    (self.markdown.htmlStash.get_placeholder(i)),
+                replacements["<p>%s</p>" %
+                             (self.markdown.htmlStash.get_placeholder(i))] = \
                     html + "\n"
-                )
-            text = text.replace(
-                self.markdown.htmlStash.get_placeholder(i), html
-            )
+            replacements[self.markdown.htmlStash.get_placeholder(i)] = html
+
+        if replacements:
+            pattern = re.compile("|".join(re.escape(k) for k in replacements))
+            text = pattern.sub(lambda m: replacements[m.group(0)], text)
+
         return text
 
     def escape(self, html):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6.5/tests/plugins.py 
new/Markdown-2.6.6/tests/plugins.py
--- old/Markdown-2.6.5/tests/plugins.py 2015-08-28 05:42:04.000000000 +0200
+++ new/Markdown-2.6.6/tests/plugins.py 2016-03-12 00:20:36.000000000 +0100
@@ -97,6 +97,8 @@
 
     def formatErr(self, err):
         exctype, value, tb = err
+        if not isinstance(value, exctype):
+            value = exctype(value)
         return ''.join(traceback.format_exception(exctype, value, tb))
 
     def startContext(self, ctx):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6.5/tests/test_extensions.py 
new/Markdown-2.6.6/tests/test_extensions.py
--- old/Markdown-2.6.5/tests/test_extensions.py 2015-08-28 05:42:04.000000000 
+0200
+++ new/Markdown-2.6.6/tests/test_extensions.py 2016-03-21 01:58:20.000000000 
+0100
@@ -12,6 +12,17 @@
 import markdown
 
 
+class TestCaseWithAssertStartsWith(unittest.TestCase):
+
+    def assertStartsWith(self, expectedPrefix, text, msg=None):
+        if not text.startswith(expectedPrefix):
+            if len(expectedPrefix) + 5 < len(text):
+                text = text[:len(expectedPrefix) + 5] + '...'
+            standardMsg = '%s not found at the start of %s' % 
(repr(expectedPrefix),
+                                                               repr(text))
+            self.fail(self._formatMessage(msg, standardMsg))
+
+
 class TestExtensionClass(unittest.TestCase):
     """ Test markdown.extensions.Extension. """
 
@@ -86,7 +97,7 @@
         )
 
 
-class TestCodeHilite(unittest.TestCase):
+class TestCodeHilite(TestCaseWithAssertStartsWith):
     """ Test codehilite extension. """
 
     def setUp(self):
@@ -101,7 +112,7 @@
         md = markdown.Markdown(extensions=['markdown.extensions.codehilite'])
         if self.has_pygments:
             # Pygments can use random lexer here as we did not specify the 
language
-            self.assertTrue(md.convert(text).startswith('<div 
class="codehilite"><pre>'))
+            self.assertStartsWith('<div class="codehilite"><pre>', 
md.convert(text))
         else:
             self.assertEqual(
                 md.convert(text),
@@ -117,10 +128,9 @@
             # Different versions of pygments output slightly different markup.
             # So we use 'startwith' and test just enough to confirm that
             # pygments received and processed linenums.
-            self.assertTrue(
-                md.convert(text).startswith(
-                    '<table class="codehilitetable"><tr><td class="linenos">'
-                )
+            self.assertStartsWith(
+                '<table class="codehilitetable"><tr><td class="linenos">',
+                md.convert(text)
             )
         else:
             self.assertEqual(
@@ -134,12 +144,7 @@
         md = markdown.Markdown(
             
extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=False)])
         if self.has_pygments:
-            self.assertEqual(
-                md.convert(text),
-                '<div class="codehilite">'
-                '<pre><span class="c"># A Code Comment</span>\n'
-                '</pre></div>'
-            )
+            self.assertStartsWith('<div class="codehilite"><pre><span', 
md.convert(text))
         else:
             self.assertEqual(
                 md.convert(text),
@@ -153,7 +158,7 @@
             
extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=None)])
         if self.has_pygments:
             # Pygments can use random lexer here as we did not specify the 
language
-            self.assertTrue(md.convert(text).startswith('<div 
class="codehilite"><pre>'))
+            self.assertStartsWith('<div class="codehilite"><pre>', 
md.convert(text))
         else:
             self.assertEqual(
                 md.convert(text),
@@ -169,10 +174,9 @@
             # Differant versions of pygments output slightly different markup.
             # So we use 'startwith' and test just enough to confirm that
             # pygments received and processed linenums.
-            self.assertTrue(
-                md.convert(text).startswith(
-                    '<table class="codehilitetable"><tr><td class="linenos">'
-                )
+            self.assertStartsWith(
+                '<table class="codehilitetable"><tr><td class="linenos">',
+                md.convert(text)
             )
         else:
             self.assertEqual(
@@ -187,12 +191,7 @@
             
extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=None)]
         )
         if self.has_pygments:
-            self.assertEqual(
-                md.convert(text),
-                '<div class="codehilite">'
-                '<pre><span class="c"># A Code Comment</span>\n'
-                '</pre></div>'
-            )
+            self.assertStartsWith('<div class="codehilite"><pre><span', 
md.convert(text))
         else:
             self.assertEqual(
                 md.convert(text),
@@ -202,19 +201,15 @@
 
     def testHighlightLinesWithColon(self):
         # Test with hl_lines delimited by single or double quotes.
-        text0 = '\t:::Python hl_lines="2"\n\t#line 1\n\t#line 2\n\t#line 3'
-        text1 = "\t:::Python hl_lines='2'\n\t#line 1\n\t#line 2\n\t#line 3"
+        text0 = '\t:::Python hl_lines="1"\n\t#line 1\n\t#line 2\n\t#line 3'
+        text1 = "\t:::Python hl_lines='1'\n\t#line 1\n\t#line 2\n\t#line 3"
 
         for text in (text0, text1):
             md = 
markdown.Markdown(extensions=['markdown.extensions.codehilite'])
             if self.has_pygments:
-                self.assertEqual(
-                    md.convert(text),
-                    '<div class="codehilite"><pre>'
-                    '<span class="c">#line 1</span>\n'
-                    '<span class="hll"><span class="c">#line 2</span>\n</span>'
-                    '<span class="c">#line 3</span>\n'
-                    '</pre></div>'
+                self.assertStartsWith(
+                    '<div class="codehilite"><pre><span class="hll"',
+                    md.convert(text).replace('<span></span>', '')
                 )
             else:
                 self.assertEqual(
@@ -237,7 +232,7 @@
         )
 
 
-class TestFencedCode(unittest.TestCase):
+class TestFencedCode(TestCaseWithAssertStartsWith):
     """ Test fenced_code extension. """
 
     def setUp(self):
@@ -333,13 +328,9 @@
         )
 
         if self.has_pygments:
-            self.assertEqual(
-                md.convert(text),
-                '<div class="codehilite"><pre>'
-                '<span class="hll">line 1\n</span>'
-                'line 2\n'
-                '<span class="hll">line 3\n</span>'
-                '</pre></div>'
+            self.assertStartsWith(
+                '<div class="codehilite"><pre><span class="hll"',
+                md.convert(text).replace('<span></span>', '')
             )
         else:
             self.assertEqual(
@@ -372,13 +363,9 @@
                 ]
             )
             if self.has_pygments:
-                self.assertEqual(
-                    md.convert(text),
-                    '<div class="codehilite"><pre>'
-                    '<span class="hll"><span class="c">#line 1</span>\n</span>'
-                    '<span class="c">#line 2</span>\n'
-                    '<span class="hll"><span class="c">#line 3</span>\n</span>'
-                    '</pre></div>'
+                self.assertStartsWith(
+                    '<div class="codehilite"><pre><span class="hll"',
+                    md.convert(text).replace('<span></span>', '')
                 )
             else:
                 self.assertEqual(
@@ -625,7 +612,7 @@
             self.assertEqual(RE.match(test).groups(), expected)
 
 
-class TestTOC(unittest.TestCase):
+class TestTOC(TestCaseWithAssertStartsWith):
     """ Test TOC Extension. """
 
     def setUp(self):
@@ -703,13 +690,13 @@
             '<h1 id="header-1">Header 1</h1>\n'
             '<h2 id="header-2">Header 2</h2>'
         )
-        self.assertTrue(md.toc.startswith('<div class="toc">'))
+        self.assertStartsWith('<div class="toc">', md.toc)
 
     def testReset(self):
         """ Test TOC Reset. """
         self.assertEqual(self.md.toc, '')
         self.md.convert('# Header 1\n\n## Header 2')
-        self.assertTrue(self.md.toc.startswith('<div class="toc">'))
+        self.assertStartsWith('<div class="toc">', self.md.toc)
         self.md.reset()
         self.assertEqual(self.md.toc, '')
 
@@ -788,13 +775,88 @@
             '<h2 id="header-2"><a class="toclink" href="#header-2">Header 
<em>2</em></a></h2>'
         )
 
+    def testAnchorLinkWithSingleInlineCode(self):
+        """ Test TOC Anchorlink with single inline code. """
+        md = markdown.Markdown(
+            extensions=[markdown.extensions.toc.TocExtension(anchorlink=True)]
+        )
+        text = '# This is `code`.'
+        self.assertEqual(
+            md.convert(text),
+            '<h1 id="this-is-code">'                        # noqa
+                '<a class="toclink" href="#this-is-code">'  # noqa
+                    'This is <code>code</code>.'            # noqa
+                '</a>'                                      # noqa
+            '</h1>'                                         # noqa
+        )
+
+    def testAnchorLinkWithDoubleInlineCode(self):
+        """ Test TOC Anchorlink with double inline code. """
+        md = markdown.Markdown(
+            extensions=[markdown.extensions.toc.TocExtension(anchorlink=True)]
+        )
+        text = '# This is `code` and `this` too.'
+        self.assertEqual(
+            md.convert(text),
+            '<h1 id="this-is-code-and-this-too">'                           # 
noqa
+                '<a class="toclink" href="#this-is-code-and-this-too">'     # 
noqa
+                    'This is <code>code</code> and <code>this</code> too.'  # 
noqa
+                '</a>'                                                      # 
noqa
+            '</h1>'                                                         # 
noqa
+        )
+
+    def testPermalink(self):
+        """ Test TOC Permalink. """
+        md = markdown.Markdown(
+            extensions=[markdown.extensions.toc.TocExtension(permalink=True)]
+        )
+        text = '# Header'
+        self.assertEqual(
+            md.convert(text),
+            '<h1 id="header">'                                                 
           # noqa
+                'Header'                                                       
           # noqa
+                '<a class="headerlink" href="#header" title="Permanent 
link">&para;</a>'  # noqa
+            '</h1>'                                                            
           # noqa
+        )
+
+    def testPermalinkWithSingleInlineCode(self):
+        """ Test TOC Permalink with single inline code. """
+        md = markdown.Markdown(
+            extensions=[markdown.extensions.toc.TocExtension(permalink=True)]
+        )
+        text = '# This is `code`.'
+        self.assertEqual(
+            md.convert(text),
+            '<h1 id="this-is-code">'                                           
                 # noqa
+                'This is <code>code</code>.'                                   
                 # noqa
+                '<a class="headerlink" href="#this-is-code" title="Permanent 
link">&para;</a>'  # noqa
+            '</h1>'                                                            
                 # noqa
+        )
+
+    def testPermalinkWithDoubleInlineCode(self):
+        """ Test TOC Permalink with double inline code. """
+        md = markdown.Markdown(
+            extensions=[markdown.extensions.toc.TocExtension(permalink=True)]
+        )
+        text = '# This is `code` and `this` too.'
+        self.assertEqual(
+            md.convert(text),
+            '<h1 id="this-is-code-and-this-too">'                              
                              # noqa
+                'This is <code>code</code> and <code>this</code> too.'         
                              # noqa
+                '<a class="headerlink" href="#this-is-code-and-this-too" 
title="Permanent link">&para;</a>'  # noqa
+            '</h1>'                                                            
                              # noqa
+        )
+
     def testTitle(self):
         """ Test TOC Title. """
         md = markdown.Markdown(
             extensions=[markdown.extensions.toc.TocExtension(title='Table of 
Contents')]
         )
         md.convert('# Header 1\n\n## Header 2')
-        self.assertTrue(md.toc.startswith('<div class="toc"><span 
class="toctitle">Table of Contents</span><ul>'))
+        self.assertStartsWith(
+            '<div class="toc"><span class="toctitle">Table of 
Contents</span><ul>',
+            md.toc
+        )
 
     def testWithAttrList(self):
         """ Test TOC with attr_list Extension. """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6.5/tox.ini new/Markdown-2.6.6/tox.ini
--- old/Markdown-2.6.5/tox.ini  2015-11-17 00:09:10.000000000 +0100
+++ new/Markdown-2.6.6/tox.ini  2016-03-11 23:52:18.000000000 +0100
@@ -2,7 +2,6 @@
 envlist = py27, py32, py33, py34, pypy, flake8, checkspelling
 
 [testenv]
-downloadcache = {toxworkdir}/cache
 deps = -rtest-requirements.txt
 commands = coverage run --source=markdown {toxinidir}/run-tests.py {posargs}
            coverage report --show-missing
@@ -16,4 +15,4 @@
 commands = {toxinidir}/checkspelling.sh
 
 [flake8]
-max-line-length = 119
\ No newline at end of file
+max-line-length = 119


Reply via email to