Timeline



Jan 28, 2019:

9:07 PM Changeset [1761:23c1639ea0e5] by Stefan Schwarzer <sschwarzer@…>
Remove `ScriptedSession` from `__all__` `ScriptedSession` shouldn't be used directly. Instead use `factory` to create `ScriptedSession`s implicitly.
9:01 PM Changeset [1760:5eb6ef13362a] by Stefan Schwarzer <sschwarzer@…>
Implement the multi-script factory more clearly Use a class `MultisessionFactory` with a `__call__` method to return consecutive factories that will use the respective scripts from the constructor argument `scripts`. See also the docstring of `MultisessionFactory` for an example.
8:43 PM Changeset [1759:e207929eef6c] by Stefan Schwarzer <sschwarzer@…>
Generalize session factory creation Allow more than one script in the `factory` function. For each script in `scripts`, a new `ScriptedSession` with the corresponding `script` will be used when the factory is called by `FTPHost._make_session`. The implementation seems to work fine, but it's even more difficult to understand than the previous version. I'm considering implementing this with a class.
8:21 PM Changeset [1758:ebd10c7d0d1f] by Stefan Schwarzer <sschwarzer@…>
Explain purpose of `init` call
7:45 PM Changeset [1757:480538e14451] by Stefan Schwarzer <sschwarzer@…>
Print when a session factory is called Print when a session factory is called, in other words, when a new `ScriptedSession` is instantiated. This is very helpful for tests that involve more than one `ScriptedSession` instance, e. g. tests for the download/upload functionality.
7:43 PM Changeset [1756:ad291ad87245] by Stefan Schwarzer <sschwarzer@…>
Prefix `print`s with `ScriptedSession` instance When printing from a `ScriptedSession` instance for tracking/debugging, prepend information on the respective `ScriptedSession` instance. Example: <ScriptedSession at 0x7ff1881a72e8> Expected method name: '__init__' This makes it much clearer what's going on if a test needs more than one `ScriptedSession`.
7:11 PM Changeset [1755:c7abe644763b] by Stefan Schwarzer <sschwarzer@…>
Comment `_index` instance variable
6:29 PM Ticket #116 (Deal with Pylint messages) closed by schwa
fixed: With the current Pylint configuration messages are manageable now. The …
6:16 PM Ticket #110 (Directory listings are empty if a server doesn't support the`-a` option) closed by schwa
fixed: This is changed in master (changeset [766c15f83205]).

Jan 3, 2019:

3:07 PM SubversionVsMercurialRevisions edited by schwa
Point to new mailing list archive (diff)

Jan 2, 2019:

12:19 PM Changeset [1754:ab3eaedc03cb] by Stefan Schwarzer <sschwarzer@…>
Use `ScriptedSession` in `TestRecursiveListingForDotAsPath` Update the tests in `TestRecursiveListingForDotAsPath` to use the new test code in `scripted_session.py`.
12:17 PM Changeset [1753:54a4611470c3] by Stefan Schwarzer <sschwarzer@…>
Simplify "__init__" call assertion `ScriptedSession._next_call` already has an argument for checking if the next call is an expected call. Therefore, just use the argument instead of using an extra `assert` statement.

Jan 1, 2019:

2:50 PM Changeset [1752:1d6514ef2206] by Stefan Schwarzer <sschwarzer@…>
Explain specific error text If we used `result=ftplib.error_perm`, `chmod` would only see a generic `FTPOSError`, not a `CommandNotImplementedError` (which derives from `FTPOSError`).
2:30 PM Changeset [1751:91115f000cd9] by Stefan Schwarzer <sschwarzer@…>
Use `ScriptedSession` in `test_command_not_implemented_error`
2:10 PM Changeset [1750:2930f3422938] by Stefan Schwarzer <sschwarzer@…>
Improve formatting in `test_set_parser`
2:05 PM Changeset [1749:a72b82f6aeaa] by Stefan Schwarzer <sschwarzer@…>
Convert more tests to use `ScriptedSession`
2:04 PM Changeset [1748:59ed56ce841c] by Stefan Schwarzer <sschwarzer@…>
Add `ScriptedSession.dir` method The result handling for this method is different from the default result handling. `dir` will treat its `Call.result` attribute as a multiline string and call the `callback` argument on each line of this multiline string.
1:59 PM Changeset [1747:ffa05876b460] by Stefan Schwarzer <sschwarzer@…>
Improve `Call` and `ScriptedSession` Some of the changes: - Allow passing expected args and kwargs to `Call` constructor and have them checked against the actual args and kwargs. - Move the call logic (raise or return) into the new method `Call.__call__`. - Print more output to help with debugging. (Pytest will print this output only if a test fails.) - Use an integer index instead of an iterator to get the next scripted call. This change makes it easier to "see" in the debugger "where" we are in the execution.

Dec 31, 2018:

