From 7436ca2f7b8cb12ebeee9d0fe48d9799c2e3f224 Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Thu, 26 Sep 2019 06:11:35 +0000 Subject: [PATCH 1/4] CI: Fixed deps --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 707572e..6237cbe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ test_job: # Create environment - pacman -Syu --noconfirm - pacman -S --noconfirm grep python - - pacman -S --noconfirm python-pythondialog python-pytest python-pytest-runner python-pytest-cov python-pylint python-isort mypy pylama python-mccabe python-requests + - pacman -S --noconfirm python-pytest python-pytest-runner python-pytest-cov python-pylint python-isort mypy pylama python-mccabe # Run tests - python setup.py test # Artifacts -- GitLab From 515fb5a32977d67a17799b1c77ab360c60e32ad2 Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Thu, 26 Sep 2019 06:11:43 +0000 Subject: [PATCH 2/4] Added copyright --- src/forkedsubprocess/__init__.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/forkedsubprocess/__init__.py b/src/forkedsubprocess/__init__.py index 78ea6aa..b345188 100644 --- a/src/forkedsubprocess/__init__.py +++ b/src/forkedsubprocess/__init__.py @@ -1,3 +1,23 @@ +# Copyright (C) 2019, AllWorldIT. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of +# this software and associated documentation files (the "Software"), to deal in +# the Software without restriction, including without limitation the rights to +# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# of the Software, and to permit persons to whom the Software is furnished to do +# so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """Forked subprocesses support for Python.""" import subprocess -- GitLab From 30a71b55c2fb6cfa345647455eac6134610dbb9a Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Thu, 26 Sep 2019 06:22:08 +0000 Subject: [PATCH 3/4] Make linting more happy --- src/forkedsubprocess/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/forkedsubprocess/__init__.py b/src/forkedsubprocess/__init__.py index b345188..535c271 100644 --- a/src/forkedsubprocess/__init__.py +++ b/src/forkedsubprocess/__init__.py @@ -291,15 +291,19 @@ class ForkedSubprocess: raise ForkedSubprocessNotRunningException('wait() was called on a subprocess which is not running') # Stop writer - self._stdin_writer.stop() + if self._stdin_writer: + self._stdin_writer.stop() # Wait for process exit self._process.wait() # Wait for threads to read data and exit - self._stdin_writer.wait() - self._stdout_reader.wait() - self._stderr_reader.wait() + if self._stdin_writer: + self._stdin_writer.wait() + if self._stdout_reader: + self._stdout_reader.wait() + if self._stderr_reader: + self._stderr_reader.wait() return self._process.returncode -- GitLab From 11cb913a07b5d1fc577ed0eae8745562751f1706 Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Thu, 26 Sep 2019 06:12:27 +0000 Subject: [PATCH 4/4] Bumped to 1.0.4 --- src/forkedsubprocess/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/forkedsubprocess/__init__.py b/src/forkedsubprocess/__init__.py index 535c271..d439563 100644 --- a/src/forkedsubprocess/__init__.py +++ b/src/forkedsubprocess/__init__.py @@ -24,7 +24,7 @@ import subprocess import threading from typing import IO, Any, Callable, Dict, List, Optional -__version__ = '1.0.3' +__version__ = '1.0.4' # Define our callback types InputCallback = Callable[[], str] -- GitLab