joshy / striprtf

Stripping rtf to plain old text
http://striprtf.dev
BSD 3-Clause "New" or "Revised" License
94 stars 27 forks source link

Restore compatibility with Python2 #17

Closed azoellner closed 3 years ago

azoellner commented 3 years ago

The current version of this package is not compatible with Python2. I'm aware that this Python version is no longer supported. However, since it's easy to restore Python2 compatibility of this package by simply replacing the open in line 8 of setup.py with io.open, and especially since this is already used in line 12, I think it's worth having this for both legacy code and code style reasons. So, please, do consider this minimal change.

Thank you, Andreas

diff --git a/setup.py b/setup.py
index 99f434b..d326a04 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@
 from setuptools import setup

 this_directory = path.abspath(path.dirname(__file__))
-with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
+with io.open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
     long_description = f.read()

 about = {}