diff --git a/python-html2text.spec b/python-html2text.spec
index 98fa2f7..5adfc9e 100644
--- a/python-html2text.spec
+++ b/python-html2text.spec
@@ -7,19 +7,21 @@ also happens to be valid Markdown (a text-to-HTML format).
Name: python-%{upname}
Version: 2019.9.26
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: %{common_sum}
License: GPLv3
URL: http://alir3z4.github.io/%{upname}
Source0: https://files.pythonhosted.org/packages/source/h/%{upname}/%{upname}-%{version}.tar.gz
+Patch0: python3-string-encoding.patch
+
BuildArch: noarch
BuildRequires: help2man
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
-BuildRequires: python3-pytest
+BuildRequires: python%{python3_pkgversion}-pytest
%description
%{common_desc}
@@ -28,7 +30,7 @@ BuildRequires: python3-pytest
%package -n python3-%{upname}
Summary: %{common_sum}
Provides: %{upname} = %{version}-%{release}
-Obsoletes: python2-%{upname} <= %{version}-%{release}
+Obsoletes: python2-%{upname} < 2019.8.11
%{?python_provide:%python_provide python3-%{upname}}
%description -n python3-%{upname}
@@ -36,7 +38,7 @@ Obsoletes: python2-%{upname} <= %{version}-%{release}
%prep
-%autosetup -n %{upname}-%{version}
+%autosetup -n %{upname}-%{version} -p1
%{__rm} -fr *.egg-info
@@ -79,6 +81,9 @@ popd
%changelog
+* Thu Feb 13 2020 David Kaufmann - 2019.9.26-3
+- allow keeping python2-html2text in epel7
+
* Tue Oct 29 2019 Sérgio Basto - 2019.9.26-2
- Python3 only this version remove support for Python <= 3.4
diff --git a/python3-string-encoding.patch b/python3-string-encoding.patch
new file mode 100644
index 0000000..83d9327
--- /dev/null
+++ b/python3-string-encoding.patch
@@ -0,0 +1,21 @@
+--- html2text-2019.9.26/html2text/cli.py.orig 2020-12-04 21:03:13.896696602 +0100
++++ html2text-2019.9.26/html2text/cli.py 2020-12-06 01:29:03.649034019 +0100
+@@ -260,6 +260,8 @@
+
+ try:
+ data = data.decode(args.encoding, args.decode_errors)
++ except AttributeError:
++ pass
+ except UnicodeDecodeError as err:
+ warning = bcolors.WARNING + "Warning:" + bcolors.ENDC
+ warning += " Use the " + bcolors.OKGREEN
+@@ -303,4 +305,8 @@
+ h.open_quote = args.open_quote
+ h.close_quote = args.close_quote
+
+- sys.stdout.write(h.handle(data))
++ handled_data = h.handle(data)
++ try:
++ sys.stdout.write(handled_data)
++ except UnicodeEncodeError:
++ sys.stdout.buffer.write(handled_data.encode('utf-8'))