Hello community,

here is the log from the commit of package python3-Markups for openSUSE:Factory 
checked in at 2015-01-30 06:12:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-Markups (Old)
 and      /work/SRC/openSUSE:Factory/.python3-Markups.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-Markups"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-Markups/python3-Markups.changes  
2015-01-08 23:02:59.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-Markups.new/python3-Markups.changes     
2015-01-30 06:12:29.000000000 +0100
@@ -1,0 +2,10 @@
+Wed Jan 28 17:23:18 UTC 2015 - [email protected]
+
+- update to version 0.6.0:
+  * Custom markups are now normal Python modules.
+  * Web module no longer supports Python 2.x.
+  * Refactor the code related to Markdown extensions to make it
+    work with upcoming Python-Markdown releases.
+  * MathJax extension is now in a separate module.
+
+-------------------------------------------------------------------

Old:
----
  Markups-0.5.2.tar.gz

New:
----
  Markups-0.6.0.tar.gz

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

Other differences:
------------------
++++++ python3-Markups.spec ++++++
--- /var/tmp/diff_new_pack.bTZZg1/_old  2015-01-30 06:12:30.000000000 +0100
+++ /var/tmp/diff_new_pack.bTZZg1/_new  2015-01-30 06:12:30.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python3-Markups
-Version:        0.5.2
+Version:        0.6.0
 Release:        0
 Summary:        A wrapper around various text markups
 License:        BSD-3-Clause

++++++ Markups-0.5.2.tar.gz -> Markups-0.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/Markups.egg-info/PKG-INFO 
new/Markups-0.6.0/Markups.egg-info/PKG-INFO
--- old/Markups-0.5.2/Markups.egg-info/PKG-INFO 2014-11-05 18:50:43.000000000 
+0100
+++ new/Markups-0.6.0/Markups.egg-info/PKG-INFO 2015-01-25 17:57:10.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Markups
-Version: 0.5.2
+Version: 0.6.0
 Summary: A wrapper around various text markups
 Home-page: https://github.com/mitya57/pymarkups
 Author: Dmitry Shachnev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/Markups.egg-info/SOURCES.txt 
new/Markups-0.6.0/Markups.egg-info/SOURCES.txt
--- old/Markups-0.5.2/Markups.egg-info/SOURCES.txt      2014-11-05 
18:50:44.000000000 +0100
+++ new/Markups-0.6.0/Markups.egg-info/SOURCES.txt      2015-01-25 
17:57:11.000000000 +0100
@@ -19,6 +19,7 @@
 markups/abstract.py
 markups/common.py
 markups/markdown.py
+markups/mdx_mathjax.py
 markups/restructuredtext.py
 markups/textile.py
 markups/web.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/PKG-INFO new/Markups-0.6.0/PKG-INFO
--- old/Markups-0.5.2/PKG-INFO  2014-11-05 18:50:44.000000000 +0100
+++ new/Markups-0.6.0/PKG-INFO  2015-01-25 17:57:11.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Markups
-Version: 0.5.2
+Version: 0.6.0
 Summary: A wrapper around various text markups
 Home-page: https://github.com/mitya57/pymarkups
 Author: Dmitry Shachnev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/changelog new/Markups-0.6.0/changelog
--- old/Markups-0.5.2/changelog 2014-11-05 18:47:59.000000000 +0100
+++ new/Markups-0.6.0/changelog 2015-01-25 17:35:19.000000000 +0100
@@ -1,3 +1,17 @@
+Version 0.6, 2015-01-25
+=======================
+
+Incompatible changes:
+
+* Custom markups are now normal Python modules.
+* Web module no longer supports Python 2.x.
+
+Other changes:
+
+* Refactor the code related to Markdown extensions to make it
+  work with upcoming Python-Markdown releases.
+* MathJax extension is now in a separate module.
+
 Version 0.5.2, 2014-11-05
 =========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/docs/conf.py 
new/Markups-0.6.0/docs/conf.py
--- old/Markups-0.5.2/docs/conf.py      2014-09-10 13:26:49.000000000 +0200
+++ new/Markups-0.6.0/docs/conf.py      2015-01-25 12:10:11.000000000 +0100
@@ -47,7 +47,7 @@
 
 # General information about the project.
 project = u'Python-Markups'
