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


23:02 Changeset [1604:f22e1a2a3313] by Stefan Schwarzer <sschwarzer@…>
defaultAdd `__future__` import for unicode literals Although none of the session adapter code uses strings for the "real" implementation, make sure that docstrings are unicode.
22:55 Ticket #100 (Wrong handling of non-ASCII characters in paths under Python 2) closed by schwa
fixed: The problem should be fixed now. - Add a session factory adapter in …
22:50 Changeset [1603:3bdb8233c7f2] by Stefan Schwarzer <sschwarzer@…>
defaultAdapt the session, not the session factory Since the session factory may be a function, not a class, don't adapt the factory. Instead, adapt the session object after creating it by using the factory.
22:48 Ticket #101 (Use `freezegun` to speed up time zone tests) created by schwa
The ftputil unit tests have some tests that run over a minute because they …
22:24 Changeset [1602:086cea309114] by Stefan Schwarzer <sschwarzer@…>
defaultMake `MockSession.transfercmd` compatible with the session adapter `ftplib.FTP.transfercmd` takes an optional `rest` argument. `test.mock_ftplib.MockSession` also defines a `transfercmd` to be used for unit tests, but this method didn't accept a `rest` argument because this isn't used by ftputil. This argument is added now, so that `MockSession.transfercmd` can be called from the session factory adaptor.
21:58 Changeset [1601:350fad454a39] by Stefan Schwarzer <sschwarzer@…>
defaultAdapt session factories for use with Python 2 The background is explained in the commit message for changeset 5a4abb73e8a1 and in ticket #100.
21:55 Changeset [1600:5a4abb73e8a1] by Stefan Schwarzer <sschwarzer@…>
defaultAdd session adapter for ticket #100 Under Python 2, `ftplib.FTP` (and compatible classes) don't work with unicode string arguments if they contain non-ASCII characters. ftputil always converts strings to unicode to be compatible with Python 3's `ftplib`. Hence, no `FTPHost` method works if it's fed byte strings or unicode strings that contain non-ASCII characters. (There are no such problems with `ftplib.FTP` under Python 3, as long as unicode string arguments contain only code points <= 255. The reason is explained in the `session_adapter` module's docstring.) On Python 2, the function `adapted_session_factory` returns an adapter class for `ftplib.FTP`-compatible session factories. On Python 3, no modification of the session factory is necessary, so `adapted_session_factory` returns the session factory unchanged.
21:46 Changeset [1599:4dd8b4d6aba7] by Stefan Schwarzer <sschwarzer@…>
defaultAdd `FTPHost.listdir` tests for ticket #100 Other methods that take directory or file names have the same issues as described in the ticket, but at the moment only `listdir` calls are tested. There's already a test for non-ASCII file names in `test.test_host`, but that didn't catch the problem because the mock code in `test.mock_ftplib` hid the problem.
18:50 Ticket #100 (Wrong handling of non-ASCII characters in paths under Python 2) created by schwa
For ticket #96, I was looking into the exact behavior of ftputil when …


09:41 Ticket #97 (Can't connect FTPHost with ftputil 3.2, Python 3.3.0 (win32)) closed by schwa
duplicate: Duplicate of ticket #76.
09:40 Ticket #97 (Can't connect FTPHost with ftputil 3.2, Python 3.3.0 (win32)) reopened by schwa
In a Wine environment, I get […] Therefore, I'll change the resolution …
00:42 Ticket #97 (Can't connect FTPHost with ftputil 3.2, Python 3.3.0 (win32)) closed by schwa
worksforme: Since I didn't get any feedback since my last comment and can't reproduce …
00:37 Ticket #99 (Host old versions of ftputil on PyPI) closed by schwa
fixed: Thanks to the provided script I …


21:32 Ticket #99 (Host old versions of ftputil on PyPI) created by schwa
On 2015-09-24, I got the following mail: […] The mentioned …
Note: See TracTimeline for information about the timeline view.