Skip to content
Open
Changes from 1 commit
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
18 changes: 5 additions & 13 deletions src/blurb/blurb.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ class BlurbError(RuntimeError):
(This formatting will be inserted when rendering the final output.)
* Lines longer than 76 characters will be wordwrapped.
* In the final output, the first line will have
"- gh-issue-<gh-issue-number>: " inserted at the front,
"- :gh:`<gh-issue-number>`: " inserted at the front,
Comment thread
AA-Turner marked this conversation as resolved.
Outdated
and subsequent lines will have two spaces inserted
at the front.
Comment thread
hugovk marked this conversation as resolved.
Outdated

Expand Down Expand Up @@ -989,13 +989,6 @@ def print(*a, sep=" "):
s = sep.join(str(x) for x in a)
return builtins.print(s, file=buff)

print ("""
+++++++++++
Python News
+++++++++++

""".strip())

for version in versions:
filenames = glob_blurbs(version)

Expand All @@ -1013,7 +1006,7 @@ def print(*a, sep=" "):
assert len(filenames) == 1
blurbs.load(filenames[0])

header = "What's New in Python " + printable_version(version) + "?"
header = printable_version(version)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something (I'm guessing this line?) is dropping "Python" before the version numbers in the headers, which has a knock-on effect that a lot (but not all) of anchors change from like #python-3-13-0-alpha-4 to #id62:

(main on left, PR on right)

image image

print()
print(header)
print("=" * len(header))
Expand Down Expand Up @@ -1042,14 +1035,13 @@ def print(*a, sep=" "):
if metadata.get("gh-issue"):
issue_number = metadata['gh-issue']
if int(issue_number):
body = "gh-" + issue_number + ": " + body
body = f":gh:`{issue_number}`: {body}"
elif metadata.get("bpo"):
issue_number = metadata['bpo']
if int(issue_number):
body = "bpo-" + issue_number + ": " + body
body = f":issue:`{issue_number}`: {body}"

body = "- " + body
text = textwrap_body(body, subsequent_indent=' ')
text = textwrap_body(f"- {body}", subsequent_indent=' ')
print(text)
print()
print("**(For information about older versions, consult the HISTORY file.)**")
Expand Down