diff --git a/bleach-2.1.3.tar.gz b/bleach-2.1.3.tar.gz deleted file mode 100644 index d3a43fc..0000000 --- a/bleach-2.1.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb7386f632349d10d9ce9d4a838b134d4731571851149f9cc2c05a9a837a9a44 -size 60141 diff --git a/bleach-3.1.0.tar.gz b/bleach-3.1.0.tar.gz new file mode 100644 index 0000000..9660d90 --- /dev/null +++ b/bleach-3.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fdf7f77adcf649c9911387df51254b813185e32b2c6619f690b593a617e19fa +size 167814 diff --git a/de-vendor.patch b/de-vendor.patch new file mode 100644 index 0000000..e626c16 --- /dev/null +++ b/de-vendor.patch @@ -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 diff --git a/python-bleach.changes b/python-bleach.changes index ac7c7fb..3933183 100644 --- a/python-bleach.changes +++ b/python-bleach.changes @@ -1,3 +1,54 @@ +------------------------------------------------------------------- +Sun Mar 3 09:14:50 UTC 2019 - John Vandenberg + +- 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 ```` 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 diff --git a/python-bleach.spec b/python-bleach.spec index 6524db0..0f4242e 100644 --- a/python-bleach.spec +++ b/python-bleach.spec @@ -1,7 +1,7 @@ # # 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. # # All modifications and additions to the file contributed by third parties @@ -19,24 +19,23 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-bleach -Version: 2.1.3 +Version: 3.1.0 Release: 0 Summary: A whitelist-based HTML-sanitizing tool License: Apache-2.0 Group: Development/Languages/Python URL: http://github.com/jsocol/bleach Source: https://files.pythonhosted.org/packages/source/b/bleach/bleach-%{version}.tar.gz -BuildRequires: %{python_module html5lib >= 0.99999999} -BuildRequires: %{python_module pytest-runner} -BuildRequires: %{python_module pytest} +Patch0: de-vendor.patch +BuildRequires: %{python_module html5lib >= 1.0.0} +BuildRequires: %{python_module pytest >= 3.0.0} +BuildRequires: %{python_module pytest-runner >= 2.0} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} -BuildRequires: %{python_module webencodings} +BuildRequires: %{python_module six >= 1.9} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-html5lib >= 0.99999999 -Requires: python-six -Requires: python-webencodings +Requires: python-html5lib >= 1.0.0 +Requires: python-six >= 1.9 BuildArch: noarch %python_subpackages @@ -56,6 +55,8 @@ Documentation is at http://bleach.readthedocs.org/ . %prep %setup -q -n bleach-%{version} +%patch0 -p1 +rm -rf bleach/_vendor %build %python_build