Custom Query (115 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (13 - 15 of 115)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Ticket Resolution Summary Owner Reporter
#114 fixed Uncaught EOF error in host._avaliable_child schwa ftputiluser
Description

There is an uncaught ftplib EOF exception in _avaliable_child that does not get transformed to standard FTPUtil errors.

File "/usr/lib/python3.6/site-packages/ftputil/host.py", line 523, in download
    conditional=False, callback=callback)
  File "/usr/lib/python3.6/site-packages/ftputil/file_transfer.py", line 182, in copy_file
    source_fobj = source_file.fobj()
  File "/usr/lib/python3.6/site-packages/ftputil/file_transfer.py", line 94, in fobj
    return self._host.open(self.name, self.mode)
  File "/usr/lib/python3.6/site-packages/ftputil/host.py", line 203, in open
    host = self._available_child()
  File "/usr/lib/python3.6/site-packages/ftputil/host.py", line 167, in _available_child
    host._session.pwd()
  File "/usr/lib64/python3.6/ftplib.py", line 654, in pwd
    resp = self.voidcmd('PWD')
  File "/usr/lib64/python3.6/ftplib.py", line 276, in voidcmd
    return self.voidresp()
  File "/usr/lib64/python3.6/ftplib.py", line 249, in voidresp
    resp = self.getresp()
  File "/usr/lib64/python3.6/ftplib.py", line 234, in getresp
    resp = self.getmultiline()
  File "/usr/lib64/python3.6/ftplib.py", line 220, in getmultiline
    line = self.getline()
  File "/usr/lib64/python3.6/ftplib.py", line 208, in getline
    raise EOFError
#113 fixed isdir fails because of trailing forward slash schwa ftputiluser
Description

I believe there is a bug in lines 134 and 155 of path.py. The lines I'm talking about are of the form

if path == self._host.getcwd():

the error is that (at least) in some cases _host.getcwd() returns the path with a trailing forward slash while path may not have a trailing slash, that makes the comparison

u'/somepath' == u'/somepath/'

fail when it shouldn't.

I think paths should be normalized before comparing.

#112 fixed Erratic `OSError` exceptions in `readinto` in some unit tests schwa schwa
Description

When running the ftputil unit tests with Python 3.5.3 on Fedora 25, some of the tests fail from time to time. These are

test/test_real_ftp.py::TestFTPFiles::test_only_closed_children FAILED
test/test_real_ftp.py::TestFTPFiles::test_no_timed_out_children FAILED
test/test_real_ftp.py::TestFTPFiles::test_no_delayed_226_children FAILED
...
test/test_real_ftp.py::TestOther::test_subsequent_reading FAILED

(output from Pytest). Again, occasionally some of the tests pass. However, when returning now to ftputil after some months, I haven't seen all of the four tests pass. I also saw the failures with Python 3.3.6, compiled from source, although readinto raises an IOError then instead of an OSError (https://docs.python.org/3/whatsnew/3.5.html?highlight=readinto#io may be related here).

I do not see any of the above test methods fail for Python 2.7.13.

When the failures happen, the traceback reads like this:

___________________________________________________ TestOther.test_subsequent_reading ___________________________________________________

self = <test.test_real_ftp.TestOther object at 0x7fc0a7e20be0>

    def test_subsequent_reading(self):
        # Open a file for reading.
        with self.host.open("debian-keyring.tar.gz", "rb") as file1:
            pass
        # Make sure that there are no problems if the connection is reused.
>       with self.host.open("debian-keyring.tar.gz", "rb") as file2:

test/test_real_ftp.py:880: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ftputil/host.py:203: in open
    host = self._available_child()
ftputil/host.py:167: in _available_child
    host._session.pwd()
/usr/lib64/python3.5/ftplib.py:655: in pwd
    resp = self.voidcmd('PWD')
/usr/lib64/python3.5/ftplib.py:277: in voidcmd
    return self.voidresp()
/usr/lib64/python3.5/ftplib.py:250: in voidresp
    resp = self.getresp()
/usr/lib64/python3.5/ftplib.py:235: in getresp
    resp = self.getmultiline()
/usr/lib64/python3.5/ftplib.py:221: in getmultiline
    line = self.getline()
/usr/lib64/python3.5/ftplib.py:203: in getline
    line = self.file.readline(self.maxline + 1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <socket.SocketIO object at 0x7fc0a93a7da0>, b = <memory at 0x7fc0a96271c8>

    def readinto(self, b):
        """Read up to len(b) bytes into the writable buffer *b* and return
            the number of bytes read.  If the socket is non-blocking and no bytes
            are available, None is returned.
    
            If *b* is non-empty, a 0 return value indicates that the connection
            was shutdown at the other end.
            """
        self._checkClosed()
        self._checkReadable()
        if self._timeout_occurred:
>           raise OSError("cannot read from timed out object")
E           OSError: cannot read from timed out object

/usr/lib64/python3.5/socket.py:573: OSError

A possibly interesting observation is that all of the above tests seem to take a few seconds to run although they open the file debian-keyring.tar.gz only for reading. This file is about 14 MB large.

The OSError exception from Python's I/O layer in my opinion is different from a timeout where the server sends a 4xx (temporary failure) reply to the client.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Note: See TracQuery for help on using queries.