Hello community,

here is the log from the commit of package python3-Markups for openSUSE:Factory 
checked in at 2015-04-25 21:51:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-30 06:12:29.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-Markups.new/python3-Markups.changes     
2015-04-25 21:51:14.000000000 +0200
@@ -1,0 +2,16 @@
+Sat Apr 25 18:24:19 UTC 2015 - [email protected]
+
+- specfile:
+  * updated url
+  * README -> README.rst
+
+- update to version 0.6.1:
+  * PyMarkups now uses warnings system instead of printing messages
+    to stderr.
+  * Improvements to Markdown markup:
+    + Fixed parsing math that contains nested environments
+      (thanks to Gautam Iyer for the patch).
+    + Fixed crash on extensions names starting with dot.
+  * Miscellaneous fixes.
+
+-------------------------------------------------------------------

Old:
----
  Markups-0.6.0.tar.gz

New:
----
  Markups-0.6.1.tar.gz

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

Other differences:
------------------
++++++ python3-Markups.spec ++++++
--- /var/tmp/diff_new_pack.Y0k0eW/_old  2015-04-25 21:51:15.000000000 +0200
+++ /var/tmp/diff_new_pack.Y0k0eW/_new  2015-04-25 21:51:15.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python3-Markups
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 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,12 +17,12 @@
 
 
 Name:           python3-Markups
-Version:        0.6.0
+Version:        0.6.1
 Release:        0
 Summary:        A wrapper around various text markups
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
-Url:            http://launchpad.net/python-markups
+Url:            https://github.com/mitya57/pymarkups
 Source:         
https://pypi.python.org/packages/source/M/Markups/Markups-%{version}.tar.gz
 BuildRequires:  python3-devel
 BuildRequires:  python3-nose
@@ -44,7 +44,7 @@
 
 %files
 %defattr(-,root,root,-)
