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 - arun@gmx.de
+
+- 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'(?http://www.mathjax.org/).
+
+Author: 2015, Dmitry Shachnev