Point to github's issue tracker (part 2)
Point to github's issue tracker in mpmath docs
Fix issue numbering in @deprecated decorators
Change test function names test_123 -> test_issue_123
Change test function names test_issue123 -> test_issue_123
Shift numbering in test function names

$ cat ~/a.py
import re
import sys

p_test_names = re.compile(r'(def test_issue_)(\d+)([^0-9]+)')

def rep_test_names(match):
    v = int(match.group(2))
    return match.group(1) + str(v + 3099) + match.group(3)

for name in sys.argv[1:]:
    with open(name, "r") as f:
        o_str = f.read()
    o_new = p_test_names.sub(rep_test_names, o_str)
    with open(name, "w") as f:
        f.write(o_new)

$ find * -type f|xargs -n 100 python ~/a.py
Fix test function names with multiple issues
Fix test function names for old github's issues

fgrep -R 'def test_' .|egrep '(_gh|git)'
shift issue numbers for regexp r'(issue\s+)(\d+)'

$ cat ~/a.py
import re
import sys

pat = re.compile(r'(issue\s+)(\d+)')

def rep(match):
    v = int(match.group(2))
    return match.group(1) + str(v + 3099)

for name in sys.argv[1:]:
    with open(name, "r") as f:
        o_str = f.read()
    o_new = pat.sub(rep, o_str)
    with open(name, "w") as f:
        f.write(o_new)

$ find * -type f|xargs -n 100 python ~/a.py
Fix "issue 123" strings for original github's issues
shift issue numbers for regexp r'(issue\s+)#(\d+)'

$ cat ~/a.py
import re
import sys

pat = re.compile(r'(issue\s+)#(\d+)')

def rep(match):
    v = int(match.group(2))
    return match.group(1) + str(v + 3099)

for name in sys.argv[1:]:
    with open(name, "r") as f:
        o_str = f.read()
    o_new = pat.sub(rep, o_str)
    with open(name, "w") as f:
        f.write(o_new)

$ find * -type f|xargs -n 100 python ~/a.py
Fix "issue #123" strings for original github's issues
Shift #123 issues

grep -R '^[[:space:]]\+#[[:space:]]*[#]\?[0-9]\+[[:space:]]*$' *
Shift issue numbers in test function names like test_issues_2820_3731
Shift issue numbering in SymPyDeprecationWarning