From 936ebbcd7622db8197499db85ac076704982ffa3 Mon Sep 17 00:00:00 2001 From: facelessuser Date: Tue, 9 Feb 2021 12:48:48 -0700 Subject: [PATCH] Prep for 2.2 release --- docs/src/markdown/about/changelog.md | 4 ++-- docs/src/markdown/about/contributing.md | 9 +++------ docs/src/markdown/index.md | 2 +- mkdocs.yml | 4 ++-- soupsieve/__meta__.py | 7 +++++-- tests/test_versions.py | 2 ++ 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/src/markdown/about/changelog.md b/docs/src/markdown/about/changelog.md index 48a61c7b..ce64fc2a 100644 --- a/docs/src/markdown/about/changelog.md +++ b/docs/src/markdown/about/changelog.md @@ -1,9 +1,9 @@ # Changelog -## 2.2.0.dev +## 2.2.0 - **NEW**: `:link` and `:any-link` no longer include `#!html ` due to a change in the level 4 selector - specification. + 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) diff --git a/docs/src/markdown/about/contributing.md b/docs/src/markdown/about/contributing.md index a026c5b3..3ceaf3cc 100644 --- a/docs/src/markdown/about/contributing.md +++ b/docs/src/markdown/about/contributing.md @@ -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 --git a/docs/src/markdown/index.md b/docs/src/markdown/index.md index e820f91e..58ed8be6 100644 --- a/docs/src/markdown/index.md +++ b/docs/src/markdown/index.md @@ -1,4 +1,4 @@ -# Soup Sieve +# Quick Start ## Overview diff --git a/mkdocs.yml b/mkdocs.yml index 101eb64a..dcf75f3f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -23,8 +23,8 @@ theme: - 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 --git a/soupsieve/__meta__.py b/soupsieve/__meta__.py index fa439986..de83f475 100644 --- a/soupsieve/__meta__.py +++ b/soupsieve/__meta__.py @@ -153,11 +153,14 @@ def _get_canonical(self): 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 @@ def parse_version(ver, pre=False): return Version(major, minor, micro, release, pre, post, dev) -__version_info__ = Version(2, 2, 0, ".dev") +__version_info__ = Version(2, 2, 0, "final") __version__ = __version_info__._get_canonical() diff --git a/tests/test_versions.py b/tests/test_versions.py index a915a5b0..12c24776 100644 --- a/tests/test_versions.py +++ b/tests/test_versions.py @@ -89,3 +89,5 @@ def test_asserts(self): Version(1, 2, 3, pre=1) with self.assertRaises(ValueError): Version(1, 2, 3, dev=1) + with self.assertRaises(ValueError): + parse_version('bad&version')