21:49 Milestone 3.3.1 completed
21:49 ftputil-3.3.1.tar.gz attached to Download by schwa
21:48 Ticket #102 (ftplib.error_reply: 226 Transfer complete.) closed by schwa
21:41 Download edited by schwa
21:37 Changeset [1639:28728176a329] by Stefan Schwarzer <sschwarzer@…>
defaultUpdate files by running `make patch` and `make docs`
21:37 Changeset [1638:6068f004ac3d] by Stefan Schwarzer <sschwarzer@…>
defaultUpdate `README.txt` and `announcements.txt` for version 3.3.1
21:36 Changeset [1637:3569616c74eb] by Stefan Schwarzer <sschwarzer@…>
defaultUpdate `VERSION` for release 3.3.1
21:35 Changeset [1636:8a846e32b6de] by Stefan Schwarzer <sschwarzer@…>
defaultFix invalid 226 reply bug (ticket 102) Under FTP server load, a 226 reply from the server may not be "seen" while a remote file is closed in `FTPFile.close`. If the reply is only seen in in the `pwd` call in `FTPHost._available_child`, `ftplib` raises an `error_reply` exception since no 226 is expected from a `pwd` call. This changeset fixes the bug by explicitly catching the `error_reply` exception. This is the same approach as for timed-out child sessions, which cause an `error_temp` exception. The fix will cause `_available_child` to ignore the child session whose `pwd` caused the `error_reply` exception. However, the child will be tried again next time `_available_child` is called and should then have a working `pwd` call (unless the child session timed out, in which case it will cause an `error_temp`).
21:28 Changeset [1635:e7a19b88c541] by Stefan Schwarzer <sschwarzer@…>
defaultAdd TODO comment See also changeset 0b722dda197d.
21:27 Ticket #104 (Redundant menu entries) created by schwa
Since recently there appear "native" menu entries in addition to those …
21:22 Documentation edited by schwa
21:13 Changeset [1634:0b722dda197d] by Stefan Schwarzer <sschwarzer@…>
defaultFix `TestLstatAndStat.test_repr` Probably due to a DST change, the expected value for `st_mtime` changed from 1421705460.0 to 1453241460.0. At the moment, I just changed the expected value, but in the long run the test should be changed so that it adapts to a changed DST by itself. Also changed the expected result for Python 2 to a byte string. I'm not sure whether it's a good idea to change the string type of `repr` values "away" from the respective native type.
07:39 Changeset [1633:f6ab8c23435e] by Stefan Schwarzer <sschwarzer@…>
defaultAdd `from __future__ import print_function` Although `print` isn't needed in the module, having the import is useful if `print` calls are added temporarily for debugging.


09:18 Ticket #103 (Error `open`ing new file-like objects when a connection is timed-out but ...) created by ftputiluser
Here's the sample stack trace: […] The reason might be that the server …