-copyright = u'2014, Dmitry Shachnev'
+copyright = u'2015, Dmitry Shachnev'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/docs/custom_markups.rst 
new/Markups-0.6.0/docs/custom_markups.rst
--- old/Markups-0.5.2/docs/custom_markups.rst   2014-09-10 13:26:49.000000000 
+0200
+++ new/Markups-0.6.0/docs/custom_markups.rst   2015-01-25 17:15:00.000000000 
+0100
@@ -5,16 +5,12 @@
 Registering the markup module
 =============================
 
-Any third-party markup should be placed in the same directory
-as built-in markups. To get that directory, use:
-
->>> import markups
->>> print(markups.__path__)
-
+A third-party markup is a Python module that can be installed
+the usual way.
 Every module should have :data:`markup` property pointing to
 the markup class.
 
-To register the markup, one should append the markup name to
+To register the markup, one should append the full module name to
 file named ``pymarkups.txt`` in the
 :ref:`configuration directory <configuration-directory>`.
 
@@ -22,6 +18,10 @@
 if the module is present in return value of
 :func:`~markups.get_custom_markups` function.
 
+.. versionchanged:: 0.6
+   The third-party markup is now a normal Python module, not
+   necessarily a file in ``markups`` namespace.
+
 Importing third-party modules
 =============================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/docs/standard_markups.rst 
new/Markups-0.6.0/docs/standard_markups.rst
--- old/Markups-0.5.2/docs/standard_markups.rst 2014-09-10 13:26:49.000000000 
+0200
+++ new/Markups-0.6.0/docs/standard_markups.rst 2015-01-25 17:37:58.000000000 
+0100
@@ -9,7 +9,7 @@
 
 Markdown_ markup uses Python-Markdown_ as a backend.
 
-There are several ways to enable `Python-Markdown extensions`.
+There are several ways to enable `Python-Markdown extensions`_.
 
 * List extensions in a file named :file:`markdown-extensions.txt` in
   the :ref:`configuration directory <configuration-directory>`,
@@ -69,12 +69,12 @@
 Textile markup
 ==============
 
-This markup provides support for Textile language. It uses python-textile_
+This markup provides support for Textile_ language. It uses python-textile_
 module.
 
 The file extension associated with Textile markup is ``.textile``.
 
-.. _Textile: http://textile.sitemonks.com/
+.. _Textile: http://en.wikipedia.org/wiki/Textile_(markup_language)
 .. _python-textile: https://github.com/sebix/python-textile
 
 .. autoclass:: markups.TextileMarkup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/markups/__init__.py 
new/Markups-0.6.0/markups/__init__.py
--- old/Markups-0.5.2/markups/__init__.py       2014-11-05 18:48:19.000000000 
+0100
+++ new/Markups-0.6.0/markups/__init__.py       2015-01-25 17:49:07.000000000 
+0100
@@ -1,7 +1,8 @@
 # This file is part of python-markups module
 # License: BSD
-# Copyright: (C) Dmitry Shachnev, 2012-2014
+# Copyright: (C) Dmitry Shachnev, 2012-2015
 
+import importlib
 import os
 import sys
 from markups.common import CONFIGURATION_DIR
@@ -9,7 +10,7 @@
 from markups.restructuredtext import ReStructuredTextMarkup
 from markups.textile import TextileMarkup
 
-__version_tuple__ = (0, 5, 2)
+__version_tuple__ = (0, 6, 0)
 __version__ = '.'.join(map(str, __version_tuple__))
 
 builtin_markups = [MarkdownMarkup, ReStructuredTextMarkup, TextileMarkup]
@@ -30,11 +31,10 @@
                custom_markups = []
                for markup_name in custom_markups_names:
                        try:
