[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#924417: lintian: Allow *.pth files in python dist-packages



Package: lintian
Version: 2.9.1
Severity: normal
Tags: patch

Dear Maintainer,

/usr/lib/python*/dist-packages/*.pth files currently trigger lintian error
tag:

unknown-file-in-python-module-directory

*.pth should not be unknown. They are well-documented by the Python
specification[1] and this location is exactly where they belong.

Legitimate uses of this file exist in the archive.  python-
testing.mysqld[2] and python-input-pad[3] override this tag with the phrase
"false positive". The vast majority (>150) of others including python-
matplotlib and python-gobject-2 simply ignore this lintian error as they
deploy pth files[4].

There few important cases of this lintian error being raised including:
- debdry deploying 'control'
- python-cf deploying 'delme.nc'
- python-django-ranged-response deploying 'db.sqlite3'
- python3-csvkit deploying 'stdin_out.csv'

One could argue that the use of *.pth files should be discouraged.
Installing a package which deploys a *.pth can change the global python
environment. In this case a new tag (perhaps with lower severity) would be
more appropriate which warns the packager to carefully check the file's
contents and consider removing it. A more relevant tag describing the
position is less likely to be ignored than a general error which says this
Python-specification-compliant file is 'unknown'. A new tag would be more
appropriate than changing this tag because there are legitimate and
important instances of the existing tag as-is.

Best Regards,

Stewart Ferguson

[1] https://docs.python.org/3/library/site.html
[2] 
https://sources.debian.org/src/python-testing.mysqld/1.4.0-3/debian/python3-testing.mysqld.lintian-overrides/
[3] 
https://sources.debian.org/src/input-pad/1.0.3-3/debian/python-input-pad.lintian-overrides/
[4] 
https://lintian.debian.org/tags/unknown-file-in-python-module-directory.html

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-2-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lintian depends on:
ii  binutils                       2.31.1-15
ii  bzip2                          1.0.6-9
ii  diffstat                       1.62-1
ii  dpkg                           1.19.5
ii  dpkg-dev                       1.19.5
ii  file                           1:5.35-2
ii  gettext                        0.19.8.1-9
ii  gpg                            2.2.12-1
ii  intltool-debian                0.35.0+20060710.5
ii  libapt-pkg-perl                0.1.34+b1
ii  libarchive-zip-perl            1.64-1
ii  libcapture-tiny-perl           0.48-1
ii  libcgi-pm-perl                 4.40-1
ii  libclass-accessor-perl         0.51-1
ii  libclone-perl                  0.41-1+b1
pn  libdigest-sha-perl             <none>
ii  libdpkg-perl                   1.19.5
ii  libemail-valid-perl            1.202-1
ii  libfile-basedir-perl           0.08-1
ii  libio-async-perl               0.72-1
ii  libipc-run-perl                20180523.0-1
ii  liblist-moreutils-perl         0.416-1+b4
ii  libparse-debianchangelog-perl  1.2.0-13
ii  libpath-tiny-perl              0.108-1
ii  libtext-levenshtein-perl       0.13-1
ii  libtimedate-perl               2.3000-2
ii  libtry-tiny-perl               0.30-1
ii  liburi-perl                    1.76-1
ii  libxml-simple-perl             2.25-1
ii  libyaml-libyaml-perl           0.76+repack-1
ii  man-db                         2.8.5-2
ii  patchutils                     0.3.4-2
ii  perl                           5.28.1-4
ii  t1utils                        1.41-3
ii  xz-utils                       5.2.4-1

Versions of packages lintian recommends:
ii  libperlio-gzip-perl  0.19-1+b5

Versions of packages lintian suggests:
pn  binutils-multiarch     <none>
ii  libhtml-parser-perl    3.72-3+b3
ii  libtext-template-perl  1.54-1

-- no debconf information
From d63a53132f8aa87895f38cddee932b93f7d4f218 Mon Sep 17 00:00:00 2001
From: Stewart Ferguson <stew@ferg.aero>
Date: Tue, 12 Mar 2019 19:51:20 +0100
Subject: [PATCH] Allowing *pth files in python dist-packages

---
 data/files/allowed-python-files | 1 +
 1 file changed, 1 insertion(+)

diff --git a/data/files/allowed-python-files b/data/files/allowed-python-files
index e55d096c9..edaba07d9 100644
--- a/data/files/allowed-python-files
+++ b/data/files/allowed-python-files
@@ -4,3 +4,4 @@
 \.egg-info$
 \.so$
 \.py[ic]?$
+\.pth$
-- 
2.20.1

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: