diff -Nru mwic-0.7.6/debian/changelog mwic-0.7.7/debian/changelog --- mwic-0.7.6/debian/changelog 2018-10-02 08:15:18.000000000 +0000 +++ mwic-0.7.7/debian/changelog 2018-11-15 09:30:44.000000000 +0000 @@ -1,3 +1,11 @@ +mwic (0.7.7-1) unstable; urgency=medium + + * New upstream release: + - Fixes manual page reproducibility issue. (Closes: #910114) + * Switch from debian/compat to debhelper-compat build dependency. + + -- Georg Faerber Thu, 15 Nov 2018 09:30:44 +0000 + mwic (0.7.6-1) unstable; urgency=medium [ Georg Faerber ] diff -Nru mwic-0.7.6/debian/compat mwic-0.7.7/debian/compat --- mwic-0.7.6/debian/compat 2018-10-02 08:15:18.000000000 +0000 +++ mwic-0.7.7/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -11 diff -Nru mwic-0.7.6/debian/control mwic-0.7.7/debian/control --- mwic-0.7.6/debian/control 2018-10-02 08:15:18.000000000 +0000 +++ mwic-0.7.7/debian/control 2018-11-15 09:30:44.000000000 +0000 @@ -5,7 +5,7 @@ Uploaders: Georg Faerber , Build-Depends: - debhelper (>= 11~), + debhelper-compat (= 11), dh-python, python3, python3-docutils, diff -Nru mwic-0.7.6/doc/changelog mwic-0.7.7/doc/changelog --- mwic-0.7.6/doc/changelog 2018-09-06 19:23:55.000000000 +0000 +++ mwic-0.7.7/doc/changelog 2018-11-12 16:42:35.000000000 +0000 @@ -1,3 +1,11 @@ +mwic (0.7.7) unstable; urgency=low + + * Don't die with exception when a file cannot be opened. + (If there are many input files, it's helpful to continue when one of them + cannot be opened.) + + -- Jakub Wilk Mon, 12 Nov 2018 17:42:25 +0100 + mwic (0.7.6) unstable; urgency=low * Improve documentation: diff -Nru mwic-0.7.6/doc/manpage.rst mwic-0.7.7/doc/manpage.rst --- mwic-0.7.6/doc/manpage.rst 2018-09-06 19:23:55.000000000 +0000 +++ mwic-0.7.7/doc/manpage.rst 2018-11-12 16:42:35.000000000 +0000 @@ -7,8 +7,8 @@ --------------------------- :manual section: 1 -:version: mwic 0.7.6 -:date: |date| +:version: mwic 0.7.7 +:date: 2018-10-02 Synopsis -------- @@ -160,6 +160,4 @@ by Justin B Rye -.. |date| date:: %Y-%m-%d - .. vim:ts=3 sts=3 sw=3 diff -Nru mwic-0.7.6/doc/mwic.1 mwic-0.7.7/doc/mwic.1 --- mwic-0.7.6/doc/mwic.1 2018-09-06 19:24:08.000000000 +0000 +++ mwic-0.7.7/doc/mwic.1 2018-11-12 16:42:38.000000000 +0000 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH MWIC 1 "2018-09-06" "mwic 0.7.6" "" +.TH MWIC 1 "2018-10-02" "mwic 0.7.7" "" .SH NAME mwic \- Misspelled Words In Context . diff -Nru mwic-0.7.6/lib/cli.py mwic-0.7.7/lib/cli.py --- mwic-0.7.6/lib/cli.py 2018-09-06 19:23:55.000000000 +0000 +++ mwic-0.7.7/lib/cli.py 2018-11-12 16:42:35.000000000 +0000 @@ -39,7 +39,7 @@ from . import pager from . import text -__version__ = '0.7.6' +__version__ = '0.7.7' class VersionAction(argparse.Action): @@ -100,6 +100,7 @@ ap.add_argument('--suggest', metavar='N', type=int, default=0, help='suggest up to N corrections') ap.add_argument('--debug-dict', action='store_true', help=argparse.SUPPRESS) + ap.add_argument('--traceback', action='store_true', help=argparse.SUPPRESS) options = ap.parse_args() sys.stdout = io.TextIOWrapper(sys.stdout.buffer, 'UTF-8') try: @@ -141,6 +142,7 @@ misspellings=misspellings, options=options, ) + rc = 0 for path in options.files: if path == '-': file = io.TextIOWrapper( @@ -149,18 +151,27 @@ errors=enc_errors, ) else: - file = open( - path, 'rt', - encoding=encoding, - errors=enc_errors, - ) + try: + file = open( + path, 'rt', + encoding=encoding, + errors=enc_errors, + ) + except IOError as exc: + if options.traceback: + raise + msg = '{prog}: {path}: {exc}'.format(prog=ap.prog, path=path, exc=exc.strerror) + print(msg, file=sys.stderr) + rc = 1 + continue with file: spellcheck_file(ctxt, file) if not misspellings: - return + sys.exit(rc) raw_cc = options.output_format == 'color' with lib.pager.autopager(raw_control_chars=raw_cc): print_misspellings(ctxt) + sys.exit(rc) def spellcheck_file(ctxt, file): force_ucs2 = ( diff -Nru mwic-0.7.6/private/run-pylint mwic-0.7.7/private/run-pylint --- mwic-0.7.6/private/run-pylint 2018-09-06 19:23:55.000000000 +0000 +++ mwic-0.7.7/private/run-pylint 2018-11-12 16:42:35.000000000 +0000 @@ -31,7 +31,6 @@ log=$(mktemp -t pylint.XXXXXX) "$PYTHON" -m pylint "$@" > "$log" || [ $? != 1 ] ! grep '^\w:' "$log" \ -| grep -v ': missing-docstring \[\w' \ | grep -v -P '^\w: (?!lib/).*: missing-docstring ' \ | grep '.' || exit 1 rm "$log" diff -Nru mwic-0.7.6/private/update-version mwic-0.7.7/private/update-version --- mwic-0.7.6/private/update-version 2018-09-06 19:23:55.000000000 +0000 +++ mwic-0.7.7/private/update-version 2018-11-12 16:42:35.000000000 +0000 @@ -1,8 +1,9 @@ #!/bin/sh set -e -u export version=${1:?"no version number provided"} +export date="$(date -u --rfc-3339=date)" PS4='$ ' set -x dch -m -v "$version" -u low -c doc/changelog perl -pi -e 's/^__version__ = '"'"'\K[\w.]+/$ENV{version}/' lib/*.py -perl -pi -e 's/^:version: \S+ \K[\w.]+/$ENV{version}/' doc/*.rst +perl -pi -e 's/^:version: \S+ \K[\w.]+/$ENV{version}/; s/^(:date:) \K[0-9-]+/$ENV{date}/' doc/*.rst diff -Nru mwic-0.7.6/.pylintrc mwic-0.7.7/.pylintrc --- mwic-0.7.6/.pylintrc 2018-09-06 19:23:55.000000000 +0000 +++ mwic-0.7.7/.pylintrc 2018-11-12 16:42:35.000000000 +0000 @@ -17,8 +17,12 @@ too-many-locals, too-many-statements, +[BASIC] +no-docstring-rgx = .* + [REPORTS] reports = no +score = no msg-template = {C}: {path}:{line}: {symbol} [{obj}] {msg} [FORMAT] diff -Nru mwic-0.7.6/tests/test_blackbox.py mwic-0.7.7/tests/test_blackbox.py --- mwic-0.7.6/tests/test_blackbox.py 2018-09-06 19:23:55.000000000 +0000 +++ mwic-0.7.7/tests/test_blackbox.py 2018-11-12 16:42:35.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright © 2014-2016 Jakub Wilk +# Copyright © 2014-2018 Jakub Wilk # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the “Software”), to deal @@ -44,7 +44,11 @@ sys.argv = ['mwic', '--language', language, path] textstdout = sys.stdout = io.TextIOWrapper(binstdout, encoding='UTF-8') try: - M.main() + try: + M.main() + except SystemExit as exc: + if exc.code != 0: + raise sys.stdout.flush() return binstdout.getvalue().decode('UTF-8') finally: