mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
Branch merge.
I moved the NEWS entry for the reindent fix to the right release section.
This commit is contained in:
commit
9e1af03fbb
23 changed files with 89 additions and 87 deletions
1
Tools/scripts/abitype.py
Normal file → Executable file
1
Tools/scripts/abitype.py
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
# This script converts a C file to use the PEP 384 type definition API
|
||||
# Usage: abitype.py < old_code > new_code
|
||||
import re, sys
|
||||
|
|
0
Tools/scripts/cleanfuture.py
Normal file → Executable file
0
Tools/scripts/cleanfuture.py
Normal file → Executable file
0
Tools/scripts/combinerefs.py
Normal file → Executable file
0
Tools/scripts/combinerefs.py
Normal file → Executable file
0
Tools/scripts/db2pickle.py
Normal file → Executable file
0
Tools/scripts/db2pickle.py
Normal file → Executable file
1
Tools/scripts/diff.py
Normal file → Executable file
1
Tools/scripts/diff.py
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
""" Command line interface to difflib.py providing diffs in four formats:
|
||||
|
||||
* ndiff: lists every line and highlights interline changes.
|
||||
|
|
0
Tools/scripts/find_recursionlimit.py
Normal file → Executable file
0
Tools/scripts/find_recursionlimit.py
Normal file → Executable file
0
Tools/scripts/get-remote-certificate.py
Normal file → Executable file
0
Tools/scripts/get-remote-certificate.py
Normal file → Executable file
25
Tools/scripts/mailerdaemon.py
Normal file → Executable file
25
Tools/scripts/mailerdaemon.py
Normal file → Executable file
|
@ -1,4 +1,5 @@
|
|||
"""mailerdaemon - classes to parse mailer-daemon messages"""
|
||||
#!/usr/bin/env python3
|
||||
"""Classes to parse mailer-daemon messages."""
|
||||
|
||||
import calendar
|
||||
import email.message
|
||||
|
@ -6,7 +7,10 @@ import re
|
|||
import os
|
||||
import sys
|
||||
|
||||
Unparseable = 'mailerdaemon.Unparseable'
|
||||
|
||||
class Unparseable(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class ErrorMessage(email.message.Message):
|
||||
def __init__(self):
|
||||
|
@ -18,8 +22,10 @@ class ErrorMessage(email.message.Message):
|
|||
if not sub:
|
||||
return 0
|
||||
sub = sub.lower()
|
||||
if sub.startswith('waiting mail'): return 1
|
||||
if 'warning' in sub: return 1
|
||||
if sub.startswith('waiting mail'):
|
||||
return 1
|
||||
if 'warning' in sub:
|
||||
return 1
|
||||
self.sub = sub
|
||||
return 0
|
||||
|
||||
|
@ -145,14 +151,17 @@ def emparse_list(fp, sub):
|
|||
errors.append(' '.join((email.strip()+': '+reason).split()))
|
||||
return errors
|
||||
|
||||
EMPARSERS = [emparse_list, ]
|
||||
EMPARSERS = [emparse_list]
|
||||
|
||||
def sort_numeric(a, b):
|
||||
a = int(a)
|
||||
b = int(b)
|
||||
if a < b: return -1
|
||||
elif a > b: return 1
|
||||
else: return 0
|
||||
if a < b:
|
||||
return -1
|
||||
elif a > b:
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
def parsedir(dir, modify):
|
||||
os.chdir(dir)
|
||||
|
|
1
Tools/scripts/make_ctype.py
Normal file → Executable file
1
Tools/scripts/make_ctype.py
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Script that generates the ctype.h-replacement in stringobject.c."""
|
||||
|
||||
NAMES = ("LOWER", "UPPER", "ALPHA", "DIGIT", "XDIGIT", "ALNUM", "SPACE")
|
||||
|
|
0
Tools/scripts/md5sum.py
Normal file → Executable file
0
Tools/scripts/md5sum.py
Normal file → Executable file
1
Tools/scripts/patchcheck.py
Normal file → Executable file
1
Tools/scripts/patchcheck.py
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
import re
|
||||
import sys
|
||||
import shutil
|
||||
|
|
0
Tools/scripts/pickle2db.py
Normal file → Executable file
0
Tools/scripts/pickle2db.py
Normal file → Executable file
0
Tools/scripts/pysource.py
Normal file → Executable file
0
Tools/scripts/pysource.py
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Make a reST file compliant to our pre-commit hook.
|
||||
# Currently just remove trailing whitespace.
|
||||
|
|
0
Tools/scripts/svneol.py
Normal file → Executable file
0
Tools/scripts/svneol.py
Normal file → Executable file
Loading…
Add table
Add a link
Reference in a new issue