11:05 PM Changeset [1746:72d797a82efe] by Stefan Schwarzer <sschwarzer@…>
Add test support class `ScriptedSession` This code is intended as the replacement of (most of) the currently used mock code. In the current mock code, multiple tests sometimes share test data. Hence, a developer must be careful not to add a test and make other tests fail as a side effect. The basis of the new mock code is the class `scripted_session.ScriptedSession`, which is used as (kind of) a replacement for the session factory argument of `FTPHost`. Since `ScriptedSession` needs a `script` parameter that common session factories don't take, I added a helper function `scripted_session.factory`, which takes a `script` and returns a session factory that can be used in `FTPHost`. With the new test code, I could rewrite some of the tests in `test_host.py` rather nicely. I was able to remove the session class `UnnormalizedCurrentWorkingDirectory`. However, I had to keep `FailOnLoginSession`, but only because the class is still used in another test module. I'm not yet sure how well the new approach will work with the remaining tests, but I'm about to find out. I couldn't determine this just by looking at the test code.

Dec 29, 2018:

10:58 PM Ticket #122 (FTPHost() deprecated?) closed by schwa
invalid: I'm closing the ticket as "invalid" since there weren't any further …
10:56 PM Ticket #115 (Use TLS on website) closed by schwa
fixed: Done since a few months, so I close this ticket.
10:36 PM WikiStart edited by schwa
(diff)
10:03 PM Ticket #125 (Add support for removedirs function) created by ftputiluser
As makedirs() is implemented it sounds reasonable to also implement …
9:49 PM Changeset [1745:2402b8a75178] by Stefan Schwarzer <sschwarzer@…>
Unify formatting of XXX-style comments Use consistent format `# XXX: ...` for all FIXME, TODO and XXX comments.
9:31 PM Changeset [1744:194d13209ff4] by Stefan Schwarzer <sschwarzer@…>
Remove remark about Python 2.6 Python 2 support will be removed in ftputil 4.0.0.

Dec 28, 2018:

10:18 PM Changeset [1743:4b773b472e7e] by Stefan Schwarzer <sschwarzer@…>
Disable `protected-access` `_Stat` needs to work closely together with other classes in the `ftputil.stat` module.
10:14 PM Changeset [1742:9993f6af7b40] by Stefan Schwarzer <sschwarzer@…>
Disable message `no-self-use` Keep the `self` argument because derived classes may need it.
10:08 PM Changeset [1741:0a9be69f9436] by Stefan Schwarzer <sschwarzer@…>
Suppress warning about protected access The classes `_Node` and `LRUCache` work closely together. It's ok to access the `_sort_key` attribute of (other) `_Node` instances.
10:04 PM Changeset [1740:bf5ae0f90520] by Stefan Schwarzer <sschwarzer@…>
Don't require `q` to exit `less` Don't require `q` to exit `less` if the output isn't more than a screenful.
10:01 PM Changeset [1739:8a0ab80584c7] by Stefan Schwarzer <sschwarzer@…>
Disable `misplaced-bare-raise` Contrary to what Pylint complains about, this is _not_ an error because the `new_onerror` function is supposed to be called only during handling of an exception.
9:50 PM Changeset [1738:fe7717b0c3ad] by Stefan Schwarzer <sschwarzer@…>
Disable more Pylint messages Disable `no-else-returns` for structures like if condition: return 1 else: return 2 In some cases using `else` here is more "symmetrical" and thus reads better. Disable `unnecessary-pass`. This applies mostly to custom exception classes that have both a docstring and a `pass` after that. I think the `pass` looks good here, even if Python doesn't require it. Of course I could disable these messages only for the above cases, but I think it's not justified to clutter the code with the pragmas if "violating" the respective rule is harmless.
9:48 PM Changeset [1737:4dee27f19dca] by Stefan Schwarzer <sschwarzer@…>
Sort message identifiers alphabetically
9:45 PM Changeset [1736:4c45dfcbf33a] by Stefan Schwarzer <sschwarzer@…>
Update copyright year Update copyright year because of the recent changes to the file.
9:43 PM Changeset [1735:97c07a8b60c9] by Stefan Schwarzer <sschwarzer@…>
Insert empty line above `__all__` assignment
9:42 PM Changeset [1734:4052933a7485] by Stefan Schwarzer <sschwarzer@…>
Remove Python 2 support

Dec 26, 2018:

