Python 3: remove deprecated U qualifier on 'open' (#3019)

The U qualifier (universal line endings) has no effect
in Python3. Remove its use to avoid a Python warning.
This commit is contained in:
David Neto 2019-11-07 08:39:09 -05:00 коммит произвёл dan sinclair
Родитель 989f62fb97
Коммит 8a35bf030b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -86,7 +86,7 @@ def deduce_software_version(directory):
# Linux.
pattern = re.compile(r'^(v\d+\.\d+(-dev)?) \d\d\d\d-\d\d-\d\d\s*$')
changes_file = os.path.join(directory, 'CHANGES')
with open(changes_file, mode='rU') as f:
with open(changes_file, mode='r') as f:
for line in f.readlines():
match = pattern.match(line)
if match: