Bug#573945: Please use the warnings system to report deprecation warnings

Enrico Zini enrico at debian.org
Mon Mar 15 08:36:17 UTC 2010


Package: python-debian
Version: 0.1.15
Severity: normal

Hello,

thanks for python-debian. I appreciate the importance of dropping the
"_bundle" bit. However, the way it has been done is causing trouble: see
#573935.

update-apt-xapian-index is run on a cronjob every week. Such warnings
spam people. I added this code to prevent it, because python-apt was
introducing about 2 new deprecation warnings every week, and warnings
are useful in the terminal when you are developing, but don't belong in
a cron job in production system:

  if options.quiet:
    aptprogress = AptSilentProgress()
    progress = SilentProgress()
    warnings.filterwarnings("ignore","")

However, much to my desperation, python-debian prints the warning in
this way:

  sys.stderr.write("WARNING: the 'debian_bundle' package is *DEPRECATED*; "
                   "use the 'debian' package\n")

the same happens, grep told me, in deb822.py:

  print >> sys.stderr, "WARNING:",    \
          "the 'deb822' top-level module is *DEPRECATED*,",   \
          "please use 'debian.deb822'"
 
Besides this, in the last 4 months all the time I could possibly
dedicate to apt-xapian-index has been spent chasing deprecation warnings
being introduced all of a sudden and out of the blue by dependencies.

At least a mail to the reverse dependencies warning of things before the
deprecation is introduced would have been really, really appreciated.


Ciao,

Enrico

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-debian depends on:
ii  python                        2.5.4-9    An interactive high-level object-o
ii  python-support                1.0.6.1    automated rebuilding support for P

Versions of packages python-debian recommends:
ii  python-apt                    0.7.93.3   Python interface to libapt-pkg

Versions of packages python-debian suggests:
ii  gpgv                          1.4.10-2   GNU privacy guard - signature veri

-- no debconf information





More information about the pkg-python-debian-maint mailing list