-                               module = __import__('markups.'+markup_name, {}, 
{}, ['markups'])
-                       except ImportError:
-                               sys.stderr.write('Warning: cannot import module 
markups.'+markup_name+'\n')
-                       else:
+                               module = importlib.import_module(markup_name)
                                custom_markups.append(module.markup)
+                       except (ImportError, AttributeError):
+                               sys.stderr.write('Warning: cannot import module 
%r.\n' % markup_name)
                return custom_markups
 
 def get_all_markups():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/markups/markdown.py 
new/Markups-0.6.0/markups/markdown.py
--- old/Markups-0.5.2/markups/markdown.py       2014-11-05 18:42:39.000000000 
+0100
+++ new/Markups-0.6.0/markups/markdown.py       2015-01-25 17:00:22.000000000 
+0100
@@ -1,9 +1,10 @@
 # This file is part of python-markups module
 # License: BSD
-# Copyright: (C) Dmitry Shachnev, 2012
+# Copyright: (C) Dmitry Shachnev, 2012-2015
 
 from __future__ import absolute_import
 
+import importlib
 import os
 import re
 import sys
@@ -23,7 +24,7 @@
 </script>
 '''
 
-extensions_re = re.compile(r'required.extensions: ([ \w]+)', 
flags=re.IGNORECASE)
+extensions_re = re.compile(r'required.extensions: ([ \w\.\(\),=_]+)', 
flags=re.IGNORECASE)
 
 class MarkdownMarkup(AbstractMarkup):
        """Markup class for Markdown language.
@@ -76,80 +77,50 @@
                        return match.group(1).strip().split()
                return []
 
-       def _check_extension_exists(self, extension_name):
-               if '(' in extension_name:
-                       extension_name = 
extension_name[:extension_name.find('(')]
-               try:
-                       __import__('markdown.extensions.'+extension_name, {}, 
{},
-                       ['markdown.extensions'])
-               except ImportError:
+       def _canonicalize_extension_name(self, extension_name):
+               lb = extension_name.find('(')
+               if lb >= 0:
+                       extension_name, parameters = extension_name[:lb], 
extension_name[lb:]
+               else:
+                       parameters = ''
+               prefixes = ('markdown.extensions.', '', 'mdx_')
+               for prefix in prefixes:
                        try:
-                               __import__('mdx_'+extension_name)
-                       except ImportError:
-                               return False
-               return True
-
-       def _get_mathjax_patterns(self):
-               def handle_match_inline(m):
-                       node = self.markdown.util.etree.Element('script')
-                       node.set('type', 'math/tex')
-                       node.text = self.markdown.util.AtomicString(m.group(3))
-                       return node
-
-               def handle_match(m):
-                       node = self.markdown.util.etree.Element('script')
-                       node.set('type', 'math/tex; mode=display')
-                       node.text = self.markdown.util.AtomicString(m.group(3))
-                       if '\\begin' in m.group(2):
-                               node.text = 
self.markdown.util.AtomicString(m.group(2) +
-                               m.group(3) + m.group(4))
-                       return node
-
-               inlinemathpatterns = (
-                       
self.markdown.inlinepatterns.Pattern(r'(?<!\\|\$)(\$)([^\$]+)(\$)'),  #  $...$
-                       
self.markdown.inlinepatterns.Pattern(r'(?<!\\)(\\\()(.+?)(\\\))')     # \(...\)
-               )
-               mathpatterns = (
-                       
self.markdown.inlinepatterns.Pattern(r'(?<!\\)(\$\$)([^\$]+)(\$\$)'), # $$...$$
-                       
self.markdown.inlinepatterns.Pattern(r'(?<!\\)(\\\[)(.+?)(\\\])'),    # \[...\]
-                       
self.markdown.inlinepatterns.Pattern(r'(?<!\\)(\\begin{[a-z]+\*?})(.+)(\\end{[a-z]+\*?})')
-               )
-               if not self.mathjax:
-                       inlinemathpatterns = inlinemathpatterns[1:]
-               patterns = []
-               for pattern in inlinemathpatterns:
-                       pattern.handleMatch = handle_match_inline
-                       patterns.append(pattern)
-               for pattern in mathpatterns:
-                       pattern.handleMatch = handle_match
-                       patterns.append(pattern)
-               return patterns
+                               module = importlib.import_module(prefix + 
extension_name)
+                               if not hasattr(module, 'makeExtension'):
+                                       continue
+                       except (ImportError, ValueError):
+                               pass
+                       else:
+                               return prefix + extension_name + parameters
 
        def _apply_extensions(self):
                extensions = (self.requested_extensions or
                        self.global_extensions) + self.document_extensions
-               # Remove duplicate entries
-               extensions = list(set(extensions))
-               # We have two "virtual" extensions
-               self.mathjax = ('mathjax' in extensions)
-               self.remove_mathjax = ('remove_extra' in extensions)
-               if 'remove_extra' in extensions:
-                       extensions.remove('remove_extra')
-               elif 'extra' not in extensions:
-                       extensions.append('extra')
-               if self.mathjax:
-                       extensions.remove('mathjax')
+               extensions_final = []
+               should_push_extra = True
+               should_push_mathjax = (True, False)
                for extension in extensions:
-                       if not extension:
-                               extensions.remove(extension)
-                               continue
-                       if not self._check_extension_exists(extension):
-                               sys.stderr.write('Extension "%s" does not 
exist.\n' % extension)
-                               extensions.remove(extension)
-               self.md = self.markdown.Markdown(extensions, 
output_format='html4')
-               for i, pattern in enumerate(self._get_mathjax_patterns()):
-                       self.md.inlinePatterns.add('mathjax%d' % i, pattern, 
'<escape')
-               self.extensions = extensions
+                       if extension == 'mathjax':
+                               should_push_mathjax = (True, True)
+                       elif extension == 'remove_extra':
+                               should_push_extra = False
+                               should_push_mathjax = (False, )
+                       else:
+                               canonical_name = 
self._canonicalize_extension_name(extension)
+                               if not canonical_name:
+                                       sys.stderr.write('Extension "%s" does 
not exist.\n' %
+                                               extension)
+                                       continue
+                               if canonical_name not in extensions_final:
+                                       extensions_final.append(canonical_name)
+               if should_push_extra:
+                       extensions_final.append('markdown.extensions.extra')
+               if should_push_mathjax[0]:
+                       
extensions_final.append('markups.mdx_mathjax(enable_dollar_delimiter=%r)' %
+                               should_push_mathjax[1])
+               self.md = self.markdown.Markdown(extensions_final, 
output_format='html4')
+               self.extensions = extensions_final
 
        def __init__(self, filename=None, extensions=None):
                AbstractMarkup.__init__(self, filename)
@@ -163,7 +134,7 @@
        def get_document_title(self, text):
                if not 'body' in self._cache:
                        self.get_document_body(text)
-               if 'meta' not in self.extensions:
+               if 'markdown.extensions.meta' not in self.extensions:
                        return ''
                if hasattr(self.md, 'Meta') and 'title' in self.md.Meta:
                        return str.join(' ', self.md.Meta['title'])
@@ -171,7 +142,7 @@
                        return ''
 
        def get_stylesheet(self, text=''):
-               if 'codehilite' in self.extensions:
+               if 'markdown.extensions.codehilite' in self.extensions:
                        return common.get_pygments_stylesheet('.codehilite')
                return ''
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/markups/mdx_mathjax.py 
new/Markups-0.6.0/markups/mdx_mathjax.py
--- old/Markups-0.5.2/markups/mdx_mathjax.py    1970-01-01 01:00:00.000000000 
+0100
+++ new/Markups-0.6.0/markups/mdx_mathjax.py    2015-01-25 11:53:08.000000000 
+0100
@@ -0,0 +1,61 @@
+# This file is part of python-markups module
+# License: BSD
+# Copyright: (C) Dmitry Shachnev, 2015
+
+'''
+Math extension for Python-Markdown
+==================================
+
+Adds support for displaying math formulas using 
[MathJax](http://www.mathjax.org/).
+
+Author: 2015, Dmitry Shachnev <[email protected]>.
+'''
+
+from __future__ import absolute_import
+
+import markdown
+
+class MathExtension(markdown.extensions.Extension):
+    def __init__(self, *args, **kwargs):
+        self.config = {
+            'enable_dollar_delimiter': [False, 'Enable single-dollar 
delimiter'],
+        }
+        super(MathExtension, self).__init__(*args, **kwargs)
+
+    def extendMarkdown(self, md, md_globals):
+        def handle_match_inline(m):
+            node = markdown.util.etree.Element('script')
+            node.set('type', 'math/tex')
+            node.text = markdown.util.AtomicString(m.group(3))
+            return node
+
+        def handle_match(m):
+            node = markdown.util.etree.Element('script')
+            node.set('type', 'math/tex; mode=display')
+            node.text = markdown.util.AtomicString(m.group(3))
+            if '\\begin' in m.group(2):
+                node.text = markdown.util.AtomicString(m.group(2) +
+                m.group(3) + m.group(4))
+            return node
+
+        configs = self.getConfigs()
+        inlinemathpatterns = (
+            markdown.inlinepatterns.Pattern(r'(?<!\\|\$)(\$)([^\$]+)(\$)'),  # 
 $...$
+            markdown.inlinepatterns.Pattern(r'(?<!\\)(\\\()(.+?)(\\\))')     # 
\(...\)
+        )
+        mathpatterns = (
+            markdown.inlinepatterns.Pattern(r'(?<!\\)(\$\$)([^\$]+)(\$\$)'), # 
$$...$$
+            markdown.inlinepatterns.Pattern(r'(?<!\\)(\\\[)(.+?)(\\\])'),    # 
\[...\]
+            
markdown.inlinepatterns.Pattern(r'(?<!\\)(\\begin{[a-z]+\*?})(.+)(\\end{[a-z]+\*?})')
+        )
+        if not configs['enable_dollar_delimiter']:
+            inlinemathpatterns = inlinemathpatterns[1:]
+        for i, pattern in enumerate(inlinemathpatterns):
+            pattern.handleMatch = handle_match_inline
+            md.inlinePatterns.add('math-inline-%d' % i, pattern, '<escape')
+        for i, pattern in enumerate(mathpatterns):
+            pattern.handleMatch = handle_match
+            md.inlinePatterns.add('math-%d' % i, pattern, '<escape')
+
+def makeExtension(*args, **kwargs):
+    return MathExtension(*args, **kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/markups/web.py 
new/Markups-0.6.0/markups/web.py
--- old/Markups-0.5.2/markups/web.py    2014-09-10 13:26:49.000000000 +0200
+++ new/Markups-0.6.0/markups/web.py    2015-01-25 17:15:18.000000000 +0100
@@ -4,10 +4,14 @@
 
 import os
 import markups
+import sys
 from email.utils import formatdate
 
+if sys.version_info[0] < 3:
+       raise ImportError('Python 3.x is required.')
+
 __version__ = markups.__version__
-site = 'https://launchpad.net/python-markups'
+site = 'https://github.com/mitya57/pymarkups'
 
 APP_NAME, APP_VERSION, APP_SITE = range(3)
 default_app_data = ('python-markups', __version__, site)
@@ -51,11 +55,7 @@
 
        def _init_template(self):
                templatefile = open(os.path.join(self.working_dir, 
'template.html'))
-               try:
-                       self.template = unicode(templatefile.read(), 'utf-8')
-               except NameError:
-                       # For Python 3
-                       self.template = templatefile.read()
+               self.template = templatefile.read()
                templatefile.close()
                self.template = self.template.replace('%GENERATOR%', 
self.generator_info)
                self.template = self.template.replace('%APPINFO%', 
self.app_info)
@@ -70,11 +70,6 @@
                inputfile = open(inputfile, 'r')
                text = inputfile.read()
                inputfile.close()
-               try:
-                       text = unicode(text, 'utf-8')
-               except NameError:
-                       # Not needed for Python 3
-                       pass
                markup.enable_cache = True
                html = markup.get_document_body(text).rstrip()
                pagename = markup.get_document_title(text)
@@ -84,11 +79,6 @@
                if html or bn == 'index':
                        content = self.template
                        content = content.replace('%CONTENT%', html)
-                       try:
-                               pagename = unicode(pagename, 'utf-8')
-                               bn = unicode(bn, 'utf-8')
-                       except (NameError, TypeError):
-                               pass # Not needed for Python 3
                        content = content.replace('%PAGENAME%', pagename)
                        content = content.replace('%SOURCEFILENAME%', fname)
                        content = content.replace('%EXTRAHEADERS%', javascript)
@@ -101,9 +91,5 @@
                        if not os.path.exists(htmldir):
                                os.mkdir(htmldir)
                        outputfile = open(os.path.join(htmldir, bn+'.html'), 
'w')
-                       try:
-                               outputfile.write(content.encode('utf-8'))
-                       except TypeError:
-                               # For Python 3
-                               outputfile.write(content)
+                       outputfile.write(content)
                        outputfile.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/setup.py new/Markups-0.6.0/setup.py
--- old/Markups-0.5.2/setup.py  2014-09-10 13:26:49.000000000 +0200
+++ new/Markups-0.6.0/setup.py  2015-01-25 10:49:11.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 import sys
 from distutils.core import setup, Command
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/tests/test_markdown.py 
new/Markups-0.6.0/tests/test_markdown.py
--- old/Markups-0.5.2/tests/test_markdown.py    2014-11-05 18:45:19.000000000 
+0100
+++ new/Markups-0.6.0/tests/test_markdown.py    2015-01-25 17:47:42.000000000 
+0100
@@ -117,10 +117,24 @@
 
        def test_extensions_loading(self):
                markup = MarkdownMarkup()
-               self.assertFalse(markup._check_extension_exists('nonexistent'))
-               
self.assertFalse(markup._check_extension_exists('nonexistent(someoption)'))
-               self.assertTrue(markup._check_extension_exists('meta'))
-               
self.assertTrue(markup._check_extension_exists('meta(someoption)'))
+               
self.assertIsNone(markup._canonicalize_extension_name('nonexistent'))
+               
self.assertIsNone(markup._canonicalize_extension_name('nonexistent(someoption)'))
+               self.assertEqual(markup._canonicalize_extension_name('meta'), 
'markdown.extensions.meta')
+               
self.assertEqual(markup._canonicalize_extension_name('meta(someoption)'),
+                       'markdown.extensions.meta(someoption)')
+
+       def test_loading_extensions_by_module_name(self):
+               markup = 
MarkdownMarkup(extensions=['markdown.extensions.footnotes'])
+               source = ('Footnotes[^1] have a label and the content.\n\n'
+                         '[^1]: This is a footnote content.')
+               html = markup.get_document_body(source)
+               self.assertIn('<sup', html)
+               self.assertIn('footnote-backref', html)
+
+       def test_removing_duplicate_extensions(self):
+               markup = MarkdownMarkup(extensions=['remove_extra', 'toc', 
'markdown.extensions.toc'])
+               self.assertEqual(len(markup.extensions), 1)
+               self.assertIn('markdown.extensions.toc', markup.extensions)
 
        def test_extensions_parameters(self):
                markup = MarkdownMarkup(extensions=['toc(anchorlink=1)'])
@@ -128,6 +142,13 @@
                self.assertEqual(html,
                        '<h2 id="header"><a class="toclink" 
href="#header">Header</a></h2>\n')
 
+       def test_document_extensions_parameters(self):
+               markup = MarkdownMarkup(extensions=[])
+               toc_header = '<!--- Required extensions: toc(anchorlink=1) 
--->\n\n'
+               html = markup.get_document_body(toc_header + '## Header')
+               self.assertEqual(html, toc_header +
+                       '<h2 id="header"><a class="toclink" 
href="#header">Header</a></h2>\n')
+
        def test_extra(self):
                markup = MarkdownMarkup()
                html = markup.get_document_body(tables_source)
@@ -187,5 +208,9 @@
                body = markup.get_document_body(mathjax_multiline_source)
                self.assertEqual(mathjax_multiline_output, body)
 
+       def test_not_loading_sys(self):
+               markup = MarkdownMarkup(extensions=['sys'])
+               self.assertNotIn('sys', markup.extensions)
+
 if __name__ == '__main__':
        unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.5.2/tests/test_web.py 
new/Markups-0.6.0/tests/test_web.py
--- old/Markups-0.5.2/tests/test_web.py 2014-09-10 13:26:49.000000000 +0200
+++ new/Markups-0.6.0/tests/test_web.py 2015-01-25 12:17:49.000000000 +0100
@@ -2,11 +2,16 @@
 # License: BSD
 # Copyright: (C) Dmitry Shachnev, 2012
 
-import markups.web
 import os
+import sys
 import unittest
 from markups.restructuredtext import ReStructuredTextMarkup
 
+if sys.version_info[0] < 3:
+       raise unittest.SkipTest('Python 3.x is required')
+
+import markups.web
+
 class WebTest(unittest.TestCase):
        @classmethod
        def setUpClass(cls):
@@ -49,8 +54,5 @@
                if os.path.exists(cls.get_file('html')):
                        os.rmdir(cls.get_file('html'))
 
-if not hasattr(WebTest, 'assertRaisesRegex'):
-       WebTest.assertRaisesRegex = WebTest.assertRaisesRegexp
-
 if __name__ == '__main__':
        unittest.main()

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to