[ftputil] ftputil 2.4 with python 2.6.1

Peter Stirling peter at pjstirling.plus.com
Thu Apr 9 01:44:24 CEST 2009


After further inspection it appears that the windows python2.6 install doesn't
include a dll of the compiled heapq module 

	/usr/lib/python2.5/lib-dynload/_heapq.so, on ubuntu python2.5

However when I tried to test the pure python version it decided to work, so there
must be a bad dll somewhere.

To test this I made a copy of the pure python heapq.py as heapq26.py, and commented
out the code that replaces pure-python with the c versions (line 313). I then altered
ftputil/lrucache.py(line 43) to import from this new module, and when I run the test
program I no longer get the exception.

I am very confused.

> Hello Peter,
> 
> Thanks a lot for your feedback!
> 
> On 2009-04-02 07:40, Peter Stirling wrote:
> > I've been using ftputil to perform the upload part of a offline web-page
> > generation program (templating without requiring the server to cgi).
> > 
> > When I run it on python-2.5.2 (the default for ubuntu-intrepid) it works
> > as expected, however when I run it on Windows (python-2.6.1 using the
> > installer) I get an exception:
> > [...]
> 
> I have been able to reproduce your problem: It occurs here on
> Windows XP but not on Ubuntu Linux (both scenarios with
> Python 2.6). However, until now I haven't found the bug though
> narrowed it down somewhat.
> 
> > Interestingly, I don't get the exception when running on python-2.6 on
> > mac os X (fink package manager), but I do get a deprecation warning for:
> > 
> > ftputil/ftp_stat.py:58: DeprecationWarning: object.__init__() takes no
> > parameters
> >   super(StatResult, self).__init__(sequence)
> 
> I found the reason for the warning and removed the cause. I also
> changed some code to remove another deprecation warning that
> showed up during the unit tests when running under Python 2.6.
> The current Subversion repository includes those changes already.
> 
> I'm very interested in finding out what the cause of the
> traceback you got is.
> 
> Best regards,
> Stefan



More information about the ftputil mailing list