[Python-modules-team] Bug#946040: Build fails with the new pylint version

2019-12-12 Thread Matthias Klose
Control: severity -1 serious

fbtfs is an RC issue, also the autopkg tests are failing, stalling the migration
of pytest.

___
Python-modules-team mailing list
Python-modules-team@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team

[Python-modules-team] Bug#946040: Build fails with the new pylint version

2019-12-03 Thread Sebastien Bacher
Package: pytest-pylint
Version: 0.14.1-2

The build is failing with pylint 2.4.4, log example from an Ubuntu build
https://launchpadlibrarian.net/454058807/buildlog_ubuntu-focal-amd64.pytest-pylint_0.14.1-2_BUILDING.txt.gz

I've reported the issue upstream
https://github.com/carsongee/pytest-pylint/issues/105

The debdiff attached should fix the issue

Cheers,

diff -Nru pytest-pylint-0.14.1/debian/changelog 
pytest-pylint-0.14.1/debian/changelog
--- pytest-pylint-0.14.1/debian/changelog   2019-11-19 08:01:18.0 
+0100
+++ pytest-pylint-0.14.1/debian/changelog   2019-12-03 11:06:41.0 
+0100
@@ -1,3 +1,10 @@
+pytest-pylint (0.14.1-3) unstable; urgency=medium
+
+  * debian/patches/import_warning_fix.patch:
+- reorder imports to fix pylint import-outside-toplevel warnings
+
+ -- Sebastien Bacher   Tue, 03 Dec 2019 10:58:36 +0100
+
 pytest-pylint (0.14.1-2) unstable; urgency=medium
 
   [ Ondřej Nový ]
diff -Nru pytest-pylint-0.14.1/debian/patches/import_warning_fix.patch 
pytest-pylint-0.14.1/debian/patches/import_warning_fix.patch
--- pytest-pylint-0.14.1/debian/patches/import_warning_fix.patch
1970-01-01 01:00:00.0 +0100
+++ pytest-pylint-0.14.1/debian/patches/import_warning_fix.patch
2019-12-03 11:02:18.0 +0100
@@ -0,0 +1,39 @@
+# Description: build was failing on pylint import-outside-toplevel tests
+# Upstream: https://github.com/carsongee/pytest-pylint/issues/105
+#
+--- test-pytest/test_pytest_pylint.py  2019-01-15 14:10:38.0 +0100
 test-pytest/test_pytest_pylint.py.new  2019-12-03 10:57:27.668814673 
+0100
+@@ -3,7 +3,8 @@
+ Unit testing module for pytest-pylint plugin
+ """
+ import mock
+-
++from pytest_pylint import get_rel_path
++from pytest_pylint import include_file
+ 
+ pytest_plugins = ('pytester',)  # pylint: disable=invalid-name
+ 
+@@ -128,7 +129,6 @@
+ """
+ Verify our relative path function.
+ """
+-from pytest_pylint import get_rel_path
+ correct_rel_path = 'How/Are/You/blah.py'
+ path = '/Hi/How/Are/You/blah.py'
+ parent_path = '/Hi/'
+@@ -168,7 +168,6 @@
+ Files should only be included in the list if none of the directories on
+ it's path, of the filename, match an entry in the ignore list.
+ """
+-from pytest_pylint import include_file
+ ignore_list = [
+ "first", "second", "third", "part", "base.py"
+ ]
+@@ -191,7 +190,6 @@
+ 
+ def test_pylint_ignore_patterns():
+ """Test if the ignore-patterns is working"""
+-from pytest_pylint import include_file
+ ignore_patterns = [
+ "first.*",
+ ".*second",
diff -Nru pytest-pylint-0.14.1/debian/patches/series 
pytest-pylint-0.14.1/debian/patches/series
--- pytest-pylint-0.14.1/debian/patches/series  2019-07-25 14:03:35.0 
+0200
+++ pytest-pylint-0.14.1/debian/patches/series  2019-12-03 10:59:16.0 
+0100
@@ -1,2 +1,3 @@
 0001-Removed-PEP8-py.test-plugin.patch
 0002-Disable-abstract-method-pylint-check.patch
+import_warning_fix.patch
___
Python-modules-team mailing list
Python-modules-team@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team