15:49 Documentation edited by schwa
15:47 Milestone 3.3 completed
15:46 ftputil-3.3.tar.gz attached to Download by schwa
15:45 Download edited by schwa
15:44 Changeset [1632:b02a9cea6443] by Stefan Schwarzer <sschwarzer@…>
defaultAdded tag release3_3 for changeset 38a720e9501c
15:21 Changeset [1631:38a720e9501c] by Stefan Schwarzer <sschwarzer@…>
defaultApply `make patch` and rebuild docs
15:20 Changeset [1630:2a179afe3823] by Stefan Schwarzer <sschwarzer@…>
defaultExplain why we change into the directory to check the existence In case of virtual directories (#86) we may not see an existining directory in a listing of the parent directory. Successfully changing into a directory is a more reliable way to prove its existence. With the implemented approach, we may still run into problems, if we can't change into the directory even though it exists. Changing into a directory `a` may fail if we don't have the permission to do so. In that case, however, trying to make a child directory `a/b` may fail anyway.


21:23 Changeset [1629:88c4f857a57a] by Stefan Schwarzer <sschwarzer@…>
defaultUpdate `VERSION` to 3.3
21:22 Changeset [1628:081e294de5ce] by Stefan Schwarzer <sschwarzer@…>
defaultUpdate `README.txt` for version 3.3


22:43 Changeset [1627:4d5b3930d888] by Stefan Schwarzer <sschwarzer@…>
defaultMake clear we're speaking about directory and file names That is, not about file content.
20:33 Changeset [1626:c15d23632c7d] by Stefan Schwarzer <sschwarzer@…>
defaultAdd draft of ftputil 3.3 announcement
20:19 Ticket #91 (use namedtuple for stat result.) closed by schwa
fixed: As you suggest, I also think the idea behind using a namedtuple isn't …
20:18 Changeset [1625:c84dd64b3eea] by Stefan Schwarzer <sschwarzer@…>
defaultAdd `__repr__` so that a `StatResult` looks like a named tuple (#91) Contrary to the suggestion in ticket #91, I can't turn `StatResult` into a `namedtuple`. Since `StatResult` inherits from `tuple`, its constructor takes a tuple of the n items to use: StatResult((item1, item2, ...)) On the other hand, the constructor of a `namedtuple` takes n arguments for the tuple items, so the API would become StatResult(item1, item2, ...) Since `StatResult` is a public API for implementation of custom parsers, I can't just change it. However, since the main idea behind using a `namedtuple` is its representation, I added a `__repr__` method so that the representation of a `StatResult` looks like the representation of a `namedtuple`. Note that the `__repr__` result is different under Python 2 and 3. The strings in the `StatResult` are always unicode strings and those have a `u` prefix under Python 2. I had considered removing the prefix for Python 2, but I think this could be very confusing during debugging (including for me).
19:17 Ticket #90 (Show filename on FTPIOError) closed by schwa
wontfix: Whether the directory name is included in the server response depends on …
19:11 Ticket #89 (Parameter "account" not need in most cases) closed by schwa
fixed: Improved the documentation in [52b8ea2582cc].
19:08 Changeset [1624:52b8ea2582cc] by Stefan Schwarzer <sschwarzer@…>
defaultMention that `account` and `session_factory` normally aren't needed Also changed the subsection heading from "Basics" to "Introduction" since the use of `account` and `session_factory` aren't basic usage. I considered but dismissed the idea of removing `account` and `session_factory` from the initial usage example. In my opinion this would "spread out" the description of the `FTPHost` constructor too much.
18:48 Ticket #61 (Add 'rest' argument to file()) closed by schwa
fixed: I implemented passing rest from FTPHost.open to FTP.transfercmd in …
18:47 Changeset [1623:585ca820596e] by Stefan Schwarzer <sschwarzer@…>
defaultFix typo in documenation
18:34 Changeset [1622:6466275a2c63] by Stefan Schwarzer <sschwarzer@…>
defaultMake the paragraph on text mode semantics a warning Move the paragraph on the different text mode semantics into the bullet point on `FTPHost.open` and turn the paragraph into a warning box. With this reordering, the explanations on text vs. binary mode are finished before the explanation of the `rest` argument starts.
18:29 Changeset [1621:60662e7b943d] by Stefan Schwarzer <sschwarzer@…>
defaultDocument `FTPHost.open` `rest` argument
17:56 Changeset [1620:525a118b3085] by Stefan Schwarzer <sschwarzer@…>
defaultExplain lack of tests for reading/writing beyond the end of a file Here's a copy of the comment because this may also be interesting as part of the commit message: There are no tests for reading and writing beyond the end of a file. For example, if the remote file is 10 bytes long and `open(remote_file, "rb", rest=100)` is used, the server may return an error status code or not. The server I use for testing returns a 554 status when attempting to _read_ beyond the end of the file. On the other hand, if attempting to _write_ beyond the end of the file, the server accepts the request, but starts writing after the end of the file, i. e. appends to the file. Instead of expecting certain responses that may differ between server implementations, I leave the bahavior for too large `rest` arguments undefined. In practice, this shouldn't be a problem because the `rest` argument should only be used for error recovery, and in this case a valid byte count for the `rest` argument should be known.
17:21 Changeset [1619:66ef713f4fe8] by Stefan Schwarzer <sschwarzer@…>
defaultRaise `CommandNotImplementedError` if `rest` is used for text files Using `rest` for text files is confusing, don't support it. For example, if a UTF-8-encoded file starts with "äbcdef", a `rest` argument 3 would start reading at byte 3, but at the same time at character 2 ("c") since "ä" is encoded in two bytes. Line ending conversions would also result in deviations between byte and character offsets.
17:10 Changeset [1618:3cb69eca3e41] by Stefan Schwarzer <sschwarzer@…>
defaultAdd `rest` argument to `FTPHost.open` Allow a `rest` argument in `FTPHost.open`. Pass this on to `FTPFile._open` and from there to `self._session.transfercmd`. So far there's no error handling.
11:36 Ticket #14 (Support for the REST verb.) closed by schwa
duplicate: I'm marking this as duplicate of ticket #61. Subsequent comments will go …
00:21 Ticket #102 (ftplib.error_reply: 226 Transfer complete.) created by ftputiluser
ftplib version: 3.2 Python version: 2.7.10 FTP server: Synology FTP …


20:55 Ticket #86 (`makedirs` fails if an intermediate directory doesn't show contents) closed by schwa
fixed: Replying to schwa: > I plan to use Roger's suggestion from …
20:55 Changeset [1617:dac2d0091bf9] by Stefan Schwarzer <sschwarzer@…>
defaultIncrease year in copyright notice
20:53 Changeset [1616:b250e8ed87a6] by Stefan Schwarzer <sschwarzer@…>
defaultApply a variant of Roger Demetrescu's patch (see ticket #86) Thanks, Roger! :-) The only difference between this changeset and Roger's patch is that the new code in the changeset has slightly different formatting to limit the line length to 79 characters. Contrary to my original intention I haven't added unit tests for the virtual directory support yet. I'd expect the tests to become rather convoluted with the current mocking infrastructure in `test.mock_ftplib`. I'm planning to add tests when more code is migrated to use the `mock` library (see ticket #98),
20:30 Ticket #95 (IBM AS/400 ftpserver) closed by schwa
wontfix: I'm closing this ticket because workarounds exist (see comment:1) and the …
20:06 Changeset [1615:88b0ffa3b6ee] by Stefan Schwarzer <sschwarzer@…>
defaultMake comment easier to understand
20:02 Changeset [1614:f0b18efd52e5] by Stefan Schwarzer <sschwarzer@…>
defaultFix documentation regarding time shift support The documentation stated that a `TimeShiftError` would be raised if the time shift was not a multiple of an hour. This condition no longer applies since ticket #81 was fixed.
17:46 Ticket #96 (Explain why we get "latin1-encoded unicode strings" for paths) closed by schwa
fixed: I fixed and expanded the documentation section "Directory and file names" …
17:23 Changeset [1613:f6d7fe5a44bb] by Stefan Schwarzer <sschwarzer@…>
defaultCorrect and expand section "Directory and file names" The previous text assumed that `ftputil` would implicitly use the encoding from `locale.getpreferredencoding`. This is wrong. `ftputil` uses `ftplib` and (on Python 3) `ftplib` implicitly always uses latin-1 encoding.


19:31 Changeset [1612:f1bdb11422ab] by Stefan Schwarzer <sschwarzer@…>
defaultAdd test for path with non-latin1 unicode string ftplib (under Python 2 and 3) raises a `UnicodeEncodeError` if confronted with a path with non-latin1 characters. Test that ftputil also raises the same exception. There's no sensible way to make non-latin1 paths work as long as we build on ftplib.
19:28 Changeset [1611:53b92b8e9cca] by Stefan Schwarzer <sschwarzer@…>
defaultUse `if` expression instead of slightly obscure tuple indexing Instead of command_type = ("STOR", "RETR")[is_read_mode] use command_type = "RETR" if is_read_mode else "STOR" The latter is much clearer. I assume the previous code was from a time when Python didn't have `if` expressions yet and I didn't want to write an `if` statement.
18:04 Changeset [1610:618b30604061] by Stefan Schwarzer <sschwarzer@…>
defaultRemove function `adapted_session`; apply `SessionAdapter` directly Don't keep the helper function `adapted_session` for applying it just once. Instead, when adapting an FTP session for Python 2 in `ftputil.host._make_session`, wrap it in a `SessionAdapter` object directly. This is like the wrapping in `ftputil.file.FTPFile._open` where we have the Python version check directly in the method.
17:48 Changeset [1609:5065ec7ab12f] by Stefan Schwarzer <sschwarzer@…>
defaultRemove test `TestOther.test_bytes_file_name` This test is superseded by `test_listdir_with_non_ascii_byte_string` and `test_listdir_with_non_ascii_unicode_string`.
17:46 Changeset [1608:61b6654aed0a] by Stefan Schwarzer <sschwarzer@…>
defaultRemove sentinel code for Python 2 No longer prevent running `TestOther.test_bytes_file_name` under Python 2. The changes for ticket #100 make the test work for Python 2 as well.
17:37 Changeset [1607:5b2f60275a3f] by Stefan Schwarzer <sschwarzer@…>
defaultChange expected error message in unit test `TestErrorConversion.test_error_message_reuse` tests the construction of the error message in ftputil. `str(exception)` should include the error from the caught ftplib exception. In case of the unit test, the ftplib exception is a socket error (`gaierror`). It seems the error arguments have changed from `(-2, "Name or service not known")` to `(-5, "No address associated with hostname")`. I assume this is due to the update from Fedora 21 to 22. I don't believe the change is due to a change in Python version because both Python 2 and 3 fail(ed) the unit test and are fixed by the same code change in `ftputil.error`.
17:16 Changeset [1606:b3cb37bf770e] by Stefan Schwarzer <sschwarzer@…>
defaultAdd import of `ftputil.tool` `ftputil.tool` is used in `error.py`, but not imported. It seems in "normal" use of `error.py`, `ftputil.tool` is already imported and available in `error`'s namespace via `ftputil`. However, it's better coding style to have all imports that are used in the module.
17:14 Changeset [1605:023d01d088bd] by Stefan Schwarzer <sschwarzer@…>
defaultFix indentation
Note: See TracTimeline for information about the timeline view.