Tools/Demos
-----------
++- Issue #14053: patchcheck.py ("make patchcheck") now works with MQ patches.
++ Patch by Francisco Martín Brugué.
++
+- Issue #13930: 2to3 is now able to write its converted output files to another
+ directory tree as well as copying unchanged files and altering the file
+ suffix. See its new -o, -W and --add-suffix options. This makes it more
+ useful in many automated code translation workflows.
+
+- Issue #13628: python-gdb.py is now able to retrieve more frames in the Python
+ traceback if Python is optimized.
+
+- Issue #11996: libpython (gdb), replace "py-bt" command by "py-bt-full" and
+ add a smarter "py-bt" command printing a classic Python traceback.
+
- Issue #11179: Make ccbench work under Python 3.1 and 2.7 again.
+- Issue #10639: reindent.py no longer converts newlines and will raise
+ an error if attempting to convert a file with mixed newlines.
+ "--newline" option added to specify new line character.
+
Extension Modules
-----------------
@status("Getting the list of files that have been added/changed",
info=lambda x: n_files_str(len(x)))
def changed_files():
- """Get the list of changed or added files from the VCS."""
- if os.path.isdir(os.path.join(SRCDIR, '.hg')):
- vcs = 'hg'
- cmd = 'hg status --added --modified --no-status'
- if mq_patches_applied():
- cmd += ' --rev qparent'
- elif os.path.isdir('.svn'):
- vcs = 'svn'
- cmd = 'svn status --quiet --non-interactive --ignore-externals'
- else:
+ """Get the list of changed or added files from Mercurial."""
+ if not os.path.isdir(os.path.join(SRCDIR, '.hg')):
sys.exit('need a checkout to get modified files')
- st = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
- try:
- st.wait()
- if vcs == 'hg':
- return [x.decode().rstrip() for x in st.stdout]
- else:
- output = (x.decode().rstrip().rsplit(None, 1)[-1]
- for x in st.stdout if x[0] in b'AM')
- return set(path for path in output if os.path.isfile(path))
- finally:
- st.stdout.close()
+ cmd = 'hg status --added --modified --no-status'
++ if mq_patches_applied():
++ cmd += ' --rev qparent'
+ with subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) as st:
+ return [x.decode().rstrip() for x in st.stdout]
def report_modified_files(file_paths):