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

Call for tests: New python-magic Python bindings for libmagic



# 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 <capriott@debian.org>
   autoradio

Arturo Borrero Gonzalez <arturo@debian.org>
   rpmlint (U)

Chris Lamb <lamby@debian.org>
   diffoscope (U)

David Paleino <dapal@debian.org>
   syslog-summary

Debian Astronomy Team <debian-astro-maintainers@lists.alioth.debian.org>
   ginga

Debian LAVA team <pkg-linaro-lava-devel@lists.alioth.debian.org>
   lava-dispatcher

Debian Tryton Maintainers <tryton-debian@lists.alioth.debian.org>
   relatorio

Devscripts Devel Team <devscripts-devel@lists.alioth.debian.org>
   devscripts

Gaetano Guerriero <x.guerriero@tin.it>
   eyed3

Gianfranco Costamagna <locutusofborg@debian.org>
   s3cmd (U)

Holger Levsen <holger@debian.org>
   diffoscope (U)

Hugo Lefeuvre <hle@debian.org>
   alot (U)

Jordan Justen <jordan.l.justen@intel.com>
   alot (U)

Kouhei Maeda <mkouhei@palmtb.net>
   swiftsc

Mathias Behrle <mathiasb@m9s.biz>
   relatorio (U)

Matt Domsch <matt@domsch.com>
   s3cmd

Mattia Rizzolo <mattia@debian.org>
   devscripts (U)
   diffoscope (U)

Neil Williams <codehelp@debian.org>
   lava-dispatcher (U)

Ole Streicher <olebole@debian.org>
   ginga (U)

Paul Wise <pabs@debian.org>
   check-all-the-things

Paulo Roberto Alves de Oliveira (aka kretcheu) <kretcheu@gmail.com>
   rows

Python Applications Packaging Team <python-apps-team@lists.alioth.debian.org>
   alot

Reiner Herrmann <reiner@reiner-h.de>
   diffoscope (U)

Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>
   diffoscope

Ritesh Raj Sarraf <rrs@debian.org>
   apt-offline

RPM packaging team <pkg-rpm-devel@lists.alioth.debian.org>
   rpmlint

Senthil Kumaran S (stylesen) <stylesen@gmail.com>
   lava-dispatcher (U)

Simon Chopin <chopin.simon@gmail.com>
   alot (U)

Ximin Luo <infinity0@debian.org>
   diffoscope (U)

Attachment: signature.asc
Description: Digital signature


Reply to: