[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#987411: unblock: soupsieve/2.2.1-1



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package soupsieve

New upstream point release fixing a single bug, fairly minimally.

[ Reason ]
Fixes: https://github.com/facelessuser/soupsieve/issues/216

[ Impact ]
Unable to parse documents with an XML namespace named "self".

[ Tests ]
The package has good test suite coverage, which is run at build time and
in autopkgtests.

[ Risks ]
The change is pretty straightforward, and makes the code a little
simpler (passing a dict instead of kwargs).

This is a key package. The new version has already aged for 25 days.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock soupsieve/2.2.1-1
diff -Nru soupsieve-2.2/debian/changelog soupsieve-2.2.1/debian/changelog
--- soupsieve-2.2/debian/changelog	2021-02-11 17:00:48.000000000 -0400
+++ soupsieve-2.2.1/debian/changelog	2021-03-28 14:15:20.000000000 -0400
@@ -1,3 +1,9 @@
+soupsieve (2.2.1-1) unstable; urgency=medium
+
+  * New upstream point release.
+
+ -- Stefano Rivera <stefanor@debian.org>  Sun, 28 Mar 2021 11:15:20 -0700
+
 soupsieve (2.2-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru soupsieve-2.2/docs/src/markdown/about/changelog.md soupsieve-2.2.1/docs/src/markdown/about/changelog.md
--- soupsieve-2.2/docs/src/markdown/about/changelog.md	2021-02-09 15:57:00.000000000 -0400
+++ soupsieve-2.2.1/docs/src/markdown/about/changelog.md	2021-03-19 00:59:26.000000000 -0400
@@ -1,5 +1,9 @@
 # Changelog
 
+## 2.2.1
+
+- **FIX**: Fix an issue with namespaces when one of the keys is `self`.
+
 ## 2.2
 
 - **NEW**: `:link` and `:any-link` no longer include `#!html <link>` due to a change in the level 4 selector
diff -Nru soupsieve-2.2/docs/src/markdown/selectors/pseudo-classes.md soupsieve-2.2.1/docs/src/markdown/selectors/pseudo-classes.md
--- soupsieve-2.2/docs/src/markdown/selectors/pseudo-classes.md	2021-02-09 15:57:00.000000000 -0400
+++ soupsieve-2.2.1/docs/src/markdown/selectors/pseudo-classes.md	2021-03-19 00:59:26.000000000 -0400
@@ -867,7 +867,7 @@
     Level 4 CSS adds the additional pattern in the form `an+b of S` where `S` represents a selector list. `an+b` can
     also be substituted with `even` or `odd`.
 
-    Wen using the pattern `an+b of S`, the pattern will select elements from a sub-group of sibling elements that all
+    When using the pattern `an+b of S`, the pattern will select elements from a sub-group of sibling elements that all
     match the selector list (`[of S]?`), based on their position within that sub-group, using the pattern `an+b`, for
     every positive integer or zero value of `n`. The index of the first element is `1`. The values `a` and `b` must both
     be integers.
@@ -961,7 +961,7 @@
     Level 4 CSS adds the additional pattern in the form `an+b of S` where `S` represents a selector list. `an+b` can
     also be substituted with `even` or `odd`.
 
-    Wen using the pattern `an+b of S`, the pattern will select elements from a sub-group of sibling elements that all
+    When using the pattern `an+b of S`, the pattern will select elements from a sub-group of sibling elements that all
     match the selector list (`[of S]?`), based on their position within that sub-group, using the pattern `an+b`, for
     every positive integer or zero value of `n`. The index of the first element is `1`. The values `a` and `b` must both
     be integers. Elements will be counted from the end.
diff -Nru soupsieve-2.2/PKG-INFO soupsieve-2.2.1/PKG-INFO
--- soupsieve-2.2/PKG-INFO	2021-02-09 15:57:13.208084600 -0400
+++ soupsieve-2.2.1/PKG-INFO	2021-03-19 00:59:30.715582600 -0400
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: soupsieve
-Version: 2.2
+Version: 2.2.1
 Summary: A modern CSS selector implementation for Beautiful Soup.
 Home-page: https://github.com/facelessuser/soupsieve
 Author: Isaac Muse
diff -Nru soupsieve-2.2/requirements/docs.txt soupsieve-2.2.1/requirements/docs.txt
--- soupsieve-2.2/requirements/docs.txt	2021-02-09 15:57:00.000000000 -0400
+++ soupsieve-2.2.1/requirements/docs.txt	2021-03-19 00:59:26.000000000 -0400
@@ -1,4 +1,4 @@
-mkdocs_pymdownx_material_extras==1.1.3
+mkdocs_pymdownx_material_extras==1.2.2
 mkdocs-git-revision-date-localized-plugin
 mkdocs-minify-plugin
 pyspelling
diff -Nru soupsieve-2.2/soupsieve/css_types.py soupsieve-2.2.1/soupsieve/css_types.py
--- soupsieve-2.2/soupsieve/css_types.py	2021-02-09 15:57:00.000000000 -0400
+++ soupsieve-2.2.1/soupsieve/css_types.py	2021-03-19 00:59:26.000000000 -0400
@@ -89,10 +89,10 @@
 class ImmutableDict(Mapping):
     """Hashable, immutable dictionary."""
 
-    def __init__(self, *args, **kwargs):
+    def __init__(self, arg):
         """Initialize."""
 
-        arg = args[0] if args else kwargs
+        arg
         is_dict = isinstance(arg, dict)
         if (
             is_dict and not all([isinstance(v, Hashable) for v in arg.values()]) or
@@ -100,7 +100,7 @@
         ):
             raise TypeError('All values must be hashable')
 
-        self._d = dict(*args, **kwargs)
+        self._d = dict(arg)
         self._hash = hash(tuple([(type(x), x, type(y), y) for x, y in sorted(self._d.items())]))
 
     def __iter__(self):
@@ -133,39 +133,37 @@
 class Namespaces(ImmutableDict):
     """Namespaces."""
 
-    def __init__(self, *args, **kwargs):
+    def __init__(self, arg):
         """Initialize."""
 
         # If there are arguments, check the first index.
         # `super` should fail if the user gave multiple arguments,
         # so don't bother checking that.
-        arg = args[0] if args else kwargs
         is_dict = isinstance(arg, dict)
         if is_dict and not all([isinstance(k, str) and isinstance(v, str) for k, v in arg.items()]):
             raise TypeError('Namespace keys and values must be Unicode strings')
         elif not is_dict and not all([isinstance(k, str) and isinstance(v, str) for k, v in arg]):
             raise TypeError('Namespace keys and values must be Unicode strings')
 
-        super(Namespaces, self).__init__(*args, **kwargs)
+        super(Namespaces, self).__init__(arg)
 
 
 class CustomSelectors(ImmutableDict):
     """Custom selectors."""
 
-    def __init__(self, *args, **kwargs):
+    def __init__(self, arg):
         """Initialize."""
 
         # If there are arguments, check the first index.
         # `super` should fail if the user gave multiple arguments,
         # so don't bother checking that.
-        arg = args[0] if args else kwargs
         is_dict = isinstance(arg, dict)
         if is_dict and not all([isinstance(k, str) and isinstance(v, str) for k, v in arg.items()]):
             raise TypeError('CustomSelectors keys and values must be Unicode strings')
         elif not is_dict and not all([isinstance(k, str) and isinstance(v, str) for k, v in arg]):
             raise TypeError('CustomSelectors keys and values must be Unicode strings')
 
-        super(CustomSelectors, self).__init__(*args, **kwargs)
+        super(CustomSelectors, self).__init__(arg)
 
 
 class Selector(Immutable):
diff -Nru soupsieve-2.2/soupsieve/__init__.py soupsieve-2.2.1/soupsieve/__init__.py
--- soupsieve-2.2/soupsieve/__init__.py	2021-02-09 15:57:00.000000000 -0400
+++ soupsieve-2.2.1/soupsieve/__init__.py	2021-03-19 00:59:26.000000000 -0400
@@ -44,11 +44,11 @@
     """Compile CSS pattern."""
 
     if namespaces is not None:
-        namespaces = ct.Namespaces(**namespaces)
+        namespaces = ct.Namespaces(namespaces)
 
     custom = kwargs.get('custom')
     if custom is not None:
-        custom = ct.CustomSelectors(**custom)
+        custom = ct.CustomSelectors(custom)
 
     if isinstance(pattern, SoupSieve):
         if flags:
diff -Nru soupsieve-2.2/soupsieve/__meta__.py soupsieve-2.2.1/soupsieve/__meta__.py
--- soupsieve-2.2/soupsieve/__meta__.py	2021-02-09 15:57:00.000000000 -0400
+++ soupsieve-2.2.1/soupsieve/__meta__.py	2021-03-19 00:59:26.000000000 -0400
@@ -188,5 +188,5 @@
     return Version(major, minor, micro, release, pre, post, dev)
 
 
-__version_info__ = Version(2, 2, 0, "final")
+__version_info__ = Version(2, 2, 1, "final")
 __version__ = __version_info__._get_canonical()
diff -Nru soupsieve-2.2/soupsieve.egg-info/PKG-INFO soupsieve-2.2.1/soupsieve.egg-info/PKG-INFO
--- soupsieve-2.2/soupsieve.egg-info/PKG-INFO	2021-02-09 15:57:12.000000000 -0400
+++ soupsieve-2.2.1/soupsieve.egg-info/PKG-INFO	2021-03-19 00:59:30.000000000 -0400
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: soupsieve
-Version: 2.2
+Version: 2.2.1
 Summary: A modern CSS selector implementation for Beautiful Soup.
 Home-page: https://github.com/facelessuser/soupsieve
 Author: Isaac Muse
diff -Nru soupsieve-2.2/tests/test_level3/test_not.py soupsieve-2.2.1/tests/test_level3/test_not.py
--- soupsieve-2.2/tests/test_level3/test_not.py	2021-02-09 15:57:00.000000000 -0400
+++ soupsieve-2.2.1/tests/test_level3/test_not.py	2021-03-19 00:59:26.000000000 -0400
@@ -52,6 +52,6 @@
     def test_none_inputs(self):
         """Test weird inputs."""
 
-        soup = BS('<span foo-"something">text</span>', 'html.parser')
+        soup = BS('<span foo="something">text</span>', 'html.parser')
         soup.span['foo'] = None
         self.assertEqual(len(soup.select('span:not([foo])')), 0)

Reply to: