Hello community,

here is the log from the commit of package python-Markdown for openSUSE:Factory 
checked in at 2015-03-12 16:38:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Markdown (Old)
 and      /work/SRC/openSUSE:Factory/.python-Markdown.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Markdown"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Markdown/python-Markdown.changes  
2015-02-24 13:06:59.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-Markdown.new/python-Markdown.changes     
2015-03-12 16:38:53.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Mar 10 18:46:09 UTC 2015 - benoit.mo...@gmx.fr
+
+- update to version 2.6.1: bugfix release
+  The (new) yaml option has been removed from the Meta-Data
+  Extension as it was buggy
+
+-------------------------------------------------------------------

Old:
----
  Markdown-2.6.tar.gz

New:
----
  Markdown-2.6.1.tar.gz

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

Other differences:
------------------
++++++ python-Markdown.spec ++++++
--- /var/tmp/diff_new_pack.31sOhJ/_old  2015-03-12 16:38:54.000000000 +0100
+++ /var/tmp/diff_new_pack.31sOhJ/_new  2015-03-12 16:38:54.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python-Markdown
-Version:        2.6
+Version:        2.6.1
 Release:        0
 Summary:        Python implementation of Markdown
 License:        BSD-3-Clause

++++++ Markdown-2.6.tar.gz -> Markdown-2.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/PKG-INFO new/Markdown-2.6.1/PKG-INFO
--- old/Markdown-2.6/PKG-INFO   2015-02-20 01:47:58.000000000 +0100
+++ new/Markdown-2.6.1/PKG-INFO 2015-03-09 02:15:34.000000000 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: Markdown
-Version: 2.6
+Version: 2.6.1
 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.tar.gz
+Download-URL: 
http://pypi.python.org/packages/source/M/Markdown/Markdown-2.6.1.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/docs/change_log.txt 
new/Markdown-2.6.1/docs/change_log.txt
--- old/Markdown-2.6/docs/change_log.txt        2015-02-20 01:40:52.000000000 
+0100
+++ new/Markdown-2.6.1/docs/change_log.txt      2015-03-09 02:13:55.000000000 
+0100
@@ -7,6 +7,10 @@
 Python-Markdown Change Log
 =========================
 
