Tags: oconnor663/duct.py
Tags
version 1.0.1 Changes since 1.0.0: - `setup.py` has been replaced with `pyproject.toml`. - Previously we used a global lock to avoid pipe inheritance race conditions on Windows. As of Python 3.7, `close_fds=True` is sufficient for this, and is also the default. The lock has been removed.
version 1.0.0 Changes since 0.6.4: - The majority of the API is stabilized as-is. The main visible change is that the `try_wait` methods on `Handle` and `ReaderHandle` have been renamed to `poll`, for consistency with `subprocess.Popen.poll` in the Python standard library. The `try_wait` methods are retained as `@deprecated` aliases. Apart from that renaming, the rest of the changes are bugfixes or edge case behaviors. - Fixed a bug where `Handle.poll` could block indefinitely if a child process had exited but a longer-lived grandchild process was keeping its IO pipes open and its IO threads running (i.e. `stdin_bytes`, `stdout_capture`, or `stderr_capture`). Commit 60f57ae. - `Handle.kill` and `ReaderHandle.kill` no longer wait on child processes to exit. `subprocess.Popen` has an undocumented `__del__` finalizer, and it lazily cleans up leaked zombie children whenever new child processes are spawned. That's sufficient to prevent unbounded leaks, and there are also edge cases where waiting on a killed process can still block, so Duct now relies entirely on that finalizer. I'm porting similar behavior to the Rust implementation, for its coordinated v1.0.0 release. - Duct no longer kills child processes in any circumstance other than when you call `.kill()`. Previously Duct would kill child processes when closing a `ReaderHandle` that had not been read to EOF, or in some pipe spawning error cases. - The `ReaderHandle.close` method no longer has any effect. Duct no longer defines the method, and `ReaderHandle` inherits the no-op `IOBase.close`. `ReaderHandle` is still compatible with the `with` keyword, but context exit no longer has any effect. The `with` keyword has been removed from docs examples, to avoid giving the impression that it can do prompt cleanup without relying on finalizers.
version 0.6.0 Changes since 0.5.1: - Removed the `sh` function. - Removed the `then` method. - Add `Handle.kill` and use `waititd` to make it thread-safe. - Add `ReaderHandle` and `Expression.reader()`. - Avoid using threads in many cases. - Rename stdin/stdout/stderr to stdin_path/stdout_path/stderr_path. - Add Sphinx docs and doctest the examples. - This will be the last major release supporting Python 2.
bump version to 0.4.0 Changes since 0.3.0: - The magic constants NULL/CAPTURE/STDOUT/STDERR have been replaced with dedicated methods: null_*/capture_*/stdout_to_stderr/stderr_to_stdout. This saves you the trouble of extra imports, and it avoids weird typechecking issues like .stdin(CAPTURE) (if that's supposed to be a type error, then would need need two different types for NULL). - The env_remove and env_clear methods have been dropped, and we've gone back to the env/full_env API. (Though this time around they're methods instead of flags.) This is easier to use and more flexible, and it also prevents weird race conditions. - The cwd method has been renamed to dir. The cmd and cwd names were too awkwardly close to each other.
PreviousNext