Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-soupsieve for
openSUSE:Factory checked in at 2021-03-12 13:31:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-soupsieve (Old)
and /work/SRC/openSUSE:Factory/.python-soupsieve.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-soupsieve"
Fri Mar 12 13:31:03 2021 rev:12 rq:877642 version:2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-soupsieve/python-soupsieve.changes
2021-02-01 13:28:40.494147092 +0100
+++
/work/SRC/openSUSE:Factory/.python-soupsieve.new.2401/python-soupsieve.changes
2021-03-12 13:31:19.426157863 +0100
@@ -1,0 +2,12 @@
+Tue Mar 2 00:26:16 UTC 2021 - Dirk M??ller <[email protected]>
+
+- update to 2.2.0:
+ - **NEW**: `:link` and `:any-link` no longer include `#!html <link>` due to a
+ change in the level 4 selector specification. This actually yields more
+ sane results.
+ - **FIX**: BeautifulSoup, when using `find`, is quite forgiving of odd types
+ that a user may place in an element's attribute value. Soup Sieve will also
+ now be more forgiving and attempt to match these unexpected values in a
sane
+ manner by normalizing them before compare. (#212)
+
+-------------------------------------------------------------------
Old:
----
soupsieve-2.1.tar.gz
New:
----
soupsieve-2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-soupsieve.spec ++++++
--- /var/tmp/diff_new_pack.yOq0Kg/_old 2021-03-12 13:31:20.006158677 +0100
+++ /var/tmp/diff_new_pack.yOq0Kg/_new 2021-03-12 13:31:20.010158683 +0100
@@ -27,7 +27,7 @@
%endif
%define skip_python2 1
Name: python-soupsieve%{psuffix}
-Version: 2.1
+Version: 2.2
Release: 0
Summary: A modern CSS selector implementation for BeautifulSoup
License: MIT
++++++ soupsieve-2.1.tar.gz -> soupsieve-2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/LICENSE.md new/soupsieve-2.2/LICENSE.md
--- old/soupsieve-2.1/LICENSE.md 2020-12-11 00:43:09.000000000 +0100
+++ new/soupsieve-2.2/LICENSE.md 2021-02-09 20:57:00.000000000 +0100
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2018 Isaac Muse <[email protected]>
+Copyright (c) 2018 - 2021 Isaac Muse <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/MANIFEST.in
new/soupsieve-2.2/MANIFEST.in
--- old/soupsieve-2.1/MANIFEST.in 2020-12-11 00:43:09.000000000 +0100
+++ new/soupsieve-2.2/MANIFEST.in 2021-02-09 20:57:00.000000000 +0100
@@ -13,3 +13,4 @@
include LICENSE.md
include README.md
include MANIFEST.in
+include pyproject.toml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/PKG-INFO new/soupsieve-2.2/PKG-INFO
--- old/soupsieve-2.1/PKG-INFO 2020-12-11 00:43:14.833137800 +0100
+++ new/soupsieve-2.2/PKG-INFO 2021-02-09 20:57:13.208084600 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: soupsieve
-Version: 2.1
+Version: 2.2
Summary: A modern CSS selector implementation for Beautiful Soup.
Home-page: https://github.com/facelessuser/soupsieve
Author: Isaac Muse
@@ -73,7 +73,7 @@
MIT License
- Copyright (c) 2018 - 2020 Isaac Muse <[email protected]>
+ Copyright (c) 2018 - 2021 Isaac Muse <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated
documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the
@@ -117,5 +117,5 @@
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Requires-Python: >=3.5
+Requires-Python: >=3.6
Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/README.md new/soupsieve-2.2/README.md
--- old/soupsieve-2.1/README.md 2020-12-11 00:43:09.000000000 +0100
+++ new/soupsieve-2.2/README.md 2021-02-09 20:57:00.000000000 +0100
@@ -65,7 +65,7 @@
MIT License
-Copyright (c) 2018 - 2020 Isaac Muse <[email protected]>
+Copyright (c) 2018 - 2021 Isaac Muse <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated
documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/docs/src/dictionary/en-custom.txt
new/soupsieve-2.2/docs/src/dictionary/en-custom.txt
--- old/soupsieve-2.1/docs/src/dictionary/en-custom.txt 2020-12-11
00:43:09.000000000 +0100
+++ new/soupsieve-2.2/docs/src/dictionary/en-custom.txt 2021-02-09
20:57:00.000000000 +0100
@@ -26,6 +26,7 @@
Tox
Twemoji
URL's
+UTF
Unescape
Virtualenv
WIP
@@ -39,6 +40,7 @@
combinators
deprecations
deregister
+dev
directionality
formatter
hashable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/docs/src/markdown/about/changelog.md
new/soupsieve-2.2/docs/src/markdown/about/changelog.md
--- old/soupsieve-2.1/docs/src/markdown/about/changelog.md 2020-12-11
00:43:09.000000000 +0100
+++ new/soupsieve-2.2/docs/src/markdown/about/changelog.md 2021-02-09
20:57:00.000000000 +0100
@@ -1,6 +1,14 @@
# Changelog
-## 2.1.0
+## 2.2
+
+- **NEW**: `:link` and `:any-link` no longer include `#!html <link>` due to a
change in the level 4 selector
+ specification. This actually yields more sane results.
+- **FIX**: BeautifulSoup, when using `find`, is quite forgiving of odd types
that a user may place in an element's
+ attribute value. Soup Sieve will also now be more forgiving and attempt to
match these unexpected values in a sane
+ manner by normalizing them before compare. (#212)
+
+## 2.1
- **NEW**: Officially support Python 3.9.
- **NEW**: Drop official support for Python 3.5.
@@ -19,7 +27,7 @@
- **FIX**: Remove unused code.
-## 2.0.0
+## 2.0
- **NEW**: `SelectorSyntaxError` is derived from `Exception` not `SyntaxError`.
- **NEW**: Remove deprecated `comments` and `icomments` from the API.
@@ -66,7 +74,7 @@
not provide namespaces will assume the XHTML namespace).
- **FIX**: Ensure that all pseudo-class names are case insensitive and allow
CSS escapes.
-## 1.9.0
+## 1.9
- **NEW**: Allow `:contains()` to accept a list of text to search for. (#115)
- **NEW**: Add new `escape` function for escaping CSS identifiers. (#125)
@@ -81,7 +89,7 @@
but as there is no case where we could resolve such a string and still have
a valid selector, string handling remains
the same. (#128)
-## 1.8.0
+## 1.8
- **NEW**: Add custom selector support. (#92)(#108)
- **FIX**: Small tweak to CSS identifier pattern to ensure it matches the CSS
specification exactly. Specifically, you
@@ -113,7 +121,7 @@
- **FIX**: Fix issue with `:has()` selector where a leading combinator can
only be provided in the first selector in a
relative selector list.
-## 1.7.0
+## 1.7
- **NEW**: Add support for `:in-range` and `:out-of-range` selectors. (#60)
- **NEW**: Add support for `:defined` selector. (#76)
@@ -133,12 +141,12 @@
- **FIX**: Fix warning about not importing `Mapping` from `collections.abc`.
-## 1.6.0
+## 1.6
- **NEW**: Add `closest` method to the API that matches closest ancestor.
- **FIX**: Add missing `select_one` reference to module's `__all__`.
-## 1.5.0
+## 1.5
- **NEW**: Add `select_one` method like Beautiful Soup has.
- **NEW**: Add `:dir()` selector (HTML only).
@@ -157,7 +165,7 @@
- **FIX**: Fix issue with undefined namespaces.
-## 1.3.0
+## 1.3
- **NEW**: Add support for `:scope`.
- **NEW**: `:user-invalid`, `:playing`, `:paused`, and `:local-link` will not
cause a failure, but all will match
@@ -177,12 +185,12 @@
the `meta` tag to prevent searching again during the current select.
- **FIX**: If a non `BeautifulSoup`/`Tag` object is given to the API to
compare against, raise a `TypeError`.
-## 1.2.0
+## 1.2
- **NEW**: Add Python 2.7 support.
- **NEW**: Remove old pre 1.0 deprecations.
-## 1.1.0
+## 1.1
- **NEW**: Adds support for `[attr!=value]` which is equivalent to
`:not([attr=value])`.
- **NEW**: Add support for `:active`, `:focus`, `:hover`, `:visited`,
`:target`, `:focus-within`, `:focus-visible`,
@@ -211,7 +219,7 @@
- **FIX**: When giving a tag to `select`, it should only return the children
of that tag, never the tag itself.
- **FIX**: For informational purposes, raise a `NotImplementedError` when an
unsupported pseudo class is used.
-## 1.0.0
+## 1.0
- **NEW**: Official 1.0.0 release.
@@ -230,7 +238,7 @@
- **FIX**: Compare pseudo class names case insensitively when matching
unexpected cases.
- **FIX**: Don't allow attribute case flags when no attribute value is defined.
-## 0.6.0
+## 0.6
- **NEW**: `mode` attribute is now called `flags` to allow for other options
in the future.
- **FIX**: More corner cases for `nth` selectors.
@@ -253,11 +261,11 @@
- **FIX**: Fix namespace check for `:nth-of-type`.
-## 0.5.0
+## 0.5
- **NEW**: Deprecate `commentsiter` and `selectiter` in favor of `icomments`
and `iselect`. Expect removal in version
1.0.
-## 0.4.0
+## 0.4
- **NEW**: Initial prerelease.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/soupsieve-2.1/docs/src/markdown/about/contributing.md
new/soupsieve-2.2/docs/src/markdown/about/contributing.md
--- old/soupsieve-2.1/docs/src/markdown/about/contributing.md 2020-12-11
00:43:09.000000000 +0100
+++ new/soupsieve-2.2/docs/src/markdown/about/contributing.md 2021-02-09
20:57:00.000000000 +0100
@@ -3,13 +3,10 @@
## Become a Sponsor :octicons-heart-fill-16:{: .heart-throb}
Open source projects take time and money. Help support the project by becoming
a sponsor. You can add your support at
-any tier you feel comfortable with. No amount is too little.
+any tier you feel comfortable with. No amount is too little. We also accept
one time contributions via PayPal.
-:octicons-mark-github-16: [GitHub Sponsors
](https://github.com/sponsors/facelessuser)
-
-If you'd like to do a one time contribution, you can do so via PayPal.
-
-:fontawesome-brands-paypal: [PayPal](https://www.paypal.me/facelessuser)
+[:octicons-mark-github-16: GitHub
Sponsors](https://github.com/sponsors/facelessuser){: .md-button
.md-button--primary }
+[:fontawesome-brands-paypal: PayPal](https://www.paypal.me/facelessuser){
.md-button}
## Bug Reports
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/docs/src/markdown/about/license.md
new/soupsieve-2.2/docs/src/markdown/about/license.md
--- old/soupsieve-2.1/docs/src/markdown/about/license.md 2020-12-11
00:43:09.000000000 +0100
+++ new/soupsieve-2.2/docs/src/markdown/about/license.md 2021-02-09
20:57:00.000000000 +0100
@@ -2,7 +2,7 @@
MIT License
-Copyright (c) 2018 - 2020 Isaac Muse <[email protected]>
+Copyright (c) 2018 - 2021 Isaac Muse <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/docs/src/markdown/index.md
new/soupsieve-2.2/docs/src/markdown/index.md
--- old/soupsieve-2.1/docs/src/markdown/index.md 2020-12-11
00:43:09.000000000 +0100
+++ new/soupsieve-2.2/docs/src/markdown/index.md 2021-02-09
20:57:00.000000000 +0100
@@ -1,4 +1,4 @@
-# Soup Sieve
+# Quick Start
## Overview
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/docs/src/markdown/selectors/basic.md
new/soupsieve-2.2/docs/src/markdown/selectors/basic.md
--- old/soupsieve-2.1/docs/src/markdown/selectors/basic.md 2020-12-11
00:43:09.000000000 +0100
+++ new/soupsieve-2.2/docs/src/markdown/selectors/basic.md 2021-02-09
20:57:00.000000000 +0100
@@ -280,7 +280,7 @@
... </html>
... """
>>> soup = bs(html, 'html5lib')
- >>> print(soup.select('a[href!="#internal"]'))
+ >>> print(soup.select('div[lang|="en"]'))
[<div lang="en">Some text</div>, <div lang="en-US">Some more
text</div>]
```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/soupsieve-2.1/docs/src/markdown/selectors/pseudo-classes.md
new/soupsieve-2.2/docs/src/markdown/selectors/pseudo-classes.md
--- old/soupsieve-2.1/docs/src/markdown/selectors/pseudo-classes.md
2020-12-11 00:43:09.000000000 +0100
+++ new/soupsieve-2.2/docs/src/markdown/selectors/pseudo-classes.md
2021-02-09 20:57:00.000000000 +0100
@@ -10,7 +10,7 @@
## `:any-link`:material-language-html5:{: title="HTML"
data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental"
data-md-color-primary="purple" .icon} {:#:any-link}
-Selects every `#!html <a>`, `#!html <area>`, or `#!html <link>` element that
has an `href` attribute, independent of
+Selects every `#!html <a>`, or `#!html <area>` element that has an `href`
attribute, independent of
whether it has been visited.
=== "Syntax"
@@ -37,6 +37,10 @@
!!! tip "Additional Reading"
https://developer.mozilla.org/en-US/docs/Web/CSS/:any-link
+!!! new "New in 2.2"
+ The CSS specification recently updated to not include `#!html <link>` in
the definition; therefore, Soup Sieve has
+ removed it as well.
+
## `:checked`:material-language-html5:{: title="HTML"
data-md-color-primary="orange" .icon} {:#:checked}
Selects any `#!html <input type="radio"/>`, `#!html <input type="checkbox"/>`,
or `#!html <option>` element (in a
@@ -716,7 +720,7 @@
## `:link`:material-language-html5:{: title="HTML"
data-md-color-primary="orange" .icon} {:#:link}
-Selects a link (every `#!html <a>`, `#!html <link>`, and `#!html <area>`
element with an `href` attribute) that has not
+Selects a link (every `#!html <a>` and `#!html <area>` element with an `href`
attribute) that has not
yet been visited.
Since Beautiful Soup does not have *visited* states, this will match all
links, essentially making the behavior the same
@@ -729,7 +733,7 @@
=== "Usage"
```pycon3
- >>> from bs4 import BeautifulSoup as bs
+ >>> from bs4 import BeautifulSoup as bsx
>>> html = """
... <html>
... <head></head>
@@ -746,6 +750,10 @@
!!! tip "Additional Reading"
https://developer.mozilla.org/en-US/docs/Web/CSS/:link
+!!! new "New in 2.2"
+ The CSS specification recently updated to not include `#!html <link>` in
the definition; therefore, Soup Sieve has
+ removed it as well.
+
## `:not()` {:#:not}
Level 3 CSS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/mkdocs.yml new/soupsieve-2.2/mkdocs.yml
--- old/soupsieve-2.1/mkdocs.yml 2020-12-11 00:43:09.000000000 +0100
+++ new/soupsieve-2.2/mkdocs.yml 2021-02-09 20:57:00.000000000 +0100
@@ -4,7 +4,7 @@
edit_uri: tree/master/docs/src/markdown
site_description: A modern CSS selector library for Beautiful Soup.
copyright: |
- Copyright © 2018 - 2020 <a href="https://github.com/facelessuser"
target="_blank" rel="noopener">Isaac Muse</a>
+ Copyright © 2018 - 2021 <a href="https://github.com/facelessuser"
target="_blank" rel="noopener">Isaac Muse</a>
docs_dir: docs/src/markdown
theme:
@@ -23,8 +23,8 @@
- navigation.tabs
nav:
- - Usage:
- - Soup Sieve: index.md
+ - Home:
+ - Quick Start: index.md
- API: api.md
- F.A.Q.: faq.md
- Beautiful Soup Differences: differences.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/pyproject.toml
new/soupsieve-2.2/pyproject.toml
--- old/soupsieve-2.1/pyproject.toml 1970-01-01 01:00:00.000000000 +0100
+++ new/soupsieve-2.2/pyproject.toml 2021-02-09 20:57:00.000000000 +0100
@@ -0,0 +1,7 @@
+[build-system]
+requires = [
+ "setuptools>=42",
+ "wheel"
+]
+
+build-backend = "setuptools.build_meta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/setup.py new/soupsieve-2.2/setup.py
--- old/soupsieve-2.1/setup.py 2020-12-11 00:43:09.000000000 +0100
+++ new/soupsieve-2.2/setup.py 2021-02-09 20:57:00.000000000 +0100
@@ -42,7 +42,7 @@
setup(
name='soupsieve',
version=VER,
- python_requires=">=3.5",
+ python_requires=">=3.6",
keywords='CSS HTML XML selector filter query soup',
description='A modern CSS selector implementation for Beautiful Soup.',
long_description=get_description(),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/soupsieve/__meta__.py
new/soupsieve-2.2/soupsieve/__meta__.py
--- old/soupsieve-2.1/soupsieve/__meta__.py 2020-12-11 00:43:09.000000000
+0100
+++ new/soupsieve-2.2/soupsieve/__meta__.py 2021-02-09 20:57:00.000000000
+0100
@@ -153,11 +153,14 @@
return ver
-def parse_version(ver, pre=False):
+def parse_version(ver):
"""Parse version into a comparable Version tuple."""
m = RE_VER.match(ver)
+ if m is None:
+ raise ValueError("'{}' is not a valid version".format(ver))
+
# Handle major, minor, micro
major = int(m.group('major'))
minor = int(m.group('minor')) if m.group('minor') else 0
@@ -185,5 +188,5 @@
return Version(major, minor, micro, release, pre, post, dev)
-__version_info__ = Version(2, 1, 0, "final")
+__version_info__ = Version(2, 2, 0, "final")
__version__ = __version_info__._get_canonical()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/soupsieve/css_match.py
new/soupsieve-2.2/soupsieve/css_match.py
--- old/soupsieve-2.1/soupsieve/css_match.py 2020-12-11 00:43:09.000000000
+0100
+++ new/soupsieve-2.2/soupsieve/css_match.py 2021-02-09 20:57:00.000000000
+0100
@@ -4,6 +4,7 @@
import re
from .import css_types as ct
import unicodedata
+from collections.abc import Sequence
import bs4
@@ -276,29 +277,61 @@
return getattr(attr_name, 'namespace', None), getattr(attr_name,
'name', None)
- @staticmethod
- def get_attribute_by_name(el, name, default=None):
+ @classmethod
+ def normalize_value(cls, value):
+ """Normalize the value to be a string or list of strings."""
+
+ # Treat `None` as empty string.
+ if value is None:
+ return ''
+
+ # Pass through strings
+ if (isinstance(value, str)):
+ return value
+
+ # If it's a byte string, convert it to Unicode, treating it as UTF-8.
+ if isinstance(value, bytes):
+ return value.decode("utf8")
+
+ # BeautifulSoup supports sequences of attribute values, so make sure
the children are strings.
+ if isinstance(value, Sequence):
+ new_value = []
+ for v in value:
+ if isinstance(v, Sequence):
+ # This is most certainly a user error and will crash and
burn later,
+ # but to avoid excessive recursion, kick out now.
+ new_value.append(v)
+ else:
+ # Convert the child to a string
+ new_value.append(cls.normalize_value(v))
+ return new_value
+
+ # Try and make anything else a string
+ return str(value)
+
+ @classmethod
+ def get_attribute_by_name(cls, el, name, default=None):
"""Get attribute by name."""
value = default
if el._is_xml:
try:
- value = el.attrs[name]
+ value = cls.normalize_value(el.attrs[name])
except KeyError:
pass
else:
for k, v in el.attrs.items():
if util.lower(k) == name:
- value = v
+ value = cls.normalize_value(v)
break
return value
- @staticmethod
- def iter_attributes(el):
+ @classmethod
+ def iter_attributes(cls, el):
"""Iterate attributes."""
for k, v in el.attrs.items():
- yield k, v
+ yield k, cls.normalize_value(v)
@classmethod
def get_classes(cls, el):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/soupsieve/css_parser.py
new/soupsieve-2.2/soupsieve/css_parser.py
--- old/soupsieve-2.1/soupsieve/css_parser.py 2020-12-11 00:43:09.000000000
+0100
+++ new/soupsieve-2.2/soupsieve/css_parser.py 2021-02-09 20:57:00.000000000
+0100
@@ -1063,7 +1063,7 @@
# CSS pattern for `:link` and `:any-link`
CSS_LINK = CSSParser(
- 'html|*:is(a, area, link)[href]'
+ 'html|*:is(a, area)[href]'
).process_selectors(flags=FLG_PSEUDO | FLG_HTML)
# CSS pattern for `:checked`
CSS_CHECKED = CSSParser(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/soupsieve.egg-info/PKG-INFO
new/soupsieve-2.2/soupsieve.egg-info/PKG-INFO
--- old/soupsieve-2.1/soupsieve.egg-info/PKG-INFO 2020-12-11
00:43:14.000000000 +0100
+++ new/soupsieve-2.2/soupsieve.egg-info/PKG-INFO 2021-02-09
20:57:12.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: soupsieve
-Version: 2.1
+Version: 2.2
Summary: A modern CSS selector implementation for Beautiful Soup.
Home-page: https://github.com/facelessuser/soupsieve
Author: Isaac Muse
@@ -73,7 +73,7 @@
MIT License
- Copyright (c) 2018 - 2020 Isaac Muse <[email protected]>
+ Copyright (c) 2018 - 2021 Isaac Muse <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated
documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the
@@ -117,5 +117,5 @@
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Requires-Python: >=3.5
+Requires-Python: >=3.6
Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/soupsieve.egg-info/SOURCES.txt
new/soupsieve-2.2/soupsieve.egg-info/SOURCES.txt
--- old/soupsieve-2.1/soupsieve.egg-info/SOURCES.txt 2020-12-11
00:43:14.000000000 +0100
+++ new/soupsieve-2.2/soupsieve.egg-info/SOURCES.txt 2021-02-09
20:57:13.000000000 +0100
@@ -3,6 +3,7 @@
MANIFEST.in
README.md
mkdocs.yml
+pyproject.toml
setup.cfg
setup.py
tox.ini
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/tests/test_level2/test_attribute.py
new/soupsieve-2.2/tests/test_level2/test_attribute.py
--- old/soupsieve-2.1/tests/test_level2/test_attribute.py 2020-12-11
00:43:09.000000000 +0100
+++ new/soupsieve-2.2/tests/test_level2/test_attribute.py 2021-02-09
20:57:00.000000000 +0100
@@ -1,6 +1,7 @@
"""Test attribute selector."""
from .. import util
from soupsieve import SelectorSyntaxError
+from bs4 import BeautifulSoup as BS
class TestAttribute(util.TestCase):
@@ -370,3 +371,49 @@
[],
flags=util.HTML
)
+
+ def test_none_inputs(self):
+ """Test weird inputs."""
+
+ soup = BS('<span>text</span>', 'html.parser')
+ soup.span['foo'] = None
+ self.assertEqual(len(soup.select('span[foo]')), 1)
+
+ def test_numeric_inputs(self):
+ """Test weird inputs."""
+
+ soup = BS('<span>text</span>', 'html.parser')
+ soup.span['foo'] = 3
+ self.assertEqual(len(soup.select('span[foo="3"]')), 1)
+ soup.span['foo'] = 3.3
+ self.assertEqual(len(soup.select('span[foo="3.3"]')), 1)
+
+ def test_sequence_inputs(self):
+ """Test weird inputs."""
+
+ soup = BS('<span>text</span>', 'html.parser')
+ soup.span['foo'] = [3, "4"]
+ self.assertEqual(len(soup.select('span[foo="3 4"]')), 1)
+
+ def test_bytes_inputs(self):
+ """Test weird inputs."""
+
+ soup = BS('<span>text</span>', 'html.parser')
+ soup.span['foo'] = b'test'
+ self.assertEqual(len(soup.select('span[foo="test"]')), 1)
+
+ def test_weird_inputs(self):
+ """Test weird inputs."""
+
+ soup = BS('<span>text</span>', 'html.parser')
+ soup.span['foo'] = {'3': '4'}
+ self.assertEqual(len(soup.select('span[foo="{\'3\': \'4\'}"]')), 1)
+
+ def test_nested_sequences(self):
+ """Nested sequences will crash and burn due to the way BS handles
them."""
+
+ # The exact exception is not important as it can fail in various
locations for different reasons
+ with self.assertRaises(Exception):
+ soup = BS('<span>text</span>', 'html.parser')
+ soup.span['foo'] = [['1']]
+ soup.select("span['foo']")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/tests/test_level3/test_not.py
new/soupsieve-2.2/tests/test_level3/test_not.py
--- old/soupsieve-2.1/tests/test_level3/test_not.py 2020-12-11
00:43:09.000000000 +0100
+++ new/soupsieve-2.2/tests/test_level3/test_not.py 2021-02-09
20:57:00.000000000 +0100
@@ -1,5 +1,6 @@
"""Test not selectors."""
from .. import util
+from bs4 import BeautifulSoup as BS
class TestNot(util.TestCase):
@@ -47,3 +48,10 @@
["0", "2", "3", "4", "5", "6", "pre"],
flags=util.HTML
)
+
+ def test_none_inputs(self):
+ """Test weird inputs."""
+
+ soup = BS('<span foo-"something">text</span>', 'html.parser')
+ soup.span['foo'] = None
+ self.assertEqual(len(soup.select('span:not([foo])')), 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/tests/test_versions.py
new/soupsieve-2.2/tests/test_versions.py
--- old/soupsieve-2.1/tests/test_versions.py 2020-12-11 00:43:09.000000000
+0100
+++ new/soupsieve-2.2/tests/test_versions.py 2021-02-09 20:57:00.000000000
+0100
@@ -89,3 +89,5 @@
Version(1, 2, 3, pre=1)
with self.assertRaises(ValueError):
Version(1, 2, 3, dev=1)
+ with self.assertRaises(ValueError):
+ parse_version('bad&version')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/soupsieve-2.1/tox.ini new/soupsieve-2.2/tox.ini
--- old/soupsieve-2.1/tox.ini 2020-12-11 00:43:09.000000000 +0100
+++ new/soupsieve-2.2/tox.ini 2021-02-09 20:57:00.000000000 +0100
@@ -48,7 +48,7 @@
[flake8]
exclude=build/*,.tox/*
max-line-length=120
-ignore=D202,D203,D401,E741,W504
+ignore=D202,D203,D401,E741,W504,N817
[pytest]
filterwarnings =