diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 28cdaf6..95eee9e 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -1,7 +1,6 @@ from bs4 import BeautifulSoup, Comment, Doctype, NavigableString, Tag from textwrap import fill import re -import six # General-purpose regex patterns @@ -249,7 +248,7 @@ def _can_ignore(el): # (subclasses of NavigableString, must test first) return True elif isinstance(el, NavigableString): - if six.text_type(el).strip() != '': + if str(el).strip() != '': # Non-whitespace text nodes are always processed. return False elif should_remove_inside and (not el.previous_sibling or not el.next_sibling): @@ -345,7 +344,7 @@ def process_text(self, el, parent_tags=None): if parent_tags is None: parent_tags = set() - text = six.text_type(el) or '' + text = str(el) # normalize whitespace if we're not inside a preformatted element if 'pre' not in parent_tags: diff --git a/pyproject.toml b/pyproject.toml index ad15a33..82f7592 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,9 +14,6 @@ classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", @@ -24,7 +21,6 @@ classifiers = [ ] dependencies = [ "beautifulsoup4>=4.9,<5", - "six>=1.15,<2" ] [project.urls]