From a683d0f9c5db0b75bb5299be0b9022db9f27a0088726e5bb5e0941714c5dbb20 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 8 May 2023 12:00:20 +0000 Subject: [PATCH] =?UTF-8?q?-=20Update=20to=206.0.0:=20=20=20*=20bleach.cle?= =?UTF-8?q?an,=20bleach.sanitizer.Cleaner,=20=20=20=20=20bleach.html5lib?= =?UTF-8?q?=5Fshim.BleachHTMLParser:=20the=20tags=20and=20protocols=20=20?= =?UTF-8?q?=20=20=20arguments=20were=20changed=20from=20lists=20to=20sets.?= =?UTF-8?q?=20=20=20*=20bleach.linkify,=20bleach.linkifier.Linker:=20the?= =?UTF-8?q?=20skip=5Ftags=20and=20=20=20=20=20recognized=5Ftags=20argument?= =?UTF-8?q?s=20were=20changed=20from=20lists=20to=20sets.=20=20=20*=20blea?= =?UTF-8?q?ch.sanitizer.BleachSanitizerFilter:=20strip=5Fallowed=5Felement?= =?UTF-8?q?s=20is=20=20=20=20=20now=20strip=5Fallowed=5Ftags.=20We=20now?= =?UTF-8?q?=20use=20=E2=80=9Ctags=E2=80=9D=20everywhere=20rather=20than=20?= =?UTF-8?q?a=20=20=20=20=20mishmash=20of=20=E2=80=9Ctags=E2=80=9D=20in=20s?= =?UTF-8?q?ome=20places=20and=20=E2=80=9Celements=E2=80=9D=20in=20others.?= =?UTF-8?q?=20=20=20#=20Bug=20fixes=20=20=20*=20Add=20support=20for=20Pyth?= =?UTF-8?q?on=203.11.=20(#675)=20=20=20*=20Fix=20API=20weirness=20in=20Ble?= =?UTF-8?q?achSanitizerFilter.=20(#649)=20=20=20*=20We=E2=80=99re=20using?= =?UTF-8?q?=20=E2=80=9Ctags=E2=80=9D=20instead=20of=20=E2=80=9Celements?= =?UTF-8?q?=E2=80=9D=20everywhere=E2=80=93no=20more=20weird=20=20=20=20=20?= =?UTF-8?q?overloading=20of=20=E2=80=9Celements=E2=80=9D=20anymore.=20=20?= =?UTF-8?q?=20*=20Also,=20it=20no=20longer=20calls=20the=20superclass=20co?= =?UTF-8?q?nstructor.=20=20=20*=20Add=20warning=20when=20css=5Fsanitizer?= =?UTF-8?q?=20isn=E2=80=99t=20set,=20but=20the=20style=20attribute=20=20?= =?UTF-8?q?=20=20=20is=20allowed.=20(#676)=20=20=20*=20Fix=20linkify=20han?= =?UTF-8?q?dling=20of=20character=20entities.=20(#501)=20=20=20*=20Rework?= =?UTF-8?q?=20dev=20dependencies=20to=20use=20requirements-dev.txt=20and?= =?UTF-8?q?=20=20=20=20=20requirements-flake8.txt=20instead=20of=20extras.?= =?UTF-8?q?=20=20=20*=20Fix=20project=20infrastructure=20to=20be=20tox-bas?= =?UTF-8?q?ed=20so=20it=E2=80=99s=20easier=20to=20have=20=20=20=20=20CI=20?= =?UTF-8?q?run=20the=20same=20things=20we=E2=80=99re=20running=20in=20deve?= =?UTF-8?q?lopment=20and=20with=20=20=20=20=20flake8=20in=20an=20isolated?= =?UTF-8?q?=20environment.=20=20=20*=20Update=20action=20versions=20in=20C?= =?UTF-8?q?I.=20=20=20*=20Switch=20to=20f-strings=20where=20possible.=20Ma?= =?UTF-8?q?ke=20tests=20parametrized=20to=20be=20=20=20=20=20easier=20to?= =?UTF-8?q?=20read/maintain.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bleach?expand=0&rev=51 --- bleach-5.0.1.tar.gz | 3 --- bleach-6.0.0.tar.gz | 3 +++ de-vendor.patch | 36 +++++++++++++++++------------------- python-bleach.changes | 30 ++++++++++++++++++++++++++++++ python-bleach.spec | 2 +- 5 files changed, 51 insertions(+), 23 deletions(-) delete mode 100644 bleach-5.0.1.tar.gz create mode 100644 bleach-6.0.0.tar.gz diff --git a/bleach-5.0.1.tar.gz b/bleach-5.0.1.tar.gz deleted file mode 100644 index 264c251..0000000 --- a/bleach-5.0.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d03255c47eb9bd2f26aa9bb7f2107732e7e8fe195ca2f64709fcf3b0a4a085c -size 199642 diff --git a/bleach-6.0.0.tar.gz b/bleach-6.0.0.tar.gz new file mode 100644 index 0000000..98e7761 --- /dev/null +++ b/bleach-6.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a1a85c1595e07d8db14c5f09f09e6433502c51c595970edc090551f0db99414 +size 201298 diff --git a/de-vendor.patch b/de-vendor.patch index 9ed6028..850ee40 100644 --- a/de-vendor.patch +++ b/de-vendor.patch @@ -1,6 +1,8 @@ ---- a/bleach/html5lib_shim.py.orig -+++ b/bleach/html5lib_shim.py -@@ -14,46 +14,46 @@ warnings.filterwarnings( +Index: bleach-6.0.0/bleach/html5lib_shim.py +=================================================================== +--- bleach-6.0.0.orig/bleach/html5lib_shim.py ++++ bleach-6.0.0/bleach/html5lib_shim.py +@@ -14,27 +14,27 @@ warnings.filterwarnings( "ignore", message="html5lib's sanitizer is deprecated", category=DeprecationWarning, @@ -35,6 +37,9 @@ allowed_protocols, allowed_css_properties, allowed_svg_properties, +@@ -42,21 +42,21 @@ from bleach._vendor.html5lib.filters.san + svg_attr_val_allows_ref, + svg_allow_local_href, ) # noqa: E402 module level import not at top of file -from bleach._vendor.html5lib.filters.sanitizer import ( +from html5lib.filters.sanitizer import ( @@ -59,30 +64,23 @@ Trie, ) # noqa: E402 module level import not at top of file ---- a/tests/test_clean.py.orig -+++ b/tests/test_clean.py +Index: bleach-6.0.0/tests/test_clean.py +=================================================================== +--- bleach-6.0.0.orig/tests/test_clean.py ++++ bleach-6.0.0/tests/test_clean.py @@ -5,7 +5,7 @@ import pytest from bleach import clean from bleach.html5lib_shim import Filter - from bleach.sanitizer import ALLOWED_PROTOCOLS, Cleaner + from bleach.sanitizer import ALLOWED_PROTOCOLS, Cleaner, NoCssSanitizerWarning -from bleach._vendor.html5lib.constants import rcdataElements +from html5lib.constants import rcdataElements @pytest.mark.parametrize( ---- a/bleach/sanitizer.py.orig -+++ b/bleach/sanitizer.py -@@ -277,7 +277,7 @@ class BleachSanitizerFilter(html5lib_shi - "ignore", - message="html5lib's sanitizer is deprecated", - category=DeprecationWarning, -- module="bleach._vendor.html5lib", -+ module="html5lib", - ) - return super().__init__( - source, ---- a/bleach/parse_shim.py.orig -+++ b/bleach/parse_shim.py +Index: bleach-6.0.0/bleach/parse_shim.py +=================================================================== +--- bleach-6.0.0.orig/bleach/parse_shim.py ++++ bleach-6.0.0/bleach/parse_shim.py @@ -1 +1 @@ -from bleach._vendor.parse import urlparse # noqa +from urllib.parse import urlparse # noqa diff --git a/python-bleach.changes b/python-bleach.changes index 768818d..83ce0e4 100644 --- a/python-bleach.changes +++ b/python-bleach.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Mon May 8 11:57:24 UTC 2023 - Daniel Garcia + +- Update to 6.0.0: + * bleach.clean, bleach.sanitizer.Cleaner, + bleach.html5lib_shim.BleachHTMLParser: the tags and protocols + arguments were changed from lists to sets. + * bleach.linkify, bleach.linkifier.Linker: the skip_tags and + recognized_tags arguments were changed from lists to sets. + * bleach.sanitizer.BleachSanitizerFilter: strip_allowed_elements is + now strip_allowed_tags. We now use “tags” everywhere rather than a + mishmash of “tags” in some places and “elements” in others. + # Bug fixes + * Add support for Python 3.11. (#675) + * Fix API weirness in BleachSanitizerFilter. (#649) + * We’re using “tags” instead of “elements” everywhere–no more weird + overloading of “elements” anymore. + * Also, it no longer calls the superclass constructor. + * Add warning when css_sanitizer isn’t set, but the style attribute + is allowed. (#676) + * Fix linkify handling of character entities. (#501) + * Rework dev dependencies to use requirements-dev.txt and + requirements-flake8.txt instead of extras. + * Fix project infrastructure to be tox-based so it’s easier to have + CI run the same things we’re running in development and with + flake8 in an isolated environment. + * Update action versions in CI. + * Switch to f-strings where possible. Make tests parametrized to be + easier to read/maintain. + ------------------------------------------------------------------- Fri Apr 21 12:22:44 UTC 2023 - Dirk Müller diff --git a/python-bleach.spec b/python-bleach.spec index 3db0df9..1b914f4 100644 --- a/python-bleach.spec +++ b/python-bleach.spec @@ -19,7 +19,7 @@ %{?sle15_python_module_pythons} Name: python-bleach -Version: 5.0.1 +Version: 6.0.0 Release: 0 Summary: A whitelist-based HTML-sanitizing tool License: Apache-2.0