+Mar 8, 2015: Released version 2.6.1 (a bug-fix release). The (new)
+`yaml` option has been removed from the Meta-Data Extension as it was buggy
+(see [#390](https://github.com/waylan/Python-Markdown/issues/390)).
+
 Feb 19, 2015: Released version 2.6 ([Notes](release-2.6.html)).
 
 Nov 19, 2014: Released version 2.5.2 (a bug-fix release).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/docs/extensions/meta_data.txt 
new/Markdown-2.6.1/docs/extensions/meta_data.txt
--- old/Markdown-2.6/docs/extensions/meta_data.txt      2015-02-07 
18:41:18.000000000 +0100
+++ new/Markdown-2.6.1/docs/extensions/meta_data.txt    2015-03-09 
01:49:59.000000000 +0100
@@ -47,10 +47,11 @@
 The first blank line ends all meta-data for the document. Therefore, the first
 line of a document must not be blank.
 
-Alternatively, if the first line in the document is `---`, a YAML document
-separator, then the meta-data is searched for between it and the next `---`
-(or `...`) line. Even though YAML deliminators are supported, meta-data is
-not parsed as YAML unless the `yaml` option is set (see below).
+Alternatively, You may use YAML style deliminators to mark the start and/or end
+of your meta-data. When doing so, the first line of your document must be 
`---`.
+The meta-data ends at the first blank line or the first line containing an end
+deliminator (either `---` or `...`), whichever comes first. Even though YAML
+deliminators are supported, meta-data is not parsed as YAML.
 
 All meta-data is stripped from the document prior to any further processing
 by Markdown.
@@ -61,16 +62,6 @@
 See [Extensions](index.html) for general extension usage, specify 
`markdown.extensions.meta`
 as the name of the extension.
 
-The following options are provided to configure the output:
-
-* **`yaml`**: Support meta-data specified in YAML format.
-
-    Default: `False`
-
-    If `yaml` is set to `True`, the lines between `---` separators are parsed
-    as a full YAML object. PyYAML is required for this, and a warning is
-    issued if PyYAML (or equivalent) is not available.
-
 Accessing the Meta-Data
 -----------------------
 
@@ -100,11 +91,6 @@
 assumptions are made regarding the data. It is simply passed as found to the 
 `Meta` attribute.
 
-Note, if `yaml` option is set, the resulting `Meta` attribute is the object as
-returned by `yaml.load()` and may deviate significantly from the above
-description (e.g. may be a list of dictionaries, with value objects other than
-strings, ...).
-
 Perhaps the meta-data could be passed into a template system, or used by
 various Markdown extensions. The possibilities are left to the imagination of
 the developer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/docs/release-2.6.txt 
new/Markdown-2.6.1/docs/release-2.6.txt
--- old/Markdown-2.6/docs/release-2.6.txt       2015-02-19 00:44:49.000000000 
+0100
+++ new/Markdown-2.6.1/docs/release-2.6.txt     2015-03-09 01:43:44.000000000 
+0100
@@ -198,11 +198,15 @@
 actual data is parsed as previously.  This follows the syntax of
 [MultiMarkdown], which inspired this extension.
 
-Alternatively, if the `yaml` option is set, then the data is parsed as YAML.
+<del>Alternatively, if the `yaml` option is set, then the data is parsed as 
YAML.</del>
+<ins>As the `yaml` option was buggy, it was removed in 2.6.1. It is suggested 
that a third
+party extension be used if you want true YAML support. See [Issue #390][#390] 
for a full
+explanation.</ins>
 
 [MultiMarkdown]: http://fletcherpenney.net/MultiMarkdown_Syntax_Guide#metadata
 [Meta-Data]: extensions/meta_data.html
 [YAML]: http://yaml.org/
+[#390]: https://github.com/waylan/Python-Markdown/issues/390
 
 ### Table of Contents Extension Refactored
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/markdown/__init__.py 
new/Markdown-2.6.1/markdown/__init__.py
--- old/Markdown-2.6/markdown/__init__.py       2015-02-19 00:56:19.000000000 
+0100
+++ new/Markdown-2.6.1/markdown/__init__.py     2015-02-24 23:56:51.000000000 
+0100
@@ -121,7 +121,7 @@
                 # ignore any additional args
                 break
         if len(args):
-            warnings.warn('Positional arguments are depreacted in Markdown'
+            warnings.warn('Positional arguments are deprecated in Markdown. '
                           'Use keyword arguments only.',
                           DeprecationWarning)
 
@@ -135,7 +135,7 @@
             self.enable_attributes = False
 
         if 'safe_mode' in kwargs:
-            warnings.warn('"safe_mode" is deprecated in Python-Markdown'
+            warnings.warn('"safe_mode" is deprecated in Python-Markdown. '
                           'Use an HTML sanitizer (like '
                           'Bleach http://bleach.readthedocs.org/) '
                           'if you are parsing untrusted markdown text. '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/markdown/__version__.py 
new/Markdown-2.6.1/markdown/__version__.py
--- old/Markdown-2.6/markdown/__version__.py    2015-02-20 01:38:52.000000000 
+0100
+++ new/Markdown-2.6.1/markdown/__version__.py  2015-03-09 02:10:56.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, 0, 'final', 0)
+version_info = (2, 6, 1, 'final', 0)
 
 
 def _get_version():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/markdown/extensions/attr_list.py 
new/Markdown-2.6.1/markdown/extensions/attr_list.py
--- old/Markdown-2.6/markdown/extensions/attr_list.py   2014-11-21 
01:12:27.000000000 +0100
+++ new/Markdown-2.6.1/markdown/extensions/attr_list.py 2015-02-25 
01:04:28.000000000 +0100
@@ -55,8 +55,8 @@
 _scanner = Scanner([
     (r'[^ ]+=".*?"', _handle_double_quote),
     (r"[^ ]+='.*?'", _handle_single_quote),
-    (r'[^ ]+=[^ ]*', _handle_key_value),
-    (r'[^ ]+', _handle_word),
+    (r'[^ ]+=[^ =]+', _handle_key_value),
+    (r'[^ =]+', _handle_word),
     (r' ', None)
 ])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/markdown/extensions/meta.py 
new/Markdown-2.6.1/markdown/extensions/meta.py
--- old/Markdown-2.6/markdown/extensions/meta.py        2014-12-01 
04:17:42.000000000 +0100
+++ new/Markdown-2.6.1/markdown/extensions/meta.py      2015-03-09 
02:03:05.000000000 +0100
@@ -22,66 +22,40 @@
 import re
 import logging
 
-try:  # pragma: no cover
-    import yaml
-    try:
-        from yaml import CSafeLoader as SafeLoader
-    except ImportError:
-        from yaml import SafeLoader
-except ImportError:
-    yaml = None
-
 log = logging.getLogger('MARKDOWN')
 
 # Global Vars
 META_RE = re.compile(r'^[ ]{0,3}(?P<key>[A-Za-z0-9_-]+):\s*(?P<value>.*)')
 META_MORE_RE = re.compile(r'^[ ]{4,}(?P<value>.*)')
-YAML_BEGIN_RE = re.compile(r'^-{3}(\s.*)?')
-YAML_END_RE = re.compile(r'^(-{3}|\.{3})(\s.*)?')
+BEGIN_RE = re.compile(r'^-{3}(\s.*)?')
+END_RE = re.compile(r'^(-{3}|\.{3})(\s.*)?')
 
 
 class MetaExtension (Extension):
     """ Meta-Data extension for Python-Markdown. """
-    def __init__(self, *args, **kwargs):
-        self.config = {
-            'yaml': [False, "Parse meta data specified as a "
-                            "'---' delimited YAML front matter"],
-            }
-        super(MetaExtension, self).__init__(*args, **kwargs)
 
     def extendMarkdown(self, md, md_globals):
         """ Add MetaPreprocessor to Markdown instance. """
         md.preprocessors.add("meta",
-                             MetaPreprocessor(md, self.getConfigs()),
+                             MetaPreprocessor(md),
                              ">normalize_whitespace")
 
 
 class MetaPreprocessor(Preprocessor):
     """ Get Meta-Data. """
 
-    def __init__(self, md, config):
-        self.config = config
-        super(MetaPreprocessor, self).__init__(md)
-
     def run(self, lines):
         """ Parse Meta-Data and store in Markdown.Meta. """
         meta = {}
         key = None
-        yaml_block = []
-        have_yaml = False
-        if lines and YAML_BEGIN_RE.match(lines[0]):
-            have_yaml = True
+        if lines and BEGIN_RE.match(lines[0]):
             lines.pop(0)
-            if self.config['yaml'] and not yaml:  # pragma: no cover
-                log.warning('Document with YAML header, but PyYAML 
unavailable')
         while lines:
             line = lines.pop(0)
             m1 = META_RE.match(line)
-            if line.strip() == '' or have_yaml and YAML_END_RE.match(line):
+            if line.strip() == '' or END_RE.match(line):
                 break  # blank line or end of YAML header - done
-            elif have_yaml and self.config['yaml'] and yaml:
-                yaml_block.append(line)
-            elif m1:
+            if m1:
                 key = m1.group('key').lower().strip()
                 value = m1.group('value').strip()
                 try:
@@ -96,8 +70,6 @@
                 else:
                     lines.insert(0, line)
                     break  # no meta data - done
-        if yaml_block:
-            meta = yaml.load('\n'.join(yaml_block), SafeLoader)
         self.markdown.Meta = meta
         return lines
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/tests/extensions/attr_list.html 
new/Markdown-2.6.1/tests/extensions/attr_list.html
--- old/Markdown-2.6/tests/extensions/attr_list.html    2014-11-03 
05:43:58.000000000 +0100
+++ new/Markdown-2.6.1/tests/extensions/attr_list.html  2015-02-25 
01:04:28.000000000 +0100
@@ -57,4 +57,10 @@
 <dd><em class="inline">dd</em></dd>
 <dt><em class="inline">DT3</em></dt>
 <dd>Some dd</dd>
-</dl>
\ No newline at end of file
+</dl>
+<h1>Bad attributes</h1>
+<p>Key without <em foo="foo">value</em></p>
+<p>Value without <em>key</em></p>
+<p>No <em>key or value</em></p>
+<p><em>Weirdness</em></p>
+<p><em>More weirdness</em></p>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/tests/extensions/attr_list.txt 
new/Markdown-2.6.1/tests/extensions/attr_list.txt
--- old/Markdown-2.6/tests/extensions/attr_list.txt     2014-11-03 
05:43:58.000000000 +0100
+++ new/Markdown-2.6.1/tests/extensions/attr_list.txt   2015-02-25 
01:04:28.000000000 +0100
@@ -76,3 +76,15 @@
 *DT3*{.inline}
 :   Some dd
 
+# Bad attributes
+
+Key without *value*{ foo= }
+
+Value without *key*{ =bar }
+
+No *key or value*{ = }
+
+*Weirdness*{ == }
+
+*More weirdness*{ === }
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Markdown-2.6/tests/test_extensions.py 
new/Markdown-2.6.1/tests/test_extensions.py
--- old/Markdown-2.6/tests/test_extensions.py   2015-02-06 03:55:11.000000000 
+0100
+++ new/Markdown-2.6.1/tests/test_extensions.py 2015-03-09 02:03:17.000000000 
+0100
@@ -8,7 +8,6 @@
 """
 
 from __future__ import unicode_literals
-import datetime
 import unittest
 import markdown
 
@@ -510,25 +509,6 @@
         self.assertEqual(self.md.convert(text), '')
         self.assertEqual(self.md.Meta, {'title': ['No newline']})
 
-    def testYamlObjectMetaData(self):
-        """ Test metadata specified as a complex YAML object. """
-        md = 
markdown.Markdown(extensions=[markdown.extensions.meta.MetaExtension(yaml=True)])
-        text = '''---
-Author: John Doe
-Date: 2014-11-29 14:15:16
-Integer: 0x16
----
-
-Some content.'''
-        self.assertEqual(md.convert(text), '<p>Some content.</p>')
-        self.assertEqual(
-            md.Meta, {
-                'Author': 'John Doe',
-                'Date': datetime.datetime(2014, 11, 29, 14, 15, 16),
-                'Integer': 22
-            }
-        )
-
 
 class TestWikiLinks(unittest.TestCase):
     """ Test Wikilinks Extension. """

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to