Package: python2.6
Version: 2.6.5+20100706-1
Severity: normal
Tags: squeeze

Hi,

the class imap4.IMAP4() does not have the expected behaviour. In the
documentation (http://docs.python.org/release/2.6.5/library/imaplib.html), it
is state that if invoked without any argument, it will try to open an IMAP
connection on localhost, port 143. With python 2.6, an exception is raised.
Note that if stating 'localhost' as argument, the call has the good
behaviour:

Python 2.6.5+ (release26-maint, Jul  6 2010, 14:48:45) 
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import imaplib
>>> m = imaplib.IMAP4()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/imaplib.py", line 163, in __init__
    self.open(host, port)
  File "/usr/lib/python2.6/imaplib.py", line 229, in open
    self.sock = socket.create_connection((host, port))
  File "/usr/lib/python2.6/socket.py", line 543, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known
>>> m = imaplib.IMAP4('localhost')
>>> 


With python 2.5, the call with no argument is working as expected:

Python 2.5.5 (r255:77872, Apr 21 2010, 08:44:16) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import imaplib
>>> m = imaplib.IMAP4()
>>> 

Antoine

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

Kernel: Linux 2.6.32.2-xxxx-std-ipv4-32 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python2.6 depends on:
ii  libbz2-1.0              1.0.5-4          high-quality block-sorting file co
ii  libc6                   2.11.2-2         Embedded GNU C Library: Shared lib
ii  libdb4.8                4.8.26-1         Berkeley v4.8 Database Libraries [
ii  libncursesw5            5.7+20100313-2   shared libraries for terminal hand
ii  libreadline6            6.1-3            GNU readline and history libraries
ii  libsqlite3-0            3.6.23.1-4       SQLite 3 shared library
ii  mime-support            3.48-1           MIME files 'mime.types' & 'mailcap
ii  python2.6-minimal       2.6.5+20100706-1 A minimal subset of the Python lan

python2.6 recommends no packages.

Versions of packages python2.6 suggests:
ii  binutils                      2.20.1-12  The GNU assembler, linker and bina
pn  python2.6-doc                 <none>     (no description available)
pn  python2.6-profiler            <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to