Skip to content

Commit 74af85d

Browse files
committed
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.
1 parent 1eb2779 commit 74af85d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

setup.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,8 @@ def find_cmake():
192192
return ""
193193

194194

195-
if sys.version_info[0] < 3:
196-
with open(os.path.join(BASE_PATH, 'README.rst'), 'U') as f:
197-
long_description = f.read()
198-
else:
199-
with open(os.path.join(BASE_PATH, 'README.rst')) as f:
200-
long_description = f.read()
195+
with open(os.path.join(BASE_PATH, 'README.rst')) as f:
196+
long_description = f.read()
201197

202198
distmeta = open(PYCP('distmeta.h')).read().strip().splitlines()
203199
distmeta = [item.split('\"')[1] for item in distmeta]

0 commit comments

Comments
 (0)