#1143019 dh_fixperms: set python modules which are not scripts to not executable

#1143019#5
Date:
2026-07-29 18:03:21 UTC
From:
To:
Dear Maintainer,

In python-requests-cache upstream ships one python module, probably by mistake, as executable.

Lintian reports this as a warning:
W: python3-requests-cache: executable-not-elf-or-script [usr/lib/python3/dist-packages/requests_cache/models/response.py]

I'm fixing this now with the debian/rules lines:

execute_after_dh_fixperms:
	chmod 644 debian/python3-requests-cache/usr/lib/python3/dist-packages/requests_cache/models/response.py

This commit contains my fix: https://salsa.debian.org/plenae/python-requests-cache/-/commit/a859e613293c9bd6621d344b6596c6a6635e1fa1

The previous commit illustrates the issue.

It would be better to have dh_fixperms understand which files in python
packages are modules and should not be executable, and which are scripts, which
should be +x.

Best regards,

Pieter