Skip to content

Commit 2b3051b

Browse files
DEV: Fix changelog for UTF-8 characters (#2462)
1 parent af36667 commit 2b3051b

File tree

4 files changed

+507
-15
lines changed

4 files changed

+507
-15
lines changed

make_release.py

+13-15
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from datetime import datetime, timezone
88
from typing import Dict, List, Tuple
99

10-
from rich.prompt import Prompt
11-
1210
GH_ORG = "py-pdf"
1311
GH_PROJECT = "pypdf"
1412
VERSION_FILE_PATH = "pypdf/_version.py"
@@ -84,6 +82,8 @@ def adjust_version_py(version: str) -> None:
8482

8583
def get_version_interactive(new_version: str, changes: str) -> str:
8684
"""Get the new __version__ interactively."""
85+
from rich.prompt import Prompt
86+
8787
print("The changes are:")
8888
print(changes)
8989
orig = new_version
@@ -308,19 +308,17 @@ def get_git_commits_since_tag(git_tag: str) -> List[Change]:
308308
Returns:
309309
List of all changes since git_tag.
310310
"""
311-
commits = str(
312-
subprocess.check_output(
313-
[
314-
"git",
315-
"--no-pager",
316-
"log",
317-
f"{git_tag}..HEAD",
318-
'--pretty=format:"%H:::%s:::%aN"',
319-
],
320-
stderr=subprocess.STDOUT,
321-
)
322-
).strip("'b\\n")
323-
lines = commits.split("\\n")
311+
commits = subprocess.check_output(
312+
[
313+
"git",
314+
"--no-pager",
315+
"log",
316+
f"{git_tag}..HEAD",
317+
'--pretty=format:"%H:::%s:::%aN"',
318+
],
319+
stderr=subprocess.STDOUT,
320+
).decode("UTF-8").strip()
321+
lines = commits.splitlines()
324322
authors = get_author_mapping(len(lines))
325323
return [parse_commit_line(line, authors) for line in lines if line != ""]
326324

tests/scripts/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)