diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2024-10-03 14:36:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-03 14:36:53 -0700 |
commit | 3c2a68287687be63dcdae84c146124cb15cbcb0a (patch) | |
tree | e7449f39ccc888e8c3ccdf74a90a16fc0281012f /COPYRIGHT | |
parent | a52ec2a9cc0e0916e6bdeecab1bc2a6385af007b (diff) | |
download | spack-3c2a68287687be63dcdae84c146124cb15cbcb0a.tar.gz spack-3c2a68287687be63dcdae84c146124cb15cbcb0a.tar.bz2 spack-3c2a68287687be63dcdae84c146124cb15cbcb0a.tar.xz spack-3c2a68287687be63dcdae84c146124cb15cbcb0a.zip |
Better docs and typing for `_setup_pkg_and_run` (#46709)
There was a bit of mystery surrounding the arguments for `_setup_pkg_and_run`. It passes
two file descriptors for handling the `gmake`'s job server in child processes, but they are
unsed in the method.
It turns out that there are good reasons to do this -- depending on the multiprocessing
backend, these file descriptors may be closed in the child if they're not passed
directly to it.
- [x] Document all args to `_setup_pkg_and_run`.
- [x] Document all arguments to `_setup_pkg_and_run`.
- [x] Add type hints for `_setup_pkg_and_run`.
- [x] Refactor exception handling in `_setup_pkg_and_run` so it's easier to add type
hints. `exc_info()` was problematic because it *can* return `None` (just not
in the context where it's used). `mypy` was too dumb to notice this.
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Diffstat (limited to 'COPYRIGHT')
0 files changed, 0 insertions, 0 deletions