Custom Query (104 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (7 - 9 of 104)

1 2 3 4 5 6 7 8 9 10 11 12 13
Ticket Resolution Summary Owner Reporter
#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.

#111 fixed Add deprecation warnings on dropping Python 2 support schwa schwa
Description

As explained on the mailing list, a future version 4.0 of ftputil will drop support for Python 2.

For the upcoming version 3.4, add deprecation warnings to notify users about the future lack of Python 2 support.

The only direct public interfaces of ftputil are in ftputil.host and ftputil.error, so add a warning on the module level for these modules.

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