diff options
author | Karthikeyan Singaravelan <tir.karthi@gmail.com> | 2020-03-14 12:02:50 +0530 |
---|---|---|
committer | Asif Saif Uddin <auvipy@gmail.com> | 2020-03-16 14:08:25 +0600 |
commit | eba309a9354347f0824f3f9a82e462ef243e11ff (patch) | |
tree | 33bb02725e131c8910ad25ea8ba695ff49781fa9 | |
parent | 1286c48aeb1f42f98e58eac0fefc97bad581e378 (diff) | |
download | librabbitmq-eba309a9354347f0824f3f9a82e462ef243e11ff.tar.gz |
Remove deprecated U mode in open for Python 3.9 compatibility.
-rw-r--r-- | setup.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -164,7 +164,13 @@ def find_make(alt=('gmake', 'gnumake', 'make', 'nmake')): return make -long_description = open(os.path.join(BASE_PATH, 'README.rst'), 'U').read() +if six.PY2: + with open(os.path.join(BASE_PATH, 'README.rst'), 'U') as f: + long_description = f.read() +else: + with open(os.path.join(BASE_PATH, 'README.rst')) as f: + long_description = f.read() + distmeta = open(PYCP('distmeta.h')).read().strip().splitlines() distmeta = [item.split('\"')[1] for item in distmeta] version = distmeta[0].strip() |