- 19 Mar, 2018 40 commits
-
-
David Wilson authored
-
David Wilson authored
Implement Connection.__del__, which is almost certainly going to trigger more bugs down the line, because the state of the Connection instance is not guranteed during __del__. Meanwhile, it is temporarily needed for deployed-today Ansibles that have a buggy synchronize action that does not call Connection.close(). A better approach to this would be to virtualize the guts of Connection, and move its management to one central place where we can guarantee resource destruction happens reliably, but that may entail another Ansible monkey-patch to give us such a reliable hook.
-
David Wilson authored
Part of an effort to make resource management a little more explicit.
-
David Wilson authored
When a Broker() is running with install_watcher=True, arrange for only one watcher thread to exist for each target thread, and to reset the mapping of watchers to targets after process fork. This is probably the last change I want to make to the watcher feature before deciding to rip it out, it may be more trouble than it is worth.
-
David Wilson authored
-
Alex Willmer authored
Full output of failed test ``` ERROR: test_okay (__main__.FakeSshTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/ssh_test.py", line 16, in test_okay ssh_path=testlib.data_path('fakessh.py'), File "/home/alex/src/mitogen/mitogen/master.py", line 650, in ssh return self.connect('ssh', **kwargs) File "/home/alex/src/mitogen/mitogen/parent.py", line 463, in connect return self._connect(context_id, klass, name=name, **kwargs) File "/home/alex/src/mitogen/mitogen/parent.py", line 449, in _connect stream.connect() File "/home/alex/src/mitogen/mitogen/ssh.py", line 104, in connect super(Stream, self).connect() File "/home/alex/src/mitogen/mitogen/parent.py", line 395, in connect self._connect_bootstrap() File "/home/alex/src/mitogen/mitogen/ssh.py", line 116, in _connect_bootstrap time.time() + 10.0): File "/home/alex/src/mitogen/mitogen/parent.py", line 207, in iter_read (''.join(bits)[-300:],) mitogen.core.StreamError: EOF on stream; last 300 bytes received: 'Usage: fakessh.py [options]\n\nfakessh.py: error: no such option: -o\n' ```
-
Alex Willmer authored
I could not get Python 2.5 or earlier to work. Too many packages (critically docker) don't support it.
-
Alex Willmer authored
This eliminates the possibility of the filesystem and setup.py diverging, as had happened with ansible_mitogen/connection/ vs ansible_mitogen/connection.py
-
David Wilson authored
-
David Wilson authored
Related to issue #141.
-
David Wilson authored
Now there is a single deadline calculated by the parent.Stream constructor, and reused for both SSH and sudo.
-
David Wilson authored
Was triggering a crash indirectly due to Ansible passing us Unicode strings. Needs a better fix.
-
David Wilson authored
-
David Wilson authored
-
David Wilson authored
-
David Wilson authored
-
Alex Willmer authored
SSH command size: 439 (+4 bytes) Preamble size: 8941 (no change) This _increases_ the size of the first stage, but - Eliminates one of the two remaining uses of `sys` - Reads the preamble as a byte-string, no call `.encode()` is needed on Python 3 before calling `_()`
-
Alex Willmer authored
SSH command size: 435 (-4 bytes) Preamble size: 8962 (no change) os.execl is the same as os.execv, but it take a variable number of arguments instead of a single sequence.
-
Alex Willmer authored
SSH command size: 439 (-4 bytes) Preamble size: 8962 (no change)
-
Alex Willmer authored
SSH command size: 443 (-5 bytes) Preamble size: 8962
-
Alex Willmer authored
SSH command size: 448 (-5 bytes) Preamble size: 8941 (no change) NB: The 'zip' alias was absent in Python 3.x, until Python 3.4. This should change be reverted if Python 3.0, 3.2, or 3.3 support is required.
-
Alex Willmer authored
SSH command size: 453 (no change) Preamble size: 8941 (-5 bytes)
-
Alex Willmer authored
SSH command size: 453 (-8 bytes) Preamble size: 8946 (no change)
-
Alex Willmer authored
SSH command size: 461 (-8 bytes) Preamble size: 8946 (no change) Since python has reached the last statement this should occur anyway.
-
Alex Willmer authored
SSH command size: 469 (-11 bytes) Preamble size: 8946 (no change) Although the source is longer, the _compressed_ length is reduced.
-
Alex Willmer authored
SSH command size: 481 (down 1) Preamble size: 8946 (no change)
-
Alex Willmer authored
SSH command size: 482 bytes (no change) Preamble size: 8946 bytes (down 33)
-
Alex Willmer authored
-
Alex Willmer authored
-
Alex Willmer authored
-
Alex Willmer authored
Not strictly a rival, but has enough commonalities to be worth noting
-
Alex Willmer authored
-
Alex Willmer authored
-
Alex Willmer authored
-
Alex Willmer authored
All outgoing links checked with ```bash cd docs make linkcheck ```
-
Alex Willmer authored
```bash cd docs make ``` to run a webserver that automatically rerenders whenever the rST is modified.
-
David Wilson authored
A first small mea culpa to all my testing sins of late :)
-
David Wilson authored
This actually addresses multiple problems: * Single-file programs were broken, since the fix introduced in 6931cc10c4a1e08161a58cf4b6b555b71cdc62b5 caused builtin_find_module() to start indicating __main__ can always be loaded locally. That's broken, and there might be more cases where the same problem will crop up. Since it was indicated __main__ could be loaded locally, the built-in import machinery was allowed to attempt that (since we remove __main__ from sys.modules during bootstrap), which caused a safety check to fire in the bowels of Python: "Cannot re-init internal module %.200s" * The check for presence of the whitelist was totally broken, since the whitelist is never an empty list. Therefore 'self' was being returned for every module, including extension modules like 'termios'. I have hand-verified this does not break the fix for issue #113. I looked at writing a test for that, but it requires a Docker container (or similar) with an ancient version of Ansible installed. Will open a separate ticket tracking this.
-
David Wilson authored
-
David Wilson authored
-