-%doc README changelog LICENSE
+%doc README.rst changelog LICENSE
 %{python3_sitelib}/*
 
 %changelog

++++++ Markups-0.6.0.tar.gz -> Markups-0.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/LICENSE new/Markups-0.6.1/LICENSE
--- old/Markups-0.6.0/LICENSE   2014-07-21 12:46:02.000000000 +0200
+++ new/Markups-0.6.1/LICENSE   2015-02-04 08:17:49.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright 2012 Dmitry Shachnev <[email protected]>.
+Copyright 2012-2015 Dmitry Shachnev <[email protected]>.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/MANIFEST.in 
new/Markups-0.6.1/MANIFEST.in
--- old/Markups-0.6.0/MANIFEST.in       2014-07-25 21:09:34.000000000 +0200
+++ new/Markups-0.6.1/MANIFEST.in       2015-02-04 08:17:49.000000000 +0100
@@ -1,4 +1,5 @@
 include LICENSE
+include README.rst
 include changelog
 include examples/example-template.html
 recursive-include docs *.rst conf.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/Markups.egg-info/PKG-INFO 
new/Markups-0.6.1/Markups.egg-info/PKG-INFO
--- old/Markups-0.6.0/Markups.egg-info/PKG-INFO 2015-01-25 17:57:10.000000000 
+0100
+++ new/Markups-0.6.1/Markups.egg-info/PKG-INFO 2015-04-19 10:29:20.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Markups
-Version: 0.6.0
+Version: 0.6.1
 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.6.0/Markups.egg-info/SOURCES.txt 
new/Markups-0.6.1/Markups.egg-info/SOURCES.txt
--- old/Markups-0.6.0/Markups.egg-info/SOURCES.txt      2015-01-25 
17:57:11.000000000 +0100
+++ new/Markups-0.6.1/Markups.egg-info/SOURCES.txt      2015-04-19 
10:29:22.000000000 +0200
@@ -1,6 +1,6 @@
 LICENSE
 MANIFEST.in
-README
+README.rst
 changelog
 setup.py
 Markups.egg-info/PKG-INFO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/PKG-INFO new/Markups-0.6.1/PKG-INFO
--- old/Markups-0.6.0/PKG-INFO  2015-01-25 17:57:11.000000000 +0100
+++ new/Markups-0.6.1/PKG-INFO  2015-04-19 10:29:22.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Markups
-Version: 0.6.0
+Version: 0.6.1
 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.6.0/README new/Markups-0.6.1/README
--- old/Markups-0.6.0/README    2014-07-21 12:24:09.000000000 +0200
+++ new/Markups-0.6.1/README    1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-This module provides a wrapper around the various text markup languages,
-such as Markdown_ and reStructuredText_ (these two are supported by default).
-
-Usage example:
-
->>> markup = markups.get_markup_for_file_name("myfile.rst")
->>> markup.name
-'reStructuredText'
->>> markup.attributes[markups.SYNTAX_DOCUMENTATION]
-'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html'
->>> text = "Hello, world!\n=============\n\nThis is an example 
**reStructuredText** document."
->>> markup.get_document_title(text)
-'Hello, world!'
->>> markup.get_document_body(text)
-'<p>This is an example <strong>reStructuredText</strong> document.</p>\n'
-
-.. _Markdown: http://daringfireball.net/projects/markdown/
-.. _reStructuredText: http://docutils.sourceforge.net/rst.html
-
-The release version can be downloaded from PyPI_.
-
-.. _PyPI: http://pypi.python.org/pypi/Markups
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/README.rst new/Markups-0.6.1/README.rst
--- old/Markups-0.6.0/README.rst        1970-01-01 01:00:00.000000000 +0100
+++ new/Markups-0.6.1/README.rst        2015-02-04 08:17:49.000000000 +0100
@@ -0,0 +1,22 @@
+This module provides a wrapper around the various text markup languages,
+such as Markdown_ and reStructuredText_ (these two are supported by default).
+
+Usage example:
+
+>>> markup = markups.get_markup_for_file_name("myfile.rst")
+>>> markup.name
+'reStructuredText'
+>>> markup.attributes[markups.SYNTAX_DOCUMENTATION]
+'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html'
+>>> text = "Hello, world!\n=============\n\nThis is an example 
**reStructuredText** document."
+>>> markup.get_document_title(text)
+'Hello, world!'
+>>> markup.get_document_body(text)
+'<p>This is an example <strong>reStructuredText</strong> document.</p>\n'
+
+.. _Markdown: http://daringfireball.net/projects/markdown/
+.. _reStructuredText: http://docutils.sourceforge.net/rst.html
+
+The release version can be downloaded from PyPI_.
+
+.. _PyPI: http://pypi.python.org/pypi/Markups
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/changelog new/Markups-0.6.1/changelog
--- old/Markups-0.6.0/changelog 2015-01-25 17:35:19.000000000 +0100
+++ new/Markups-0.6.1/changelog 2015-04-19 10:26:37.000000000 +0200
@@ -1,3 +1,16 @@
+Version 0.6.1, 2015-04-19
+=========================
+
+* PyMarkups now uses warnings system instead of printing messages
+  to stderr.
+* Improvements to Markdown markup:
+
+  + Fixed parsing math that contains nested environments
+    (thanks to Gautam Iyer for the patch).
+  + Fixed crash on extensions names starting with dot.
+
+* Miscellaneous fixes.
+
 Version 0.6, 2015-01-25
 =======================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/markups/__init__.py 
new/Markups-0.6.1/markups/__init__.py
--- old/Markups-0.6.0/markups/__init__.py       2015-01-25 17:49:07.000000000 
+0100
+++ new/Markups-0.6.1/markups/__init__.py       2015-04-19 10:20:58.000000000 
+0200
@@ -4,13 +4,13 @@
 
 import importlib
 import os
-import sys
+import warnings
 from markups.common import CONFIGURATION_DIR
 from markups.markdown import MarkdownMarkup
 from markups.restructuredtext import ReStructuredTextMarkup
 from markups.textile import TextileMarkup
 
-__version_tuple__ = (0, 6, 0)
+__version_tuple__ = (0, 6, 1)
 __version__ = '.'.join(map(str, __version_tuple__))
 
 builtin_markups = [MarkdownMarkup, ReStructuredTextMarkup, TextileMarkup]
@@ -34,7 +34,8 @@
                                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)
+                               warnings.warn('Warning: cannot import module 
%r.' %
+                                       markup_name, ImportWarning)
                return custom_markups
 
 def get_all_markups():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/markups/common.py 
new/Markups-0.6.1/markups/common.py
--- old/Markups-0.6.0/markups/common.py 2014-07-21 12:46:02.000000000 +0200
+++ new/Markups-0.6.1/markups/common.py 2015-04-07 10:14:10.000000000 +0200
@@ -9,10 +9,13 @@
 CONFIGURATION_DIR = (os.environ.get('XDG_CONFIG_HOME') or
        os.path.expanduser('~/.config'))
 MATHJAX_LOCAL_URL = 'file:///usr/share/javascript/mathjax/MathJax.js'
-MATHJAX_WEB_URL = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js'
+MATHJAX_WEB_URL = 'https://cdn.mathjax.org/mathjax/latest/MathJax.js'
 
 PYGMENTS_STYLE = 'default'
 
+class MarkupsWarning(RuntimeWarning):
+       pass
+
 def get_pygments_stylesheet(selector, style=None):
        if style is None:
                style = PYGMENTS_STYLE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/markups/markdown.py 
new/Markups-0.6.1/markups/markdown.py
--- old/Markups-0.6.0/markups/markdown.py       2015-01-25 17:00:22.000000000 
+0100
+++ new/Markups-0.6.1/markups/markdown.py       2015-04-07 10:30:30.000000000 
+0200
@@ -7,7 +7,7 @@
 import importlib
 import os
 import re
-import sys
+import warnings
 import markups.common as common
 from markups.abstract import AbstractMarkup
 
@@ -89,7 +89,7 @@
                                module = importlib.import_module(prefix + 
extension_name)
                                if not hasattr(module, 'makeExtension'):
                                        continue
-                       except (ImportError, ValueError):
+                       except (ImportError, ValueError, TypeError):
                                pass
                        else:
                                return prefix + extension_name + parameters
@@ -109,8 +109,8 @@
                        else:
                                canonical_name = 
self._canonicalize_extension_name(extension)
                                if not canonical_name:
-                                       sys.stderr.write('Extension "%s" does 
not exist.\n' %
-                                               extension)
+                                       warnings.warn('Extension "%s" does not 
exist.' %
+                                               extension, ImportWarning)
                                        continue
                                if canonical_name not in extensions_final:
                                        extensions_final.append(canonical_name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/markups/mdx_mathjax.py 
new/Markups-0.6.1/markups/mdx_mathjax.py
--- old/Markups-0.6.0/markups/mdx_mathjax.py    2015-01-25 11:53:08.000000000 
+0100
+++ new/Markups-0.6.1/markups/mdx_mathjax.py    2015-04-19 10:17:45.000000000 
+0200
@@ -32,10 +32,10 @@
         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))
+                node.text = markdown.util.AtomicString(m.group(2) + m.group(4) 
+ m.group(5))
+            else:
+                node.text = markdown.util.AtomicString(m.group(3))
             return node
 
         configs = self.getConfigs()
@@ -46,7 +46,7 @@
         mathpatterns = (
             markdown.inlinepatterns.Pattern(r'(?<!\\)(\$\$)([^\$]+)(\$\$)'), # 
$$...$$
             markdown.inlinepatterns.Pattern(r'(?<!\\)(\\\[)(.+?)(\\\])'),    # 
\[...\]
-            
markdown.inlinepatterns.Pattern(r'(?<!\\)(\\begin{[a-z]+\*?})(.+)(\\end{[a-z]+\*?})')
+            
markdown.inlinepatterns.Pattern(r'(?<!\\)(\\begin{([a-z]+?\*?)})(.+?)(\\end{\3})')
         )
         if not configs['enable_dollar_delimiter']:
             inlinemathpatterns = inlinemathpatterns[1:]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/markups/textile.py 
new/Markups-0.6.1/markups/textile.py
--- old/Markups-0.6.0/markups/textile.py        2014-07-23 12:21:03.000000000 
+0200
+++ new/Markups-0.6.1/markups/textile.py        2015-02-04 08:17:49.000000000 
+0100
@@ -13,7 +13,7 @@
        """
        name = 'Textile'
        attributes = {
-               common.LANGUAGE_HOME_PAGE: 'http://textile.sitemonks.com/',
+               common.LANGUAGE_HOME_PAGE: 
'http://en.wikipedia.org/wiki/Textile_(markup_language)',
                common.MODULE_HOME_PAGE: 
'https://github.com/sebix/python-textile',
                common.SYNTAX_DOCUMENTATION: 
'http://movabletype.org/documentation/author/textile-2-syntax.html'
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/setup.cfg new/Markups-0.6.1/setup.cfg
--- old/Markups-0.6.0/setup.cfg 2015-01-25 17:57:11.000000000 +0100
+++ new/Markups-0.6.1/setup.cfg 2015-04-19 10:29:22.000000000 +0200
@@ -1,5 +1,5 @@
 [egg_info]
-tag_date = 0
-tag_svn_revision = 0
 tag_build = 
+tag_svn_revision = 0
+tag_date = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/tests/test_markdown.py 
new/Markups-0.6.1/tests/test_markdown.py
--- old/Markups-0.6.0/tests/test_markdown.py    2015-01-25 17:47:42.000000000 
+0100
+++ new/Markups-0.6.1/tests/test_markdown.py    2015-04-19 10:15:08.000000000 
+0200
@@ -107,6 +107,27 @@
 </p>
 '''
 
+mathjax_multilevel_source = \
+r'''
+\begin{equation*}
+  \begin{pmatrix}
+    1 & 0\\
+    0 & 1
+  \end{pmatrix}
+\end{equation*}
+'''
+
+mathjax_multilevel_output = \
+r'''<p>
+<script type="math/tex; mode=display">\begin{equation*}
+  \begin{pmatrix}
+    1 & 0\\
+    0 & 1
+  \end{pmatrix}
+\end{equation*}</script>
+</p>
+'''
+
 @unittest.skipUnless(MarkdownMarkup.available(), 'Markdown not available')
 class MarkdownTest(unittest.TestCase):
        maxDiff = None
@@ -119,6 +140,7 @@
                markup = MarkdownMarkup()
                
self.assertIsNone(markup._canonicalize_extension_name('nonexistent'))
                
self.assertIsNone(markup._canonicalize_extension_name('nonexistent(someoption)'))
+               
self.assertIsNone(markup._canonicalize_extension_name('.foobar'))
                self.assertEqual(markup._canonicalize_extension_name('meta'), 
'markdown.extensions.meta')
                
self.assertEqual(markup._canonicalize_extension_name('meta(someoption)'),
                        'markdown.extensions.meta(someoption)')
@@ -208,8 +230,15 @@
                body = markup.get_document_body(mathjax_multiline_source)
                self.assertEqual(mathjax_multiline_output, body)
 
+       def test_mathjax_multilevel(self):
+               markup = MarkdownMarkup()
+               body = markup.get_document_body(mathjax_multilevel_source)
+               self.assertEqual(mathjax_multilevel_output, body)
+
+       @unittest.skipUnless(hasattr(unittest.TestCase, 'assertWarnsRegex'), 
'assertWarnsRegex is not supported')
        def test_not_loading_sys(self):
-               markup = MarkdownMarkup(extensions=['sys'])
+               with self.assertWarnsRegex(ImportWarning, 'Extension "sys" does 
not exist.'):
+                       markup = MarkdownMarkup(extensions=['sys'])
                self.assertNotIn('sys', markup.extensions)
 
 if __name__ == '__main__':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markups-0.6.0/tests/test_public_api.py 
new/Markups-0.6.1/tests/test_public_api.py
--- old/Markups-0.6.0/tests/test_public_api.py  2014-07-21 12:41:32.000000000 
+0200
+++ new/Markups-0.6.1/tests/test_public_api.py  2015-04-10 16:06:21.000000000 
+0200
@@ -15,7 +15,7 @@
                markup_class = markups.get_markup_for_file_name('myfile.mkd', 
return_class=True)
                self.assertEqual(markups.MarkdownMarkup, markup_class)
                markup = markups.get_markup_for_file_name('myfile.mkd')
-               self.assertTrue(isinstance(markup, markups.MarkdownMarkup))
+               self.assertIsInstance(markup, markups.MarkdownMarkup)
 
 if __name__ == '__main__':
        unittest.main()


Reply via email to