Executor

Latest version: v23.1

Safety actively analyzes 682682 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 18

10.0

----------------------------

Large refactoring concerning ``executor`` / ``proc`` separation of concerns,
backwards incompatible!

In executor 7.7 the process management functionality was decoupled from
external command execution in order to re-use the process management
functionality in my proc package (this was integrated into proc 0.4). In
retrospect I implemented this refactoring (in November '15) too hastily because
the UNIX signal handling doesn't belong in the executor package (it's meant to
be portable). Last weekend I decided to finally do something about this! I'm
only committing this now because it took me days to clean up, stabilize,
document and test the refactoring :-). A high level summary:

- All process manipulation that uses UNIX signals is being moved to the 'proc'
package, that includes things like SIGSTOP / SIGCONT. This means that the
methods ``ControllableProcess.suspend()`` and ``ControllableProcess.resume()``
are no longer available. This will break fresh installations of my 'proc'
package until I release a new version, because I haven't pinned the max
version of dependencies I control. The new release of 'proc' is waiting to be
uploaded though :-).

- The 'executor' package no longer keeps references to ``subprocess.Popen``
objects after the process has finished, to allow garbage collection. This
should resolve an issue I was seeing recently when I was pushing the limits
of executor command pools and ran into ``IOError: [Errno 24] Too many open
files``.

Someone on StackOverflow with the same problem:
http://stackoverflow.com/questions/6669996/python-subprocess-running-out-of-file-descriptors

Someone on StackOverflow who knows how to fix it:
http://stackoverflow.com/a/23763193/788200

While implementing this refactoring I had a lot of trouble making sure that
``ExternalCommand.pid`` and ``returncode`` would be preserved when the
``subprocess`` reference was destroyed (it seems so obvious, but nevertheless
this tripped me up). The test suite agrees with me that I got things right
eventually, so here's hoping for no external breakage :-).

.. _Release 10.0: https://github.com/xolox/python-executor/compare/9.11...10.0

9.11

----------------------------

Make it possible to disable command pool spinners.

.. _Release 9.11: https://github.com/xolox/python-executor/compare/9.10...9.11

9.10

----------------------------

``ExternalCommand`` and ``RemoteCommand`` objects now have a ``tty`` option to
express whether they need to and/or will be connected to an interactie terminal.

.. _Release 9.10: https://github.com/xolox/python-executor/compare/9.9...9.10

9.9

---------------------------

Bug fix: Preserve environment variables when using ``sudo``.

.. _Release 9.9: https://github.com/xolox/python-executor/compare/9.8...9.9

9.8

---------------------------

Make it easy to test contexts for superuser privileges.

.. _Release 9.8: https://github.com/xolox/python-executor/compare/9.7...9.8

9.7

---------------------------

Added a shortcut for context creation (``executor.contexts.create_context()``).

.. _Release 9.7: https://github.com/xolox/python-executor/compare/9.6.1...9.7

Page 6 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.