Path: csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Paul Wise Newsgroups: linux.debian.bugs.dist,linux.debian.maint.python Subject: Bug#1029808: lintian: warnings related to *.pyc *.pyo __pycache__/ Date: Sat, 28 Jan 2023 02:30:01 +0100 Message-ID: X-Original-To: Debian Bug Tracking System X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Sat Jan 28 01:24:18 2023 Old-Return-Path: X-Spam-Flag: NO X-Spam-Score: -4 Reply-To: Paul Wise , 1029808@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-python@lists.debian.org, Debian Lintian Maintainers X-Debian-Pr-Message: report 1029808 X-Debian-Pr-Package: lintian X-Debian-Pr-Source: lintian Organization: Debian Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-BVgKP84ylP9mD11Wjrpd" MIME-Version: 1.0 User-Agent: Evolution 3.46.3-1 X-Debian-Message: from BTS X-Mailing-List: archive/latest/1756628 List-ID: List-URL: Approved: robomod@news.nic.it Lines: 66 Sender: robomod@news.nic.it X-Original-Date: Sat, 28 Jan 2023 09:20:25 +0800 X-Original-Message-ID: <54cd5a0a880f49d2c3c6a1daadcde2240c99dcba.camel@debian.org> Xref: csiph.com linux.debian.bugs.dist:1135145 linux.debian.maint.python:14865 --=-BVgKP84ylP9mD11Wjrpd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Package: lintian Version: 2.116.1 Severity: wishlist X-Debbugs-CC: debian-python@lists.debian.org The *.pyc *.pyo files are Python bytecode and are almost always generated from Python source code. Since Python 3 these are usually stored in a __pycache__/ directory. Since these files are not source code, they should not be present in the Debian source packages, but there are hundreds of them in Debian: $ apt-file -I dsc search --regex '\.py[co]$' | wc -l 507 Please complain on *.pyc *.pyo being present in Debian source packages. Please also check that when they are present, that they have a *.py source file present. When it is in the same directory it will have the same name but .py extension. When the generated files are in a __pycache__/ directory then *.pyc file name will contain .cpython-NN but the *.py source file will not. Please also complain about other files in __pycache__/ directories. Since these dirs are caches and caches are often ignored by various tools, the other files could get lost from backups, VCS repos, etc. $ apt-file -I dsc search __pycache__/ | grep -vF .cpython- ack: /t/swamp/__pycache__/notes.pl asciidoc: /tests/__test_data__/plugin/backends/__pycache__/.gitkeep mypy-protobuf: /test/generated/testproto/__pycache__/__init__.py mypy-protobuf: /test/generated/testproto/dot/com/__pycache__/__init__.py --=20 bye, pabs https://wiki.debian.org/PaulWise --=-BVgKP84ylP9mD11Wjrpd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmPUeFUACgkQMRa6Xp/6 aaPvaRAAnVllw+4xbfhLbu3fc8m3skp4CX2l0Q+B/HQsX3Qx8qAztLC0C7OikaBp BJg9Dd64/LBfN3X8Rg1M4rvDYoO0nhSLTk/GFA7RkjMSwaalGyY4H/yYIF+XspaO QlcGeB5rAtcK/Ptane9nSHQ2YwNNjiDECIhN8H81JMWYyVbCzMb74SChOq/NvwPN +silxb9loLT9c1fnQ6Y3DhAMJPN0IVXj+6+LEZSHgXbOlggMXEyAQTNx7ueYwcNR VTyqeGHznHni+gb/P3qj/2hzzB7d6RNSkMxuusagMKeE5VonoWu+t+tj/yiosP2+ ABrNTiCPIMLJvLxc+JbdNLrBGbvBlsTMVQxkpdY1RF0JY5gybS8M5OFCTw5BSlsF oOTf4p6VPM2EUWI/2zUtER51gFePrmAA5R4HuKNDvXBYu6cfNncWaBpBTWQlvYuP B0j0D44I+cy4DAjNm1KK+PAtjYqWNVP85UzTiStM2qaEdStSTeI02RahgORyapGO Pjmkxx0cYZkLKFeXjOtLD2yEqoXsIdNfgkO3TAKGMwbEt4oF69aTdMyATjTXLe0I MzwGETjQ9OJ6VVDK9ItYQAkwyWD0EeCzMOXSe8xNa20rl0+nAv6RhpK5k692N+VC JG/fbHSPrvi4Aqgj0RtZbIhfSdcp75gqpXdiG0szM2Y7326Uj68= =oZIw -----END PGP SIGNATURE----- --=-BVgKP84ylP9mD11Wjrpd--