Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Explicitly set newline when rewriting for release" #7639

Merged
merged 1 commit into from
Jan 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tools/automation/release/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
These are written according to the order they are called in.
"""

import io
import os
import subprocess
from typing import List, Optional, Set
Expand Down Expand Up @@ -69,7 +70,7 @@ def generate_authors(filename: str) -> None:
authors = get_author_list()

# Write our authors to the AUTHORS file
with open(filename, "w", encoding="utf-8", newline="\n") as fp:
with io.open(filename, "w", encoding="utf-8") as fp:
fp.write(u"\n".join(authors))
fp.write(u"\n")

Expand All @@ -89,7 +90,7 @@ def update_version_file(version: str, filepath: str) -> None:
content = list(f)

file_modified = False
with open(filepath, "w", encoding="utf-8", newline="\n") as f:
with open(filepath, "w", encoding="utf-8") as f:
for line in content:
if line.startswith("__version__ ="):
f.write('__version__ = "{}"\n'.format(version))
Expand Down