9:27 PM Changeset [1733:9f3c5bd51a54] by Stefan Schwarzer <sschwarzer@…>
Fix typo Different from the "factory" usage, this typo was _not_ intentional. ;-)
8:54 PM Changeset [1732:a602a48f5f12] by Stefan Schwarzer <sschwarzer@…>
Remove unused imports
8:52 PM Changeset [1731:a4c634fe6853] by Stefan Schwarzer <sschwarzer@…>
Remove unused variable `hour` Also fix docstring. Rounding to full hours would be an error for timezones that contain 0.5-hour or 0.25-hour offsets.
8:49 PM Changeset [1730:28b990e4255c] by Stefan Schwarzer <sschwarzer@…>
Don't disable Pylint `incomplete-protocol` It seems this message no longer exists in current Pylint versions.
8:44 PM Changeset [1729:01e2cbf52b1e] by Stefan Schwarzer <sschwarzer@…>
Disable "bad-whitespace" messages
8:33 PM Changeset [1728:f0d526af5686] by Stefan Schwarzer <sschwarzer@…>
Don't inherit from `object` This is no longer necessary because the next version of ftputil won't support Python 2.
8:15 PM Changeset [1727:2652fb65ded9] by Stefan Schwarzer <sschwarzer@…>
Use `print` as a function in non-code Add parentheses for `print` calls in - documentation - docstrings - comments
8:10 PM Changeset [1726:b9ad96ee9c7b] by Stefan Schwarzer <sschwarzer@…>
Remove Python 2-specific code
8:06 PM Changeset [1725:7cd9bcf41226] by Stefan Schwarzer <sschwarzer@…>
Fix formatting
8:02 PM Changeset [1724:0570e7f70e00] by Stefan Schwarzer <sschwarzer@…>
Make it explicit that we no longer support Python 2
8:00 PM Changeset [1723:7d731aea5360] by Stefan Schwarzer <sschwarzer@…>
Remove positional argument specifiers for `format` In strings for `format` calls, remove the digits for positional arguments. For example, "{0}, {1}" becomes "{}, {}".
7:49 PM Changeset [1722:2500d9b34941] by Stefan Schwarzer <sschwarzer@…>
Remove obsolete features Remove detection of "invalid" features that are either ancient or no longer invalid. "Ancient" is the use of `xreadlines`; this should hardly be used anymore nowadays. "No longer invalid" are detections of byte strings starting with quotes. In Python 3, these are unicode strings, and it's unlikely that code _deliberately_ uses actual byte strings starting with `b`.
3:22 PM Changeset [1721:3557f65ded13] by Stefan Schwarzer <sschwarzer@…>
Remove `compat.py` This module was for Python 2/3 compatibility, similar to the `six` package. Since the next version of ftputil will only support Python 3, hardcode the types from `compat.py` in the code that used to use the `compat` module. There may still be redundant code that isn't needed when running the tests under Python 3.

Dec 25, 2018:

11:31 PM Changeset [1720:a10aefe0f71f] by Stefan Schwarzer <sschwarzer@…>
Remove support for `M2Crypto` M2Crypto was used to get FTP_TLS support in Python 2. Since we now target Python 3.5+, users can and should use `ftplib.FTP_TLS` to get FTP_TLS support.
11:22 PM Changeset [1719:560867ae70f0] by Stefan Schwarzer <sschwarzer@…>
Remove `encoding: utf-8` lines These are no longer needed because we code for only Python 3 now and Python 3 uses UTF-8 encoding for source files by default.
11:19 PM Changeset [1718:8bed138bc404] by Stefan Schwarzer <sschwarzer@…>
Don't inherit from `object` This is no longer needed because we're targeting Python 3 only now.
11:05 PM Changeset [1717:827cfaff87d7] by Stefan Schwarzer <sschwarzer@…>
Remove unneeded uses of `io` In Python 3, `io.open` is the same as `open`, so we don't need to use `io.open`.
11:05 PM Changeset [1716:208cec5f1797] by Stefan Schwarzer <sschwarzer@…>
Remove `socket_file_adapter.py` This was only needed for Python 2 support, which will be removed with ftputil 4.x.x.
10:55 PM Changeset [1711:766c15f83205] by Stefan Schwarzer <sschwarzer@…>
Set `use_list_a_option` to `False` by default See ticket #110 for the reasoning.
10:45 PM Changeset [1715:01215a325738] by Stefan Schwarzer <sschwarzer@…>
Remove `session_adapter.py` This was a crutch that was only needed for Python 2 support.
10:42 PM Changeset [1714:dd97ab89a444] by Stefan Schwarzer <sschwarzer@…>
Ignore Pytest cache and `egg-info` directory
10:35 PM Changeset [1713:f146a1ea66aa] by Stefan Schwarzer <sschwarzer@…>
Remove `__future__` imports With the switch to Python 3.x-only, the `__future__` imports are no longer needed. Update copyright years along with the `__future__` import removal.
10:20 PM Changeset [1712:1b17d07f3a88] by Stefan Schwarzer <sschwarzer@…>
Access `Callable` from `collections.abc` Honor `DeprecationWarning` from Python 3.7: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
10:10 PM Changeset [1710:c825f0cc96a3] by Stefan Schwarzer <sschwarzer@…>
Call `pytest` via `${PYTHON_BINARY} -m pytest` This makes sure that Pytest is run with the correct Python interpreter. Remove the comment because Pytest is invoked with `pytest` for a long time now.
10:08 PM Changeset [1709:c83a541585d6] by Stefan Schwarzer <sschwarzer@…>
Change Python binary to `python3` From now on (for ftputil 4.0.0) develop only for Python 3.
10:01 PM Changeset [1708:7704f9b8cf35] by Stefan Schwarzer <sschwarzer@…>
Ignore MyPy cache directory

Nov 28, 2018:

4:11 PM Ticket #124 (Small bug in docs) closed by schwa
invalid: Closing this as "invalid" because it's not actually a mistake.

Nov 26, 2018:

10:40 PM Ticket #124 (Small bug in docs) created by ftputiluser
The very first sample code on the site seems to contain an error: …
Note: See TracTimeline for information about the timeline view.