Timeline
Dec 25, 2015:
- 3:49 PM Documentation edited by
- (diff)
- 3:47 PM Milestone 3.3 completed
- 3:45 PM Download edited by
- (diff)
- 3:44 PM Changeset [1632:b02a9cea6443] by
- Added tag release3_3 for changeset 38a720e9501c
- 3:21 PM Changeset [1631:38a720e9501c] by
- Apply `make patch` and rebuild docs
- 3:20 PM Changeset [1630:2a179afe3823] by
- Explain 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.
Dec 24, 2015:
- 9:23 PM Changeset [1629:88c4f857a57a] by
- Update `VERSION` to 3.3
- 9:22 PM Changeset [1628:081e294de5ce] by
- Update `README.txt` for version 3.3
Dec 23, 2015:
- 10:43 PM Changeset [1627:4d5b3930d888] by
- Make clear we're speaking about directory and file names That is, not about file content.
- 8:33 PM Changeset [1626:c15d23632c7d] by
- Add draft of ftputil 3.3 announcement
- 8:19 PM Ticket #91 (use namedtuple for stat result.) closed by
-
fixed: As you suggest, I also think the idea behind using a
namedtuple
… - 8:18 PM Changeset [1625:c84dd64b3eea] by
- Add `__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).
- 7:17 PM Ticket #90 (Show filename on FTPIOError) closed by
- wontfix: Whether the directory name is included in the server response depends …
- 7:11 PM Ticket #89 (Parameter "account" not need in most cases) closed by
- fixed: Improved the documentation in [52b8ea2582cc].
- 7:08 PM Changeset [1624:52b8ea2582cc] by
- Mention 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.
- 6:48 PM Ticket #61 (Add 'rest' argument to file()) closed by
-
fixed: I implemented passing
rest
fromFTPHost.open
toFTP.transfercmd
… - 6:47 PM Changeset [1623:585ca820596e] by
- Fix typo in documenation
- 6:34 PM Changeset [1622:6466275a2c63] by
- Make 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.
- 6:29 PM Changeset [1621:60662e7b943d] by
- Document `FTPHost.open` `rest` argument
- 5:56 PM Changeset [1620:525a118b3085] by
- Explain 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.
- 5:21 PM Changeset [1619:66ef713f4fe8] by
- Raise `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.
- 5:10 PM Changeset [1618:3cb69eca3e41] by
- Add `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 AM Ticket #14 (Support for the REST verb.) closed by
- duplicate: I'm marking this as duplicate of ticket #61. Subsequent comments will …
- 12:21 AM Ticket #102 (ftplib.error_reply: 226 Transfer complete.) created by
- ftplib version: 3.2 Python version: 2.7.10 FTP server: Synology FTP …
Dec 22, 2015:
- 8:55 PM Ticket #86 (`makedirs` fails if an intermediate directory doesn't show contents) closed by
- fixed: Replying to schwa: > I plan to use Roger's suggestion …
- 8:55 PM Changeset [1617:dac2d0091bf9] by
- Increase year in copyright notice
- 8:53 PM Changeset [1616:b250e8ed87a6] by
- Apply 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),
- 8:30 PM Ticket #95 (IBM AS/400 ftpserver) closed by
- wontfix: I'm closing this ticket because workarounds exist (see comment:1) and …
- 8:06 PM Changeset [1615:88b0ffa3b6ee] by
- Make comment easier to understand
- 8:02 PM Changeset [1614:f0b18efd52e5] by
- Fix 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.
- 5:46 PM Ticket #96 (Explain why we get "latin1-encoded unicode strings" for paths) closed by
- fixed: I fixed and expanded the documentation section "Directory and file …
- 5:23 PM Changeset [1613:f6d7fe5a44bb] by
- Correct 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.
Nov 22, 2015:
- 7:31 PM Changeset [1612:f1bdb11422ab] by
- Add 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.
- 7:28 PM Changeset [1611:53b92b8e9cca] by
- Use `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.
- 6:04 PM Changeset [1610:618b30604061] by
- Remove 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.
- 5:48 PM Changeset [1609:5065ec7ab12f] by
- Remove 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`.
- 5:46 PM Changeset [1608:61b6654aed0a] by
- Remove 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.
- 5:37 PM Changeset [1607:5b2f60275a3f] by
- Change 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`.
- 5:16 PM Changeset [1606:b3cb37bf770e] by
- Add 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.
- 5:14 PM Changeset [1605:023d01d088bd] by
- Fix indentation
Nov 1, 2015:
- 11:02 PM Changeset [1604:f22e1a2a3313] by
- Add `__future__` import for unicode literals Although none of the session adapter code uses strings for the "real" implementation, make sure that docstrings are unicode.
- 10:55 PM Ticket #100 (Wrong handling of non-ASCII characters in paths under Python 2) closed by
- fixed: The problem should be fixed now. - Add a session factory adapter in …
- 10:50 PM Changeset [1603:3bdb8233c7f2] by
- Adapt 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.
- 10:48 PM Ticket #101 (Use `freezegun` to speed up time zone tests) created by
- The ftputil unit tests have some tests that run over a minute because …
- 10:24 PM Changeset [1602:086cea309114] by
- Make `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.
- 9:58 PM Changeset [1601:350fad454a39] by
- Adapt session factories for use with Python 2 The background is explained in the commit message for changeset 5a4abb73e8a1 and in ticket #100.
- 9:55 PM Changeset [1600:5a4abb73e8a1] by
- Add 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.
- 9:46 PM Changeset [1599:4dd8b4d6aba7] by
- Add `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.
- 6:50 PM Ticket #100 (Wrong handling of non-ASCII characters in paths under Python 2) created by
- For ticket #96, I was looking into the exact behavior of ftputil when …
Oct 18, 2015:
- 9:41 AM Ticket #97 (Can't connect FTPHost with ftputil 3.2, Python 3.3.0 (win32)) closed by
- duplicate: Duplicate of ticket #76.
- 9:40 AM Ticket #97 (Can't connect FTPHost with ftputil 3.2, Python 3.3.0 (win32)) reopened by
- In a Wine environment, I get […] Therefore, I'll change the …
- 12:42 AM Ticket #97 (Can't connect FTPHost with ftputil 3.2, Python 3.3.0 (win32)) closed by
- worksforme: Since I didn't get any feedback since my last comment and can't …
- 12:37 AM Ticket #99 (Host old versions of ftputil on PyPI) closed by
- fixed: Thanks to the provided script I …
Sep 26, 2015:
- 9:32 PM Ticket #99 (Host old versions of ftputil on PyPI) created by
- On 2015-09-24, I got the following mail: […] The mentioned …
Note: See TracTimeline
for information about the timeline view.