Accepting request 681074 from home:jayvdb:noflake8
- Add de-vendor.patch to avoid new vendoring of html5lib in v3.1.0 - Remove direct dependency on webencodings, a dependency of html5lib - Update to v3.1.0 OBS-URL: https://build.opensuse.org/request/show/681074 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bleach?expand=0&rev=24
This commit is contained in:
parent
64204dd675
commit
b1e5f6a0bb
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:eb7386f632349d10d9ce9d4a838b134d4731571851149f9cc2c05a9a837a9a44
|
|
||||||
size 60141
|
|
3
bleach-3.1.0.tar.gz
Normal file
3
bleach-3.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3fdf7f77adcf649c9911387df51254b813185e32b2c6619f690b593a617e19fa
|
||||||
|
size 167814
|
37
de-vendor.patch
Normal file
37
de-vendor.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
--- bleach-3.1.0/bleach/html5lib_shim.py.orig 2019-03-03 16:10:33.148796311 +0700
|
||||||
|
+++ bleach-3.1.0/bleach/html5lib_shim.py 2019-03-03 16:11:07.945088029 +0700
|
||||||
|
@@ -11,23 +11,23 @@
|
||||||
|
|
||||||
|
import six
|
||||||
|
|
||||||
|
-from bleach._vendor.html5lib import (
|
||||||
|
+from html5lib import (
|
||||||
|
HTMLParser,
|
||||||
|
getTreeWalker,
|
||||||
|
)
|
||||||
|
-from bleach._vendor.html5lib import constants
|
||||||
|
-from bleach._vendor.html5lib.constants import (
|
||||||
|
+from html5lib import constants
|
||||||
|
+from html5lib.constants import (
|
||||||
|
namespaces,
|
||||||
|
prefixes,
|
||||||
|
)
|
||||||
|
-from bleach._vendor.html5lib.constants import _ReparseException as ReparseException
|
||||||
|
-from bleach._vendor.html5lib.filters.base import Filter
|
||||||
|
-from bleach._vendor.html5lib.filters.sanitizer import allowed_protocols
|
||||||
|
-from bleach._vendor.html5lib.filters.sanitizer import Filter as SanitizerFilter
|
||||||
|
-from bleach._vendor.html5lib._inputstream import HTMLInputStream
|
||||||
|
-from bleach._vendor.html5lib.serializer import HTMLSerializer
|
||||||
|
-from bleach._vendor.html5lib._tokenizer import HTMLTokenizer
|
||||||
|
-from bleach._vendor.html5lib._trie import Trie
|
||||||
|
+from html5lib.constants import _ReparseException as ReparseException
|
||||||
|
+from html5lib.filters.base import Filter
|
||||||
|
+from html5lib.filters.sanitizer import allowed_protocols
|
||||||
|
+from html5lib.filters.sanitizer import Filter as SanitizerFilter
|
||||||
|
+from html5lib._inputstream import HTMLInputStream
|
||||||
|
+from html5lib.serializer import HTMLSerializer
|
||||||
|
+from html5lib._tokenizer import HTMLTokenizer
|
||||||
|
+from html5lib._trie import Trie
|
||||||
|
|
||||||
|
|
||||||
|
#: Map of entity name to expanded entity
|
@ -1,3 +1,54 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Mar 3 09:14:50 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
- Add de-vendor.patch to avoid new vendoring of html5lib in v3.1.0
|
||||||
|
- Remove direct dependency on webencodings, a dependency of html5lib
|
||||||
|
- Update to v3.1.0
|
||||||
|
* Add ``recognized_tags`` argument to the linkify ``Linker`` class. This
|
||||||
|
fixes issues when linkifying on its own and having some tags get escaped.
|
||||||
|
It defaults to a list of HTML5 tags
|
||||||
|
* Add ``six>=1.9`` to requirements
|
||||||
|
* Fix cases where attribute names could have invalid characters in them.
|
||||||
|
* Fix problems with ``LinkifyFilter`` not being able to match links
|
||||||
|
across ``&``.
|
||||||
|
* Fix ``InputStreamWithMemory`` when the ``BleachHTMLParser`` is
|
||||||
|
parsing ``meta`` tags
|
||||||
|
* Fix doctests.
|
||||||
|
- from v3.0.2
|
||||||
|
* Merge ``Characters`` tokens after sanitizing them. This fixes issues
|
||||||
|
in the ``LinkifyFilter`` where it was only linkifying parts of urls
|
||||||
|
- from v3.0.1
|
||||||
|
* Support Python 3.7. It supported Python 3.7 just fine, but 3.7 was
|
||||||
|
added to the list of Python environments being test
|
||||||
|
* Fix ``list`` object has no attribute ``lower`` in ``clean``
|
||||||
|
* Fix ``abbr`` getting escaped in ``linkify``
|
||||||
|
- from v3.0.0
|
||||||
|
* [breaking] A bunch of functions were moved from one module to another.
|
||||||
|
These were moved from ``bleach.sanitizer`` to ``bleach.html5lib_shim``:
|
||||||
|
+ convert_entity
|
||||||
|
+ convert_entities
|
||||||
|
+ match_entity
|
||||||
|
+ next_possible_entity
|
||||||
|
+ BleachHTMLSerializer
|
||||||
|
+ BleachHTMLTokenizer
|
||||||
|
+ BleachHTMLParser
|
||||||
|
These functions and classes weren't documented and aren't part of the
|
||||||
|
public API, but people read code and might be using them so we're
|
||||||
|
considering it an incompatible API change.
|
||||||
|
If you're using them, you'll need to update your code.
|
||||||
|
* Bleach no longer depends on html5lib. html5lib==1.0.1 is now vendored into
|
||||||
|
Bleach. You can remove it from your requirements file if none of your other
|
||||||
|
requirements require html5lib.
|
||||||
|
This means Bleach will now work fine with other libraries that depend on
|
||||||
|
html5lib regardless of what version of html5lib they require.
|
||||||
|
* Fixed tags getting added when using clean or linkify. This was a
|
||||||
|
long-standing regression from the Bleach 2.0 rewrite
|
||||||
|
* Fixed ``<isindex>`` getting replaced with a string. Now it gets escaped or
|
||||||
|
stripped depending on whether it's in the allowed tags or not
|
||||||
|
- from v2.1.4
|
||||||
|
* Dropped support for Python 3.3
|
||||||
|
* Handle ambiguous ampersands in correctly
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 5 01:56:44 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
Wed Dec 5 01:56:44 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-bleach
|
# spec file for package python-bleach
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
|
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -19,24 +19,23 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-bleach
|
Name: python-bleach
|
||||||
Version: 2.1.3
|
Version: 3.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A whitelist-based HTML-sanitizing tool
|
Summary: A whitelist-based HTML-sanitizing tool
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://github.com/jsocol/bleach
|
URL: http://github.com/jsocol/bleach
|
||||||
Source: https://files.pythonhosted.org/packages/source/b/bleach/bleach-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/b/bleach/bleach-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module html5lib >= 0.99999999}
|
Patch0: de-vendor.patch
|
||||||
BuildRequires: %{python_module pytest-runner}
|
BuildRequires: %{python_module html5lib >= 1.0.0}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest >= 3.0.0}
|
||||||
|
BuildRequires: %{python_module pytest-runner >= 2.0}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six >= 1.9}
|
||||||
BuildRequires: %{python_module webencodings}
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-html5lib >= 0.99999999
|
Requires: python-html5lib >= 1.0.0
|
||||||
Requires: python-six
|
Requires: python-six >= 1.9
|
||||||
Requires: python-webencodings
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -56,6 +55,8 @@ Documentation is at http://bleach.readthedocs.org/ .
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n bleach-%{version}
|
%setup -q -n bleach-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
rm -rf bleach/_vendor
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
Loading…
Reference in New Issue
Block a user