Accepting request 688902 from home:benoit_monin:branches:devel:languages:python

- update to version 3.1
- remove yaml5.patch: merged upstream

OBS-URL: https://build.opensuse.org/request/show/688902
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Markdown?expand=0&rev=55
This commit is contained in:
Tomáš Chvátal 2019-03-27 06:29:33 +00:00 committed by Git OBS Bridge
parent ee3c9f4d54
commit 79bd98028f
5 changed files with 35 additions and 52 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d02e0f9b04c500cde6637c11ad7c72671f359b87b9fe924b2383649d8841db7c
size 284084

3
Markdown-3.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fc4a6f69a656b8d858d7503bda633f4dd63c2d70cf80abdc6eafa64c4ae8c250
size 293761

View File

@ -1,3 +1,34 @@
-------------------------------------------------------------------
Tue Mar 26 19:34:04 UTC 2019 - Benoît Monin <benoit.monin@gmx.fr>
- update to version 3.1:
* The following new features have been included in the release:
+ A Contributing Guide has been added (#732)
+ A new configuration option to set the footnote separator has
been added. Also, the rel and rev attributes have been
removed from footnotes as they are not valid in HTML5. The
refs and backrefs classes already exist and serve the same
purpose (#723).
+ A new option for toc_depth to set not only the bottom section
level, but also the top section level. A string consisting of
two digits separated by a hyphen in between ("2-5"), defines
the top (t) and the bottom (b) (<ht>..<hb>). A single integer
still defines the bottom section level (<h1>..<hb>) only.(#787)
* The following bug fixes are included in the 3.1 release:
+ Update CLI to support PyYAML 5.1.
+ Overlapping raw HTML matches no longer leave placeholders
behind (#458).
+ Emphasis patterns now recognize newline characters as
whitespace (#783).
+ Version format had been updated to be PEP 440 compliant
(#736).
+ Block level elements are defined per instance, not as class
attributes (#731).
+ Double escaping of block code has been eliminated (#725).
+ Problems with newlines in references has been fixed (#742).
+ Escaped # are now handled in header syntax (#762).
- remove yaml5.patch: merged upstream
-------------------------------------------------------------------
Fri Mar 15 12:20:56 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-Markdown
Version: 3.0.1
Version: 3.1
Release: 0
Summary: Python implementation of Markdown
License: BSD-3-Clause
@ -27,7 +27,6 @@ Group: Development/Languages/Python
Url: https://python-markdown.github.io/
Source: https://files.pythonhosted.org/packages/source/M/Markdown/Markdown-%{version}.tar.gz
Patch0: markdown-3.0-python37.patch
Patch1: yaml5.patch
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module xml}

View File

@ -1,47 +0,0 @@
From 0861bb0df43a20737c38029bcf7d09b14d17352f Mon Sep 17 00:00:00 2001
From: Waylan Limberg <waylan.limberg@icloud.com>
Date: Thu, 14 Mar 2019 09:17:31 -0400
Subject: [PATCH] Update CLI to support PyYAML 5.1
This should avoid any warnings. We use `unsafe_load` because users may
need to pass in actual Python objects. As this is only available from
the CLI, the user has much worse problems if an attacker can use this
as an attach vector.
---
docs/change_log/release-3.1.md | 1 +
markdown/__main__.py | 14 +++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/markdown/__main__.py b/markdown/__main__.py
index 38d08fe0..43e486c9 100644
--- a/markdown/__main__.py
+++ b/markdown/__main__.py
@@ -26,9 +26,17 @@
import warnings
import markdown
try:
- import yaml
+ # We use `unsafe_load` because users may need to pass in actual Python
+ # objects. As this is only available from the CLI, the user has much
+ # worse problems if an attacker can use this as an attach vector.
+ from yaml import unsafe_load as yaml_load
except ImportError: # pragma: no cover
- import json as yaml
+ try:
+ # Fall back to PyYAML <5.1
+ from yaml import load as yaml_load
+ except ImportError:
+ # Fall back to JSON
+ from json import load as yaml_load
import logging
from logging import DEBUG, WARNING, CRITICAL
@@ -97,7 +105,7 @@ def parse_options(args=None, values=None):
options.configfile, mode="r", encoding=options.encoding
) as fp:
try:
- extension_configs = yaml.load(fp)
+ extension_configs = yaml_load(fp)
except Exception as e:
message = "Failed parsing extension config file: %s" % \
options.configfile