[issue16270] ftplib hangs when closing connection

2012-10-17 Thread Ugra Dániel

New submission from Ugra Dániel:

With version 3.3 (64 bit on Arch Linux) Python now hangs when closing FTP 
connection on some sites:

url = ftp://ftp.fu-berlin.de/pub/misc/movies/database/ratings.list.gz;

with urllib.request.urlopen( url ):
pass

--
components: Library (Lib)
messages: 173209
nosy: daniel.ugra
priority: normal
severity: normal
status: open
title: ftplib hangs when closing connection
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16270
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16270] ftplib hangs when closing connection

2012-10-17 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
keywords: +3.3regression
nosy: +giampaolo.rodola, orsenthil
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16270
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16270] ftplib hangs when closing connection

2012-10-17 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I guess this is about urllib, not ftplib.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16270
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16270] ftplib hangs when closing connection

2012-10-17 Thread R. David Murray

R. David Murray added the comment:

Well, urllib calls ftplib for ftp urls, so it might be about ftplib.  But in 
that case it would be better to have a reproducer that *just* uses ftplib.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16270
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16270] ftplib hangs when closing connection

2012-10-17 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I can reproduce the issue on python 3.3.
To have a clearer understanding on what's going on use:

import urllib.request
import ftplib
ftplib.FTP.debugging = 4
url = ftp://ftp.fu-berlin.de/pub/misc/movies/database/ratings.list.gz;
with urllib.request.urlopen(url):
pass

The problem appears to be endtransfer() erroneously calling ftp.voidresp() (it 
just shouldn't):
http://hg.python.org/cpython/file/f6fcff683866/Lib/urllib/request.py#l2328
Patch in attachment fixes the issue.

--
keywords: +patch
Added file: http://bugs.python.org/file27606/urllib.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16270
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com