Skip to content

Commit

Permalink
DEV: Fix changelog for UTF-8 characters (#2462)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan6419846 committed Feb 26, 2024
1 parent af36667 commit 2b3051b
Show file tree
Hide file tree
Showing 4 changed files with 507 additions and 15 deletions.
28 changes: 13 additions & 15 deletions make_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from datetime import datetime, timezone
from typing import Dict, List, Tuple

from rich.prompt import Prompt

GH_ORG = "py-pdf"
GH_PROJECT = "pypdf"
VERSION_FILE_PATH = "pypdf/_version.py"
Expand Down Expand Up @@ -84,6 +82,8 @@ def adjust_version_py(version: str) -> None:

def get_version_interactive(new_version: str, changes: str) -> str:
"""Get the new __version__ interactively."""
from rich.prompt import Prompt

print("The changes are:")
print(changes)
orig = new_version
Expand Down Expand Up @@ -308,19 +308,17 @@ def get_git_commits_since_tag(git_tag: str) -> List[Change]:
Returns:
List of all changes since git_tag.
"""
commits = str(
subprocess.check_output(
[
"git",
"--no-pager",
"log",
f"{git_tag}..HEAD",
'--pretty=format:"%H:::%s:::%aN"',
],
stderr=subprocess.STDOUT,
)
).strip("'b\\n")
lines = commits.split("\\n")
commits = subprocess.check_output(
[
"git",
"--no-pager",
"log",
f"{git_tag}..HEAD",
'--pretty=format:"%H:::%s:::%aN"',
],
stderr=subprocess.STDOUT,
).decode("UTF-8").strip()
lines = commits.splitlines()
authors = get_author_mapping(len(lines))
return [parse_commit_line(line, authors) for line in lines if line != ""]

Expand Down
Empty file added tests/scripts/__init__.py
Empty file.
Loading

0 comments on commit 2b3051b

Please sign in to comment.