#985209 file: Python scripts reported as x-script.python instead of x-python

Package:
file
Source:
file
Description:
Recognize the type of data in a file using "magic" numbers
Submitter:
Jérémy Rosen
Date:
2021-03-14 12:03:04 UTC
Severity:
normal
#985209#5
Date:
2021-03-14 12:01:47 UTC
From:
To:
Dear Maintainer,

While testing a script that uses "file" to detect python scripts I
encountered a change in behaviour.

The script checks by greping the output of "file -i" for x-python.
It didn't work for me because on my machine (debian/testing) python
files are reported as x-script.python.

I am not sure if this change of behaviour is a bug or a desired effect
(the internet is not consistent on the mime type of python files) but
since it's a change of behaviour, I play it safe and report the bug.

(The script is here : https://github.com/debops/debops/blob/master/lib/tests/check-pep8
if you are curious)

I also found a very old, related bug : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=235663#5o


Thx a lot for looking into it
Jérémy