Skip to content

Support "bpo-" in Misc/NEWS - #1

Merged
zware merged 3 commits into
masterfrom
bpo-news-support
Feb 10, 2017
Merged

zware merged 3 commits into
masterfrom
bpo-news-support

Conversation

@brettcannon

Copy link
Copy Markdown
Member

No description provided.

Comment thread Doc/tools/extensions/pyspecific.py Outdated
node = nodes.strong(text, text)
return [node]
content = issue_re.sub(r'`\1ssue #\2 <https://bugs.python.org/\2>`__',
content = issue_re.sub(r'`\bpo-\2 <https://bugs.python.org/\2>`__',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

\b ? I think you overwrote the \1 :-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's on purpose as the first capture group is the prefix which doesn't matter. Probably should change the regex to use a non-capture group.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sure, you can either you use \1 or insert bpo-. But here you overwrote half the capture group by only deleting the 1 and not the \.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, you're right. Now fixed.

Make the prefix match non-capturing and fix a bug where a backslash was left into the substitution.
Comment thread Doc/tools/extensions/pyspecific.py Outdated

ISSUE_URI = 'https://bugs.python.org/issue%s'
SOURCE_URI = 'https://hg.python.org/cpython/file/3.6/%s'
SOURCE_URI = 'https://github.com/python/cpython/tree/3.6/%s'

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.

Shouldn't it be master rather than 3.6 on this branch?

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.

My patch for another issue will address this, I think 🤔

http://bugs.python.org/file45904/issue28941.patch

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I went ahead and updated here since I'm already changing it.

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.

ok :)

Comment thread Doc/tools/extensions/pyspecific.py Outdated
node = nodes.strong(text, text)
return [node]
content = issue_re.sub(r'`\1ssue #\2 <https://bugs.python.org/\2>`__',
content = issue_re.sub(r'`bpo-\1 <https://bugs.python.org/\1>`__',

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.

I'd suggest making it https://bugs.python.org/issue\1 to avoid the redirect through https://www.python.org/sf/

ghost Feb 10, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants