Bug#467135: pyflakes: Duplicated output

2008-02-23 Thread Martin Geisler
Package: pyflakes
Version: 0.2.1+svn14502-1
Severity: important

PyFlakes prints warnings twice as illustrated by this simple test case:

  % echo 'print not_defiled' | pyflakes
  :1: undefined name 'not_defiled'
  :1: undefined name 'not_defiled'

I looked at the source package and found that some of the patches
applied are wrong. The set_exit_status.diff patch is the worst since it
prints the warnings twice using this code:

   w = checker.Checker(tree, filename)
   w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno))
   for warning in w.messages:
   print warning
  +if status == 0:
  +status = 1
  +for warning in w.messages:
  +print warning
   return len(w.messages)

The nested for-loop is the problem. It would be clearer if the status
variable was simply set like this:

   w = checker.Checker(tree, filename)
   w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno))
   for warning in w.messages:
   print warning
  +if status == 0 and len(w.messages) > 0:
  +status = 1
   return len(w.messages)

The patch pyflakes_unicode.diff is wrong and does almost the same as
check_encoding_errors.diff. I think pyflakes_unicode.diff should simply
be dropped.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-k7 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages pyflakes depends on:
ii  python2.4.4-6An interactive high-level object-o
ii  python-central0.5.15-0.1 register and build utility for Pyt

pyflakes recommends no packages.

-- no debconf information

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.


pgpWaYZ2NFpRu.pgp
Description: PGP signature


Bug#227513: dict-de-en: Should depend on dict-server instead of dictd

2004-01-13 Thread Martin Geisler
Package: dict-de-en
Severity: wishlist

The package should depend on the virtual package dict-server instead
of imposing a hard depencency on dictd.  This will allow people to
install the package with serpento as their dict-server instead of
forcing them to use dictd.

(This information applies to the dict-freedict-*-* packages too,
although they only suggest dictd.)

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux gimpster 2.6.0 #1 Thu Jan 8 22:06:43 CET 2004 i686
Locale: LANG=da_DK, LC_CTYPE=da_DK