From 74af85d1b85f20d025fb94b1d21488c1c937e85f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 15 Sep 2025 09:41:16 +0200 Subject: [PATCH] The Python file mode 'U' was removed in Python 3.11 The Python file mode 'U' was deprecated in Python 3.3 and completely removed in Python 3.11. --- setup.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index e3fee76..af52bff 100644 --- a/setup.py +++ b/setup.py @@ -192,12 +192,8 @@ def find_cmake(): return "" -if sys.version_info[0] < 3: - 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() +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]