# TL;DR * The python-magic Python library for file type detection will switch to a different implementation soon.
* Code that relies on the old implementation should not be harmed,
everything else is a bug.
* Such code however might need an adjustment some distant day, not
before the buster release though.
* This is your chance to make this change as smooth as possible.
Hello,
for many years, there have been two Python bindings for the libmagic
file type detection library, both using the name "python-magic", but
with different and incompatible APIs. At the moment, Debian ships the
implementation bundled with src:file [file], maintained by Christos
Zoulas. However, there are several packages where upstream decided to
use the [pypi] implementation by Adam Hupp, Debian maintainers included
a code copy then.
Anyway, this awkward situation will come to an end: Kudos to Adam who
implemented a [file] compatibility layer in [pypi]. There is already a
python-magic package in experimental that provides both APIs, and the
created binary packages are to replace the one created by src:file.
Initial checks showed no regressions so far, but before doing the
switch by uploading to unstable I'd like to have a broader coverage,
therefore this
Call for tests
of all the packages that depend on python-magic and/or python3-magic,
also of other applications that use the [file] implementation. The
output of dd-list on the rdeps is attached below.
# How to test
Install python-magic and/or python3-magic from experimental and re-run
your applications. Is there code breakage? Or a file type detection
change?
Maintainers for packages that use a code copy of [pypi] might give it
a try as well, although nothing should go wrong then.
# Reporting bugs
The usual recommendations about filing bug reports apply.
At first, double-check whether your observation really was introduced
by the python-magic change, i.e. downgrade to the [file] version and
check somewhere else if the problem persists.
If it's obviously upstream, you'll do me a favor if you send the
reports to the upstream bug tracker[1], mention it's about the
"libmagic-compat" feature, and just leave a pointer in Debian's BTS.
Else or in case of doubt, report to the BTS and I'll do the triaging
and forwarding.
# Outlook
Two weeks from now the [pypi] implementation of python-magic is to hit
unstable, later testing according to the usual migration rules.
After that, packages that ship a [pypi] code copy will see a whishlist
bug to drop this as it's no longer needed (some three packages,
therefore no MBF).
For the buster release (somewhen 2019), I'll go to great lengths to
make sure python-magic ships the compatibility layer. In other words,
there is no need to change implementations based on [file] for the time
being.
Beyond buster: Depending on upstream development, the [file] API might
go away some day. As mentioned above, in Debian this will not happen
before the buster release. The [pypi] implementation will emit
deprecation warnings beforehand then (code is already there but
disabled). Otherwise it's too early for detailed plans.
Cheers,
Christoph
[file] https://www.darwinsys.com/file/
Current version in Debian sid: 1:5.32-1
[pypi] https://github.com/ahupp/python-magic/
Current version in Debian experimenta: 2:0.4.15-1~exp2
[1] https://github.com/ahupp/python-magic/issues
Andrea Capriotti <[email protected]>
autoradio
Arturo Borrero Gonzalez <[email protected]>
rpmlint (U)
Chris Lamb <[email protected]>
diffoscope (U)
David Paleino <[email protected]>
syslog-summary
Debian Astronomy Team <[email protected]>
ginga
Debian LAVA team <[email protected]>
lava-dispatcher
Debian Tryton Maintainers <[email protected]>
relatorio
Devscripts Devel Team <[email protected]>
devscripts
Gaetano Guerriero <[email protected]>
eyed3
Gianfranco Costamagna <[email protected]>
s3cmd (U)
Holger Levsen <[email protected]>
diffoscope (U)
Hugo Lefeuvre <[email protected]>
alot (U)
Jordan Justen <[email protected]>
alot (U)
Kouhei Maeda <[email protected]>
swiftsc
Mathias Behrle <[email protected]>
relatorio (U)
Matt Domsch <[email protected]>
s3cmd
Mattia Rizzolo <[email protected]>
devscripts (U)
diffoscope (U)
Neil Williams <[email protected]>
lava-dispatcher (U)
Ole Streicher <[email protected]>
ginga (U)
Paul Wise <[email protected]>
check-all-the-things
Paulo Roberto Alves de Oliveira (aka kretcheu) <[email protected]>
rows
Python Applications Packaging Team <[email protected]>
alot
Reiner Herrmann <[email protected]>
diffoscope (U)
Reproducible builds folks <[email protected]>
diffoscope
Ritesh Raj Sarraf <[email protected]>
apt-offline
RPM packaging team <[email protected]>
rpmlint
Senthil Kumaran S (stylesen) <[email protected]>
lava-dispatcher (U)
Simon Chopin <[email protected]>
alot (U)
Ximin Luo <[email protected]>
diffoscope (U)
signature.asc
Description: Digital signature

