diff options
-rw-r--r-- | CHANGELOG | 7 | ||||
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | bs4/__init__.py | 2 | ||||
-rw-r--r-- | setup.py | 4 |
4 files changed, 23 insertions, 8 deletions
@@ -1,4 +1,4 @@ -= 4.8.1 (Unreleased) += 4.8.1 (20191006) * When the html.parser or html5lib parsers are in use, Beautiful Soup will, by default, record the position in the original document where @@ -7,9 +7,8 @@ Mayo. [bug=1742921] * When instantiating a BeautifulSoup object, it's now possible to - provide replacement classes to be instantiated for every tag ('tag_class') - or string ('string_class') encountered during parsing, rather than - using the default Tag and NavigableString objects. + provide a dictionary ('element_classes') of the classes you'd like to be + instantiated instead of Tag, NavigableString, etc. * Fixed the definition of the default XML namespace when using lxml 4.4. Patch by Isaac Muse. [bug=1840141] @@ -51,6 +51,20 @@ To go beyond the basics, [comprehensive documentation is available](http://www.c * [Bug tracker](https://bugs.launchpad.net/beautifulsoup/) * [Complete changelog](https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/CHANGELOG) +# Note on Python 2 sunsetting + +Since 2012, Beautiful Soup has been developed as a Python 2 library +which is automatically converted to Python 3 code as necessary. This +makes it impossible to take advantages of some features of Python +3. + +For this reason, I plan to discontinue Beautiful Soup's Python 2 +support at some point after January 1, 2021: one year after the sunset +date for Python 2 itself. Beyond that point, new Beautiful Soup +development will exclusively target Python 3. Of course, older +releases of Beautiful Soup, which support both versions, will continue +to be available. + # Supporting the project If you use Beautiful Soup as part of your professional work, please consider a @@ -79,10 +93,10 @@ Beautiful Soup supports unit test discovery from the project root directory: ``` ``` - $ python -m unittest discover -s bs4 # Python 2.7 and up + $ python -m unittest discover -s bs4 ``` If you checked out the source tree, you should see a script in the home directory called test-all-versions. This script will run the unit -tests under Python 2.7, then create a temporary Python 3 conversion of +tests under Python 2, then create a temporary Python 3 conversion of the source and run the unit tests again under Python 3. diff --git a/bs4/__init__.py b/bs4/__init__.py index e85a0bf..1ea7b97 100644 --- a/bs4/__init__.py +++ b/bs4/__init__.py @@ -18,7 +18,7 @@ http://www.crummy.com/software/BeautifulSoup/bs4/doc/ """ __author__ = "Leonard Richardson (leonardr@segfault.org)" -__version__ = "4.8.0" +__version__ = "4.8.1" __copyright__ = "Copyright (c) 2004-2019 Leonard Richardson" # Use of this source code is governed by the MIT license. __license__ = "MIT" @@ -3,12 +3,14 @@ from setuptools import ( find_packages, ) +from bs4 import __version__ + with open("README.md", "r") as fh: long_description = fh.read() setup( name="beautifulsoup4", - version = "4.8.0", + version = __version__, author="Leonard Richardson", author_email='leonardr@segfault.org', url="http://www.crummy.com/software/BeautifulSoup/bs4/", |