- 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.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bleach?expand=0&rev=51
This commit is contained in:
Daniel Garcia 2023-05-08 12:00:20 +00:00 committed by Git OBS Bridge
parent 3ad0a28ce2
commit a683d0f9c5
5 changed files with 51 additions and 23 deletions

View File

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

BIN
bleach-6.0.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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

View File

@ -1,3 +1,33 @@
-------------------------------------------------------------------
Mon May 8 11:57:24 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
- 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)
* Were using “tags” instead of “elements” everywhereno more weird
overloading of “elements” anymore.
* Also, it no longer calls the superclass constructor.
* Add warning when css_sanitizer isnt 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 its easier to have
CI run the same things were 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 <dmueller@suse.com>

View File

@ -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