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

DEV: Fix changelog for UTF-8 characters #2462

Merged
merged 4 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
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
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
Loading