diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-03-26 20:14:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-03-26 20:16:32 +0000 |
commit | 4d563e9294529e6a47afe992cb7a8c900958afec (patch) | |
tree | 93bcbbfd78d8268d5c619657c1f42ea3a1867449 /debian/patches/debian | |
parent | Completing copyright file headers. (diff) | |
download | gitlint-4d563e9294529e6a47afe992cb7a8c900958afec.tar.xz gitlint-4d563e9294529e6a47afe992cb7a8c900958afec.zip |
Moving debian specific patches to corresponding subdirectory.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/debian')
-rw-r--r-- | debian/patches/debian/0001-fix-test-with-python3.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/debian/0001-fix-test-with-python3.patch b/debian/patches/debian/0001-fix-test-with-python3.patch new file mode 100644 index 0000000..4844467 --- /dev/null +++ b/debian/patches/debian/0001-fix-test-with-python3.patch @@ -0,0 +1,33 @@ +Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +Description: replace readfp with Python2 read_file function, to fix a test failure: + https://github.com/jorisroovers/gitlint/pull/104 + +====================================================================== +FAIL: test_config_file (test_cli.CLITests) +Test for --config option +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/usr/lib/python3.7/unittest/mock.py", line 1248, in patched + return func(*args, **keywargs) + File "/<<PKGBUILDDIR>>/gitlint/tests/test_cli.py", line 372, in test_config_file + self.assertEqual(result.output, "") +AssertionError: "/<<PKGBUILDDIR>>/git[197 chars]od\n" != '' +- /<<PKGBUILDDIR>>/gitlint/config.py:366: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. +- parser.readfp(config_file, filename) # pylint: disable=deprecated-method +--- + gitlint/config.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff -Naurp gitlint.orig/gitlint/config.py gitlint/gitlint/config.py +--- gitlint.orig/gitlint/config.py ++++ gitlint/gitlint/config.py +@@ -428,8 +428,7 @@ class LintConfigBuilder(object): + parser = ConfigParser() + + with io.open(filename, encoding=DEFAULT_ENCODING) as config_file: +- # readfp() is deprecated in python 3.2+, but compatible with 2.7 +- parser.readfp(config_file, filename) # pylint: disable=deprecated-method ++ parser.read_file(config_file) + + for section_name in parser.sections(): + for option_name, option_value in parser.items(section_name): |